Reversing Lua

Lua is a lightweight embeddable scripting language that is commonly used in a variety of applications. Because Lua has C bindings, it is very easy to embed. As a result of this, Lua is widely used in many applications(especially games). - Reversing Lua’s C API / r/lua

First bytes of the compiled Lua file tell the version where the script was compiled in. The Lua bytecode is not stable between versions, you’ll need to know which version of Lua they were compiled against.

  • LuaDec - a Lua decompiler for lua 5.1 , and experimental for lua 5.2 and 5.3.
  • unluac - a decompiler for Lua 5.0 through 5.4. It runs on Lua chunks that have been compiled with the standard Lua compiler. It requires that debugging information has not been stripped from the chunk.
Written on February 18, 2023, Last update on February 18, 2023
reverse lua