LuaDec beta 0.3 released
- OP_TFORLOOP is fixed
- loop variable handing is fixed
- added command line options to handle local variables
With this version you are able to tell luadec where to declare local variables. The format is the following: -l LDS, where LDS stands for "Local Description String". It contains numbers which describe on which opcode should luadec declare a new local variable. ; separates functions and , separates registers. For example -l ;0,2 will mean to declare the first register as a local variable in the first function.
For example to decompile 4692e326_manila succesfully you have to use "-l 4,5;;0,0,10,11;0,0,8" (this will declare 5 local variables in different points of the scrfipt).
I attached some succesfully decompiled scripts (from the stock Raphael TF3D), namely:
I also added a patch file, which will show what you have to patch to get to the (almost) correct decompilation (success rate is _very_ high if you know where to declare locals)
Because determining where to declare locals is tiresome suspected features for next version will be:
- Upvalue handling
- Heuristics to detemine where to add local variables
I've just DL'ed the leaked TP2 TF3D files, so I think I start to work on decompiling that next.