public LOPlugin(ref LuaDecoder decoder, string desc) { this.Decoder = decoder; this.Description = desc; this.Functions = new List <string>(); this.Levels = new List <int>(); }
public LuaScriptBlock(int address, LuaDecoder decoder, LuaFunction func) { this.Decoder = decoder; this.Func = func; this.StartAddress = address; this.lines = new List <LuaScriptLine>(); }
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; } }
public LuaScriptLine(LuaInstruction instr, LuaDecoder decoder, LuaFunction func) { this.Instr = instr; this.Func = func; this.Decoder = decoder; SetType(); SetMain(); }
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 }
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 }
public Decompiler(byte[] Buffer) { this.Decoder = new LuaDecoder(new LuaCFile(Buffer)); this.LuaDecompiler = new LuaDecompiler(this.Decoder); }
public LuaDecompiler(LuaDecoder decoder) { this.Decoder = decoder; this.LuaFunctions = new List <LuaScriptFunction>(); WriteFile(); }
public LOFlow(ref LuaDecoder decoder) : base(ref decoder, desc) { }
public LOEncrypt(ref LuaDecoder decoder) : base(ref decoder, desc) { }
// 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) { }
public LOMov(ref LuaDecoder decoder) : base(ref decoder, desc) { }
public LuaObfuscator(byte[] originalLuaC) { this.ObfuscatedLuaC = originalLuaC; this.Decoder = new LuaDecoder(new LuaCFile(this.ObfuscatedLuaC)); this.Decompiler = new LuaDecompiler(this.Decoder); }
public LOJunk(ref LuaDecoder decoder) : base(ref decoder, desc) { }
public LOSettings(ref LuaDecoder decoder, string settings) { this.Decoder = decoder; this.ActivePlugins = new List <LOPlugin>(); DeserialiseSettings(settings); }
public LOPacker(ref LuaDecoder decoder) : base(ref decoder, desc) { }
public void SetDecoder(LuaDecoder decoder) { this.Decoder = decoder; }
public LOString(ref LuaDecoder decoder) : base(ref decoder, desc) { }