daftblazer releases x86-recomp to turn 32-bit Windows apps into C
A new static recompiler translates 32-bit PE32 Windows executables into C source code for native Linux ports.
Developer daftblazer published x86-recomp, a static recompiler that translates 32-bit MSVC-built Windows executables into C functions for native Linux ports. It maps guest addresses directly into host memory by keeping allocations in the lower 4 GB of address space. The repository ships no program code, so you need your own copy of the executable. The address mapping also needs an executable without relocations at a fixed base, which typical MSVC .exe files have, and a host with the low 4 GB free, as Linux PIE binaries on x86-64 and aarch64 have.
The tool handles function discovery through recursive descent, processes MSVC jump tables, and translates x87 math operations into double-precision runtime stacks. It includes differential fuzzing against Unicorn to verify instruction translation accuracy.
How to try it
- Set up a virtual environment and install the dependencies:
python3 -m venv .venv && .venv/bin/pip install capstone pefile unico - Provide a project config with target file hashes and code sections to generate native C source files.