You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone repository
git clone https://github.com/avast/retdec
cd retdec
# Initialize submodules
git submodule update --init --recursive
# Build
mkdir build &&cd build
cmake ..
make
make install
Using Docker
# Pull official image
docker pull retdec/retdec
# Run container
docker run -it retdec/retdec
Basic Commands
Decompilation
Command
Usage
Purpose
retdec-decompiler
retdec-decompiler input.exe
Basic decompilation
--select-ranges
--select-ranges 0x1000-0x2000
Decompile specific ranges
--select-functions
--select-functions func1,func2
Decompile specific functions
--raw-entry-point
--raw-entry-point 0x1000
Set entry point
--raw-section-vma
--raw-section-vma 0x1000
Set section VMA
Analysis Options
Command
Usage
Purpose
--analysis-only
--analysis-only
Only analyze, don't decompile
--ar-index
--ar-index=n
Set archive index
--ar-name
--ar-name=name
Set archive name
--backend-aggressive-opts
--backend-aggressive-opts
Aggressive optimizations
--backend-no-opts
--backend-no-opts
Disable optimizations
Output Control
Command
Usage
Purpose
--output
--output file.c
Set output file
--keep-all
--keep-all
Keep intermediate files
--graph-format
--graph-format=pdf
Set graph format
--no-memory-limit
--no-memory-limit
Disable memory limits
--verbose
--verbose
Verbose output
File Type Support
# Supported formats
ELF
PE
COFF
Intel HEX
Raw data
Mach-O
AR archives
Architecture Support
# Supported architectures
x86
x64
ARM
ARM64
MIPS
PIC32
PowerPC
Advanced Usage Examples
# Decompile with specific architecture
retdec-decompiler --arch arm input.bin
# Decompile with entry point
retdec-decompiler --raw-entry-point 0x1000 input.bin
# Generate control flow graph
retdec-decompiler --generate-cfg input.exe
# Keep all intermediate files
retdec-decompiler --keep-all input.exe
# Specify target language
retdec-decompiler --target-language c input.exe
Error: Unable to detect file format
Solution: Specify format manually
Error: Memory limit exceeded
Solution: Use --no-memory-limit
Error: Unknown architecture
Solution: Specify architecture with --arch
Error: Invalid entry point
Solution: Verify entry point address