Decompile a compiled Lua script from a game or app back to readable source to understand how it works
Supply a custom opcode table to process Lua bytecode that was obfuscated with a modified instruction set
Disassemble a Lua bytecode file to inspect raw instructions when debugging a game mod or embedded script
Use the VSCode extension to open compiled Lua files directly in the editor with syntax highlighting
Requires Lazarus (free Pascal IDE) to build from source, Python and Lua are only needed for the validation test suite.
Lua is a programming language often embedded in games and applications, and when Lua code is distributed it is typically compiled into a binary format called bytecode, which is not human-readable. This tool, cLuaDecompiler, works in reverse: it takes those compiled Lua bytecode files and converts them back into readable Lua source code. It supports all major Lua versions from 5.1 through 5.5. The tool has two main modes. Disassembly shows the raw instruction-level content of the bytecode file, naming each operation and listing its operands. Decompilation goes further, reconstructing something close to the original Lua source code by analyzing how the instructions relate to each other. A third mode dumps an internal representation called SSA (Static Single Assignment form), which is useful for developers who want to understand or debug the decompiler's reasoning about control flow and variable lifetimes. One practical feature is support for custom opcode tables. Some applications modify Lua's standard instruction set to obfuscate their scripts, and this tool allows you to supply an alternative table so those modified bytecode files can still be processed. The README also mentions an optional Visual Studio Code extension that lets you open compiled Lua files directly in the editor, where they appear as readable source with syntax highlighting. Building it requires Lazarus, which is a free Pascal development environment, along with Python and the Lua toolchain if you want to run the included validation tests. The validation suite compiles test scripts, runs them under the original Lua interpreter, decompiles the resulting bytecode, runs the decompiled version, and then compares the output to confirm they match. The README notes that decompiled output should be treated as recovered source rather than an exact reconstruction. Variable names, formatting, and some structural details may differ from the original while still preserving the program's behavior. The project is licensed under the GNU AGPL version 3.
← coldzer0 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.