All Projects → viruscamp → Luadec

viruscamp / Luadec

Lua Decompiler for lua 5.1 , 5.2 and 5.3

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Luadec

wasm.cljc
Spec compliant WebAssembly compiler, decompiler, and generator
Stars: ✭ 178 (-73.67%)
Mutual labels:  decompiler
Wasmdec
WebAssembly to C decompiler
Stars: ✭ 290 (-57.1%)
Mutual labels:  decompiler
Dsync
IDAPython plugin that synchronizes disassembler and decompiler views
Stars: ✭ 399 (-40.98%)
Mutual labels:  decompiler
ti recover
Appcelerator Titanium APK source code recovery tool
Stars: ✭ 17 (-97.49%)
Mutual labels:  decompiler
Luadec51
Lua Decompiler for Lua version 5.1
Stars: ✭ 257 (-61.98%)
Mutual labels:  decompiler
Fidl
A sane API for IDA Pro's decompiler. Useful for malware RE and vulnerability research
Stars: ✭ 319 (-52.81%)
Mutual labels:  decompiler
xray
Hexrays decompiler plugin that colorizes and filters the decompiler's output based on regular expressions
Stars: ✭ 97 (-85.65%)
Mutual labels:  decompiler
Fcd
An optimizing decompiler
Stars: ✭ 622 (-7.99%)
Mutual labels:  decompiler
Boomerang
Boomerang Decompiler - Fighting the code-rot :)
Stars: ✭ 265 (-60.8%)
Mutual labels:  decompiler
R2dec Js
radare2 plugin - converts asm to pseudo-C code.
Stars: ✭ 345 (-48.96%)
Mutual labels:  decompiler
redscript
Compiler/decompiler toolkit for redscript
Stars: ✭ 191 (-71.75%)
Mutual labels:  decompiler
apk-decompiler
Small Rust utility to decompile Android apks
Stars: ✭ 48 (-92.9%)
Mutual labels:  decompiler
Undertalemodtool
The most complete tool for modding, decompiling and unpacking Undertale (and other Game Maker: Studio games!)
Stars: ✭ 313 (-53.7%)
Mutual labels:  decompiler
BEFA-Library
High-level library for executable binary file analysis
Stars: ✭ 14 (-97.93%)
Mutual labels:  decompiler
Bytecoder
Rich Domain Model for JVM Bytecode and Framework to interpret and transpile it.
Stars: ✭ 401 (-40.68%)
Mutual labels:  decompiler
OSRSUpdater
A simple (and outdated) Old-School RuneScape decompiler/deobfuscator. Performs field and method analysis which uses ASM and bytecode patterns for identification. Identified fields could be used for creating bot clients or QoL clients. For educational use only.
Stars: ✭ 13 (-98.08%)
Mutual labels:  decompiler
Python Decompile3
Python decompiler for 3.7-3.8 Stripped down from uncompyle6 so we can refactor and fix up some long-standing problems
Stars: ✭ 303 (-55.18%)
Mutual labels:  decompiler
Valveresourceformat
🔬 Valve's Source 2 resource file format parser and decompiler
Stars: ✭ 638 (-5.62%)
Mutual labels:  decompiler
Rz Ghidra
Deep ghidra decompiler and sleigh disassembler integration for rizin
Stars: ✭ 478 (-29.29%)
Mutual labels:  decompiler
Decomp
Components of a decompilation pipeline.
Stars: ✭ 343 (-49.26%)
Mutual labels:  decompiler

Overview

LuaDec is a Lua decompiler for lua 5.1 , and experimental for lua 5.2 and 5.3.

It is based on Hisham Muhammad's luadec which targeted lua 5.0.x and LuaDec51 by Zsolt Sz. Sztupak.

LuaDec is free software and uses the same license as the original LuaDec.

Compiling

git clone https://github.com/viruscamp/luadec
cd luadec
git submodule update --init lua-5.1
cd lua-5.1
make linux
cd ../luadec
make LUAVER=5.1

If you want to build it for lua 5.2 or 5.3 , just replace 5.1 above to 5.2 or 5.3.

There are also project files for vc2008, tested for vc2008 and vc2013.
Before compiling, make sure there are correct sources in lua-5.1 , lua-5.2 or lua-5.3.

Usage

  • decompile lua binary file:
    luadec abc.luac
  • decompile lua source file for testing and comparing:
    luadec abc.lua
  • disassemble lua source or binary
    luadec -dis abc.lua
  • -pn print nested functions structure, could be used by -fn
luadec -pn test.lua
0
  0_0
    0_0_0
  0_1
  • -f decompile only specific nested function
    luadec -f 0_1 test.lua
  • -ns donot process sub functions
    luadec -ns -f 0_1 test.lua
  • -fc perform a instruction-by-instruction compare for each function
    luadec -fc test.lua
    outputs:
    -- function check pass 0
    -- function check fail 0_0 : cannot compile
    -- function check fail 0_1 : different code size; sizecode org: 66, decompiled: 67, same: 47;

There are some more options, usually for debug purposes, or for cases where the built in local guesser guesses wrong. Use -h to get a complete list of usable parameters

Credits

Original by Hisham Muhammad (http://luadec.luaforge.net)

Ongoing port to Lua 5.1 by Zsolt Sz. Sztupak (https://github.com/sztupy/luadec51/)

The internals of Lua5.1 was learned from Kein-Hong Man's A No-Frills Introduction to Lua 5.1 VM Instructions

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].