Feature Description:
This feature enables the decompiler to automatically detect, parse, and decompile compiled Lua scripts (luac) across all major Lua versions (5.1, 5.2, 5.3, 5.4, and LuaJIT) without requiring user configuration. It handles different endianness and integer sizes natively, reconstructing valid, compilable Lua source code from the bytecode.
Choosing the right tool depends entirely on the Lua version used to compile the file, as bytecode is generally incompatible across versions. decompile luac
If the file had debug info, you’ll see something like: Reverse Engineering : Decompiling Lua bytecode can help
I once worked on a mod for an indie game (with permission) whose original author lost the source. The game used Lua 5.2 compiled scripts. Using unluac, I recovered 95% of the UI logic. Missing variable names were annoying, but the algorithm was intact. Two hours of cleaning later, we had fully functional source. reconstruct structured constructs (if
| Disassembly | Decompilation |
|----------------|------------------|
| Converts bytecode to a low-level, human-readable opcode representation (e.g., GETGLOBAL 0 1) | Reconstructs high-level Lua source code (local x = math.abs(-5)) |
| Always possible, even with stripped binaries | Often imperfect due to lost variable names, control flow obfuscation, or compiler optimizations |
| Useful for analyzing exact VM instructions | Useful for editing, understanding logic, or re-using code |
Decompiling Lua bytecode can be useful in various scenarios: