RetDec is a retargetable machine-code de compiler based on LLVM. The de-compiler is not limited to any particular target architecture, operating system, or executable file format:
Features
Installation & Use
Currently, we support Windows (7 or later), Linux, macOS, and (experimentally) FreeBSD. An installed version of RetDec requires approximately 4 GB of free disk space.
Windows
test.exe, run the following command (ensure that python runs Python 3; as an alternative, you can try py -3) python $RETDEC_INSTALL_DIR/bin/retdec-decompiler.py test.exe For more information, run retdec-decompiler.py with --help. Linux
test.exe, run $RETDEC_INSTALL_DIR/bin/retdec-decompiler.py test.exe For more information, run retdec-decompiler.py with --help. macOS
test.exe, run $RETDEC_INSTALL_DIR/bin/retdec-decompiler.py test.exe For more information, run retdec-decompiler.py with --help. FreeBSD (Experimental)
sudo pkg install python37 sudo ln -s /usr/local/bin/python3.7 /usr/local/bin/python3 test.exe, run $RETDEC_INSTALL_DIR/bin/retdec-decompiler.py test.exe For more information, run retdec-decompiler.py with --help. Build in Docker
Docker support is maintained by community. If something does not work for you or if you have suggestions for improvements, open an issue or PR.
Build Image
Building in Docker does not require installation of the required libraries locally. This is a good option for trying out RetDec without setting up the whole build tool chain.
To build the RetDec Docker image, run
docker build -t retdec – < Dockerfile
This builds the image from the master branch of this repository.
To build the image using the local copy of the repository, use the development Dockerfile, Dockerfile.dev:
docker build -t retdec:dev . -f Dockerfile.dev
Run Container
If your uid is not 1000, make sure that the directory containing your input binary files is accessible for RetDec:
chmod 0777 /path/to/local/directory
Now, you can run the decompiler inside a container:
docker run –rm -v /path/to/local/directory:/destination retdec retdec-decompiler.py /destination/binary
Note: Do not modify the /destination part is. You only need to change /path/to/local/directory. Output files will then be generated to /path/to/local/directory.
Automated TeamCity Builds
Our TeamCity servers are continuously generating up-to-date RetDec packages from the latest commit in the master branch. These are mostly meant to be used by RetDec developers, contributors, and other people experimenting with the product (e.g. testing if an issue present in the official release still exists in the current master).
You can use these as you wish, but keep in mind that there are no guarantees they will work on your system (especially the Linux version), and that regressions are a possibility. To get a stable RetDec version, either download the latest official pre-built package or build the latest RetDec version tag.
Repository Overview
This repository contains the following libraries:
ar-extractor – library for extracting object files from archives (based on LLVM).bin2llvmir – library of LLVM passes for translating binaries into LLVM IR modules.capstone2llvmir – binary instructions to LLVM IR translation library.config – library for representing and managing RetDec configuration databases.cpdetect – library for compiler and packer detection in binaries.crypto – collection of cryptographic functions.ctypes – C++ library for representing C function data types.debugformat – library for uniform representation of DWARF and PDB debugging information.demangler – demangling library capable to handle names generated by the GCC/Clang, Microsoft Visual C++, and Borland C++ compilers.dwarfparser – library for high-level representation of DWARF debugging information.fileformat – library for parsing and uniform representation of various object file formats. Currently supporting the following formats: COFF, ELF, Intel HEX, Mach-O, PE, raw data.llvm-support – set of LLVM related utility functions.llvmir-emul – LLVM IR emulation library used for unit testing.llvmir2hll – library for translating LLVM IR modules to high-level source codes (C, Python-like language).loader – library for uniform representation of binaries loaded to memory. Supports the same formats as fileformat.macho-extractor – library for extracting regular Mach-O binaries from fat Mach-O binaries (based on LLVM).patterngen – binary pattern extractor library.pdbparser – Microsoft PDB files parser library.stacofin – static code finder library.unpacker – collection of unpacking functions.utils – general C++ utility library.This repository contains the following tools:
ar-extractortool – frontend for the ar-extractor library (installed as retdec-ar-extractor).bin2llvmirtool – frontend for the bin2llvmir library (installed as retdec-bin2llvmir).bin2pat – tool for generating patterns from binaries (installed as retdec-bin2pat).capstone2llvmirtool – frontend for the capstone2llvmir library (installed as retdec-capstone2llvmir).configtool – frontend for the config library (installed as retdec-config).ctypesparser – C++ library for parsing C function data types from JSON files into ctypes representation (installed as retdec-ctypesparser).demangler_grammar_gen — tool for generating new grammars for the demangler library (installed as retdec-demangler-grammar-gen).demanglertool — frontend for the demangler library (installed as retdec-demangler).fileinfo – binary analysis tool. Supports the same formats as fileformat (installed as retdec-fileinfo).idr2pat – tool for extracting patterns from IDR knowledge bases (installed as retdec-idr2pat).llvmir2hlltool – frontend for the llvmir2hll library (installed as retdec-llvmir2hll).macho-extractortool – frontend for the macho-extractor library (installed as retdec-macho-extractor).pat2yara – tool for processing patterns to YARA signatures (installed as retdec-pat2yara).stacofintool – frontend for the stacofin library (installed as retdec-stacofin).unpackertool – plugin-based unpacker (installed as retdec-unpacker).This repository contains the following scripts:
retdec-decompiler.py – the main decompilation script binding it all together. This is the tool to use for full binary-to-C decompilations.retdec-decompiler.py: retdec-color-c.py – decorates output C sources with IDA color tags – syntax highlighting for IDA.retdec-config.py – decompiler’s configuration file.retdec-archive-decompiler.py – decompiles objects in the given AR archive.retdec-fileinfo.py – a Fileinfo tool wrapper.retdec-signature-from-library-creator.py – extracts function signatures from the given library.retdec-unpacker.py – tries to unpack the given executable file by using any of the supported unpackers.retdec-utils.py – a collection of Python utilities. retdec-tests-runner.py – run all tests in the unit test directory.type_extractor – generation of type information (for internal use only)PHP 8.5 is included in Ubuntu 26.04's default repositories and is the recommended version for…
Ubuntu 26.04 LTS "Resolute Raccoon" arrived on April 23, 2026 with Linux kernel 7.0, GNOME 50,…
Kubernetes is the standard platform for running containerized workloads across multiple servers with self-healing, rolling…
Ubuntu 26.04 LTS "Resolute Raccoon" was released on April 23, 2026 with Linux kernel 7.0, GNOME desktop, and standard security support until April 2031. A clean install gives you a known-good starting point on new hardware, when replacing another operating system, or when an upgrade path is not practical. This guide walks through how to install Ubuntu 26.04: downloading and verifying the ISO, writing a bootable USB drive, completing the installer, and doing the initial setup after the first boot. Before you start: You need a USB drive with at least 12 GB of free space. Back up any existing data on the target machine — the installer can erase the entire disk. Install Ubuntu 26.04: Download the ISO…
The correct timezone affects more than the clock on your screen. It drives cron job scheduling, systemd timer execution, log file timestamps, database record timing, and SSL certificate validity checks. A mismatched timezone can cause scheduled jobs to fire at the wrong hour and make log timestamps impossible to match with real-world events. This guide shows how to change timezone on Ubuntu using the timedatectl command (the recommended approach for servers and remote machines) and through the graphical Date & Time settings on desktop systems. The steps apply to all current Ubuntu releases including 24.04 and 26.04. <strong>Prerequisite:</strong> Only the root user or a user with sudo access can change the system timezone. Check the Current Timezone Before You Change It Run timedatectl with no arguments to see the active timezone and clock status: bashtimedatectl Sample output: Local…
Atom is a free, open-source, cross-platform code editor developed by GitHub. Built on Electron, it uses…