예제 #1
0
 public LOPlugin(ref LuaDecoder decoder, string desc)
 {
     this.Decoder     = decoder;
     this.Description = desc;
     this.Functions   = new List <string>();
     this.Levels      = new List <int>();
 }
예제 #2
0
 public LuaScriptBlock(int address, LuaDecoder decoder, LuaFunction func)
 {
     this.Decoder      = decoder;
     this.Func         = func;
     this.StartAddress = address;
     this.lines        = new List <LuaScriptLine>();
 }
예제 #3
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Title = "Select Binary File";
            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                if (!File.Exists(fileDialog.FileName))
                {
                    return;
                }

                var           luaF   = new LuaCFile(File.ReadAllBytes(fileDialog.FileName));
                LuaDecoder    d      = new LuaDecoder(luaF);
                LuaDecompiler writer = new LuaDecompiler(d);
                activeGraph = new frmGraph(writer);
                activeGraph.Show();

                lstFuncs.Items.Clear();
                foreach (var f in activeGraph.Writer.LuaFunctions)
                {
                    lstFuncs.Items.Add(f.ToString());
                }

                txtLuaCode.Text = activeGraph.Writer.LuaScript;
            }
        }
예제 #4
0
 public LuaScriptLine(LuaInstruction instr, LuaDecoder decoder, LuaFunction func)
 {
     this.Instr   = instr;
     this.Func    = func;
     this.Decoder = decoder;
     SetType();
     SetMain();
 }
예제 #5
0
 public LOProxyCall(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
     // NOTE: Add proxy func with multi args
     //
     // var0 = _G['proxy_call']
     // var0("0344FE91", ...) -- calls "0344FE91" with args ...
     // proxy_call will then get list of names (somehow) and calculate crc32 checksums
     // until it has a match, once there is a match, it calls the input of the checksum
     // NOTE: this heavly reduces performance, only use on non performance critical stuff
 }
예제 #6
0
 public LuaScriptFunction(string name, int argsCount, LuaFunction func, LuaDecoder decoder)
 {
     this.Func = func;
     this.Func.ScriptFunction = this; // reference this for lateron
     this.Decoder             = decoder;
     this.Lines      = new List <LuaScriptLine>();
     this.Blocks     = new List <LuaScriptBlock>();
     this.UsedLocals = new List <int>();
     InitArgs(argsCount);
     this.UsedLocals.AddRange(this.Args);
     HandleUpvalues(); // get upvalues from parent TODO: Bugfix
 }
예제 #7
0
 public Decompiler(byte[] Buffer)
 {
     this.Decoder       = new LuaDecoder(new LuaCFile(Buffer));
     this.LuaDecompiler = new LuaDecompiler(this.Decoder);
 }
예제 #8
0
 public LuaDecompiler(LuaDecoder decoder)
 {
     this.Decoder      = decoder;
     this.LuaFunctions = new List <LuaScriptFunction>();
     WriteFile();
 }
예제 #9
0
 public LOFlow(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
 }
예제 #10
0
 public LOEncrypt(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
 }
예제 #11
0
        // NOTE: Have a semi-trusted debugging information may give the reverser
        //       a harder time compared to giving no debugging information at all.

        public LODebug(ref LuaDecoder decoder) : base(ref decoder, desc)
        {
        }
예제 #12
0
 public LOMov(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
 }
예제 #13
0
 public LuaObfuscator(byte[] originalLuaC)
 {
     this.ObfuscatedLuaC = originalLuaC;
     this.Decoder        = new LuaDecoder(new LuaCFile(this.ObfuscatedLuaC));
     this.Decompiler     = new LuaDecompiler(this.Decoder);
 }
예제 #14
0
 public LOJunk(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
 }
예제 #15
0
 public LOSettings(ref LuaDecoder decoder, string settings)
 {
     this.Decoder       = decoder;
     this.ActivePlugins = new List <LOPlugin>();
     DeserialiseSettings(settings);
 }
예제 #16
0
 public LOPacker(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
 }
예제 #17
0
 public void SetDecoder(LuaDecoder decoder)
 {
     this.Decoder = decoder;
 }
예제 #18
0
 public LOString(ref LuaDecoder decoder) : base(ref decoder, desc)
 {
 }