
RetDec is a retargetable machine-code decompiler based on LLVM.
Warning
The RetDec project is currently in a limited maintenance mode due to a lack of resources:
- Pull Requests are welcomed. They are reviewed with priority, if possible without delays.
- Issues are reacted on with delays up to one quarter. Issues are not actively solved unless they relate to a basic project maintenance.
- The basic project maintenance continues.
- Only a very limited development is carried on.
RetDec is a retargetable machine-code decompiler based on LLVM.
The decompiler is not limited to any particular target architecture, operating system, or executable file format:
Features:
For more information, check out our
There are two ways of obtaining and installing RetDec:
retdec/share/retdec/README.md file after unpacking.We currently support Windows (7 or later), Linux, macOS, and (experimentally) FreeBSD. An installed version of RetDec requires approximately 5 to 6 GB of free disk space.
Please, ensure that you reading instructions corresponding to the used RetDec version. If unsure, refer to the retdec/share/retdec/README.md file in the installation.
After installing RetDec, install Microsoft Visual C++ Redistributable for Visual Studio 2017.
Install the following programs:
To decompile a binary file named test.exe, run
$RETDEC_INSTALL_DIR\bin\retdec-decompiler.exe test.exe
For more information, run retdec-decompiler.exe with --help.
After installing RetDec, install the following packages via your distribution's package manager:
To decompile a binary file named test.exe, run
$RETDEC_INSTALL_DIR/bin/retdec-decompiler test.exe
For more information, run retdec-decompiler with --help.
After installing RetDec, install the following packages:
To decompile a binary file named test.exe, run
$RETDEC_INSTALL_DIR/bin/retdec-decompiler test.exe
For more information, run retdec-decompiler with --help.
There are currently no pre-built "ports" packages for FreeBSD. You will have to build and install the decompiler by yourself. The process is described below.
To decompile a binary file named test.exe, run
$RETDEC_INSTALL_DIR/bin/retdec-decompiler test.exe
For more information, run retdec-decompiler with --help.
You can easily use various RetDec libraries in your projects - if they are build with CMake. RetDec installation contains all the necessary headers, libraries, and CMake scripts.
If you installed RetDec into a standard installation location of your system (e.g. /usr, /usr/local), all you need to do in order to use its components is:
find_package(retdec 5.0 REQUIRED
COMPONENTS
<component>
[...]
)
target_link_libraries(your-project
PUBLIC
retdec::<component>
[...]
)
If you did not install RetDec somewhere where it can be automatically discovered, you need to help CMake find it before find_package() is used. There are generally two ways to do it (pick & use only one):
Add the RetDec installation directory to CMAKE_PREFIX_PATH:
list(APPEND CMAKE_PREFIX_PATH ${RETDEC_INSTALL_DIR})
Set the path to installed RetDec CMake scripts to retdec_DIR:
set(retdec_DIR ${RETDEC_INSTALL_DIR}/share/retdec/cmake)
See the Repository Overview wiki page for the list of available RetDec components, or the retdec-build-system-tests for demos on how to use them.
This section describes a local build and installation of RetDec. Instructions for Docker are given in the next section.
On Debian-based distributions (e.g. Ubuntu), the required packages can be installed with apt-get: