Skip to content

styinx/lua4dec

Repository files navigation

Decompiler for Lua 4 (WIP)

Uses compiled Lua 4 bytecode as input and converts it to readable Lua 4 code.

TODOs

  • Implement the rest of the operators
  • JMPONF might be used different
  • POP command needs more attention
  • Complete documentation

Documentation

Beginner-friendly Documentation

Build

Windows MSVC Build @ master

Ubuntu Clang Build @ master

Test @ master

CMake

cmake -S . -B build -DTARGET_ARCH=64  # 32 for 32bit lua bytecode
cmake --build build --config Release

Pre-built binaries

Run

./luadec_64 luac.out
.\luadec_64.exe luac.out

Run test (compiles and decompiles scripts in the tests/scripts folder)

test.exe lua4\luac_64.exe luadec_64.exe differ.exe tests\scripts\

Inspect the byte code with a GUI (WIP)

lua4dec-browser