LLM4Decompile
Reverse Engineering: Decompiling Binary Code with Large Language Models
What is LLM4Decompile?
Reverse Engineering: Decompiling Binary Code with Large Language Models
Overview of LLM4Decompile
What it is
LLM4Decompile is an open-source large language model designed for decompilation. It converts Linux x86_64 binaries compiled with GCC at optimization levels O0 through O3 into human-readable C source code. The project includes two main approaches: LLM4Decompile-End, which decompiles binary directly, and LLM4Decompile-Ref, which refines pseudo-code produced by Ghidra.
Key features
- Supports decompilation of Linux x86_64 binaries at GCC optimization levels O0, O1, O2, and O3.
- Provides models ranging from 1.3 billion to 33 billion parameters, available on Hugging Face.
- Includes LLM4Decompile-End for direct binary decompilation and LLM4Decompile-Ref for refining Ghidra output.
- Evaluates decompiled code using re-executability, measuring whether it passes predefined test cases.
- Benchmarked on HumanEval-Decompile (164 C functions) and ExeBench (2,621 real-project functions).
- Offers a training script that runs in approximately 3.5 hours on a single A100 40G GPU, achieving a 0.26 re-executability rate.
Use cases
- Reverse engineering of Linux x86_64 binaries to recover C source code.
- Security analysis and vulnerability research on compiled programs.
- Educational purposes for understanding how high-level code maps to binary.
Getting started
git clone https://github.com/albertan017/LLM4Decompile.git cd LLM4Decompile conda create -n 'llm4decompile' python=3.9 -y conda activate llm4decompile pip install -r requirements.txt See the repository README for detailed usage examples.
License and pricing
The project is licensed under MIT and is open source.
Based on the project's public README and repository metadata.