You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You found the key problem, yes, the decompilation of and-or statements is a big problem, lua compiles the "and/or" operators as conditional jumps instead of handling them with special instructions, and in many cases the decompilation fails for statements containing "and/or", thus showing the original conditional jumps as they are, i.e., if-else, which is what I've been thinking about , how to restore and-or statements more accurately
@metaworm I've had the same problem when writing my decompiler and I've managed to find a perfect solution.
Go check out this paper, specifically the part where they build a control flow graph and then search for "boolean atoms".
It is meant for java but with a few adjustments it also works for lua/luajit bytecode.
When given the following script:
Metaworm's luadec fails to identify the and-or construct, and instead produces this code:
The text was updated successfully, but these errors were encountered: