示例#1
0
 public Stroka(GNIDA1 Prnt, IInstruction Ins, string UpC = "", string Com = "", string SubC = "")
 {
     Parent     = Prnt;
     Inst       = Ins;
     UpComment  = UpC;
     Comment    = Com;
     SubComment = SubC;
     addr       = (uint)Prnt.FO2RVA(Ins.Addr);
 }
示例#2
0
文件: GNIDA.cs 项目: Rex-Hays/GNIDA2
 public Stroka(GNIDA1 Prnt, mediana.INSTRUCTION Ins, string UpC = "", string Com = "", string SubC = "")
 {
     Parent     = Prnt;
     Inst       = Ins;
     UpComment  = UpC;
     Comment    = Com;
     SubComment = SubC;
     addr       = (uint)Prnt.FO2RVA(Ins.Addr);
 }
示例#3
0
文件: GNIDA.cs 项目: Rex-Hays/GNIDA2
 public Stroka(GNIDA1 Prnt, IInstruction Ins, string UpC = "", string Com = "", string SubC = "")
 {
     Parent = Prnt;
     Inst = Ins;
     UpComment = UpC;
     Comment = Com;
     SubComment = SubC;
     addr = (uint)Prnt.FO2RVA(Ins.Addr);
 }
示例#4
0
文件: Wide.cs 项目: Rex-Hays/GNIDA2
        private void openToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                listView3.Clear();
                IncludedFiles.Clear();
                MyGNIDA = new GNIDA1(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\flirt.xml");
                MyGNIDA.OnLogEvent += OnLogEvent1;
                MyGNIDA.OnAddFunc += AddFuncEvent1;
                MyGNIDA.OnAddStr += AddText;
                MyGNIDA.OnVarEvent += AddVarEvent1;
                MyGNIDA.OnFuncChanged += OnFuncChanged1;

                Load ldfrm = new Load();
                ListView lv = ldfrm.ldrs();
                ListView da = ldfrm.dsmrs();
                lv.Clear();
                da.Clear();
                foreach (string findPlg in System.IO.Directory.GetFiles(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\Loaders\\", "*.dll", System.IO.SearchOption.TopDirectoryOnly))
                    Loaders(findPlg, lv);
                foreach (string findPlg in System.IO.Directory.GetFiles(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\\Dasmers\\", "*.dll", System.IO.SearchOption.TopDirectoryOnly))
                    Dasmers(findPlg, da);

                if (ldfrm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    MyGNIDA.assembly = lv.SelectedItems[0].Tag as ILoader;
                    MyGNIDA.MeDisasm = da.SelectedItems[0].Tag as IDasmer;
                    MyGNIDA.MeDisasm.Init(MyGNIDA.assembly);
                    ldfrm.Dispose();

                    MyGNIDA.LoadFile(openFileDialog1.FileName);

                    dynamicFileByteProvider = new DynamicFileByteProvider(openFileDialog1.FileName, true);
                    hexBox1.ByteProvider = dynamicFileByteProvider;
                    hexBox1.LineInfoOffset = (long)MyGNIDA.assembly.Entrypoint() + (long)MyGNIDA.assembly.ImageBase();

                    fastColoredTextBox1.Clear();
                    fastColoredTextBox1.Text = "//+---------------------------------------------------------------------+" +
                                      "\n//| Dis file has bin generated by GNU Interactive DissAssembler (GNIDA) |" +
                                      "\n//|       Copyleft (c) 2014 by me <*****@*****.**>              |" +
                                      "\n//|                          Free 4 use                                 |" +
                                      "\n//|                         Writed AS IS                                |" +
                                      "\n//+---------------------------------------------------------------------+\n";
                    //if( & DynamicLoadedLibraryFile)

                    if ((MyGNIDA.assembly.ExecutableFlags() & (ulong)ExecutableFlags.DynamicLoadedLibraryFile) != 0)
                    { fastColoredTextBox1.Text += "#pragma option DLL\n"; }
                    else
                    {
                        switch (MyGNIDA.assembly.SubSystem())
                        {
                            case (ulong)SubSystem.WindowsGraphicalUI: fastColoredTextBox1.Text += "#pragma option W32\n"; break;
                            case (ulong)SubSystem.WindowsConsoleUI: fastColoredTextBox1.Text += "#pragma option W32C\n"; break;
                            default: fastColoredTextBox1.Text += "#pragma option W32;//TO-DO!!!\n"; break;
                        }
                    }
                    IncludedFiles.Add("Windows.h");
                    IncludedFiles.Add("msvcrt.h--");
                    fastColoredTextBox1.Text += "#jumptomain NONE\n";
                    foreach (string s in IncludedFiles)
                    {
                        fastColoredTextBox1.Text += "#include \"" + s + "\";\n";
                    }
                    VarLine = fastColoredTextBox1.LinesCount - 1;
                }
            }
        }