lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thank you KHMan. We managed to find a copy of the source code somewhere - don't ask how or where :-(. It's therefore not necessary to recover it from the *.luac files anymore.

Nevertheless, it was an interesting exercise to investigate the decompilers and their internals. Based on my limited experience with them I would summarise the current state of decompilers as HBD (Here Be Dragons). I noted that even if a decompilation was successful, the decompiled source code is sometimes just wrong. In some cases if statements and expressions are completely wrong. I've also noticed that remnants of previous expressions may appear in expressions further down in the code.

Accurate decompilation is certainly not a trivial task and I salute the efforts of the Lua community in their attempts at solving this problem.

Regards
J

On 7/11/2012 1:23 PM, KHMan wrote:
> 
> I've never used luadec before, so I'll leave luadec specifics to
> the rest of the list.
> 
> It may not be necessary to add a complete decoder in luadec for
> that. Try looking at some function call listings using luac. Just
> dump all the likely stuff before the CALL, namely MOVE, NEWTABLE
> and SETTABLE, and you can probably do a manual reconstruction for
> those particular bits.
>