NFSU.cc / Reverse Engineering Field Guide

Reverse Engineering & Static Recompilation Field Guide (x86 to WebAssembly)

Open-source field guide to binary reverse engineering, ahead-of-time x86-to-C static recompilation, DirectX 9-to-WebGPU translation, V8 WASM optimization, and evidence-first AI binary analysis. Both plain-English (ELI5) and deep technical playbooks backed by 13,770 lifted functions and 2,858 verified binary addresses.

13,770Lifted x86 functions
49Subsystem RE notes
18,293Symbol census rows
770Documented hex patches
18,338Host + recompiler LOC

Plain-English (ELI5) intuition + production-verified deep dives on binary reverse engineering, x86-to-WebAssembly static recompilation, DirectX 9-to-WebGPU translation, and AI-assisted binary analysis. Primary open-source evidence base: https://github.com/Caliko06/need-for-speed-underground-browser · Live WebAssembly demo: https://nfsu.cc/

ELI5: Reverse Engineering & Static Recompilation in 60 Seconds

Think of a compiled 2003 Windows .exe file like a baked cake where the original recipe (the C/C++ source code) was lost:

Verified Production Proof (Real Numbers From One Shipped Binary)

Every technique in this field guide is proven in production on a real 3.18 MB 32-bit x86 Windows PE binary (Speed.exe, 2003, base 0x400000, MD5 b6b9232c55376b3c38c56aac1f8a121d) running live at https://nfsu.cc/:

DimensionMeasured ValueWhere to Inspect
Lifted x86 functions (x86 -> C -> WASM)13,770tools/recomp/lift.py (3,249 LOC across 22 Python files)
Custom Win32 / D3D9 / DInput / DSound host15,089 LOChost/ (34 C/H files) + web/
Verified binary subsystem monographs49 notes (2,858 unique hex addrs)Reverse Engineering Atlas
Evidence-tagged symbol census (V/I/U)18,293 rows (7,886 V-verified across 59 tables)Symbol Census Catalog
Non-destructive binary patch modules15 modules (770 unique hex addrs)Modular Patching Guide
Compiled WASM footprint (Brotli -q 11)7.04 MB (42.31 MB raw, -39.9% after compiler passes)Recompiler Passes Devlog
Mobile WASM heap budget448 MB (256 MB guest RAM, down from 640 MB)OOM & Mobile Heap Devlog
Cold boot to live 3D WebGPU frames2.27 s desktop (-30.5 s on mobile after curtain gate)V8 Cache & Mobile Boot Devlog

Four Reusable Playbooks (For Engineers & AI Agents)

1. Static x86-to-C Recompilation & Compiler Optimization

2. Translating DirectX 9 to WebGPU & WebGL 2

3. Shipping Large WebAssembly Apps in Real Browsers & Cloudflare R2

4. Evidence-First Reverse Engineering With AI Agents

Frequently Asked Questions (Reverse Engineering & Static Recompilation)

What is static recompilation vs emulation (ELI5)?

An emulator is like a live translator reading a foreign book aloud sentence by sentence while you listen, which burns CPU every frame. Static recompilation translates the entire 32-bit x86 executable into C source code once ahead of time, then compiles that C into native WebAssembly with Clang/LLVM so the browser runs it near native speed.

How do you optimize lifted x86-to-C code for WebAssembly?

Three compiler passes eliminate most naive lifting overhead: (1) inter-procedural EFLAGS liveness analysis to prune dead flag calculations (cutting par/af/cf writes by 69-82%), (2) static image address bypass (CHK_IMG) plus straight-line stack-pointer bounds coalescing (CHK_SP, cutting checks by 37.8%), and (3) native IEEE-754 floating point (RN_FAST_X87) verified against strict x87 via single-function differential testing.

Why does wrapping fetch() in a TransformStream break V8 WebAssembly code caching?

Chromium's V8 engine only caches compiled WebAssembly modules on disk when WebAssembly.instantiateStreaming() receives a genuine network Response with a cacheable URL. Wrapping response.body in a TransformStream or new Response() strips the URL identity, disables the code cache, and increases JS heap usage (+77% measured in production).

How do you prevent AI agents from hallucinating during reverse engineering?

Enforce an evidence-first contract: every claim about a binary must cite the exact virtual address and tool output (Ghidra, Hopper, or REA MCP) and carry a confidence tag: V (verified in instructions/bytes), I (inferred), or U (open/unproven). Memory, docs, and prior summaries are treated only as leads to re-check.

How do you update Cache-Control headers on gigabytes of Cloudflare R2 / S3 files without re-uploading?

Use the S3 CopyObject API targeting the same bucket and key with x-amz-metadata-directive: REPLACE and the new Cache-Control header (e.g. public, max-age=31536000, immutable). R2 updates metadata server-side with zero upload bandwidth.