DX-Ball 1.07: From 63 Bytes of x86 to Verified C

Following a brick-hit sound call into 0x00406400, reconciling decompiler blind spots with raw x86 instructions, and verifying 3,205 oracle cases.

Abstract. Decompilers frequently hide x87 stack-passing conventions and inline float constants. In DX-Ball 1.07, the sound-panning routine at 0x00406400 spans just 63 bytes of x86[1]Calling conventionThe ball X coordinate arrives via a hidden caller stack slot; caller disassembly at 0x411f40 was required to recover the parameter boundary.rea.tools/showcase/dx-ball, yet recovering its exact C implementation requires reconciling caller disassembly, raw memory reads of .rdata constants, and 3,205 oracle comparisons.

63 Bytes at 0x00406400

Every step below is bound to an immutable REA Evidence ID[2]Float constantsRaw .rdata reads resolved 1.5625 (0x420068) and 500.0 (0x4210a0) directly from the binary rather than relying on decompiler approximations.rea.tools/showcase/dx-ball. Walk through the five transitions from the hidden stack input to the final __ftol truncation and test arbitrary ball X coordinates against the DirectSound pan formula.

Figure 1 · Interactive Reconstruction

DX-Ball Sound-Panning: x86 Assembly to Verified C

3,205 / 3,205 oracle cases · 63 matching bytes
01. Recover the hidden stack input
The initial pseudocode emitted FUN_00406400(void), hiding the parameter. REA's instruction view exposes [EBP+0x8] loaded via FILD, and following caller 0x411f40 proves x = 20 + 30 * tile_x.
analyze_function: { "procedure": "0x406400" }
ev:dxball:fn:0x406400
x86 Disassembly (0x406409)REA Ghidra
10x406409: MOV EAX, dword ptr [EBP + 0x8]
20x40640c: MOV dword ptr [EBP - 0xc], EAX
30x40640f: FILD dword ptr [EBP - 0xc]
40x406415: FMUL double ptr [0x00420068]
50x40641e: FSUB double ptr [0x00420070]
60x406427: FMUL double ptr [0x004210a0]
70x406430: CALL 0x0041678c ; __ftol
80x40643e: RET
Reconstructed C (dxball_screen_pan)MSVC
1DxBallInt dxball_screen_pan(DxBallInt x) {
2 double pan = (double)x;
3 pan = pan * 1.5625;
4 pan = pan - 500.0;
5 pan = pan * dxball_pan_scale;
6 return (DxBallInt)pan;
7}
Interactive Oracle Probe: Ball X Positionx = 320px → pan = 0 (Center)
0 px (Left wall: -500)320 px (Center: 0)640 px (Right wall: +500)
Powered by a custom @ui-sdk/core primitive (EvidenceStepper) with roving focus and agent actions goTo, next, and previous, paired with @ui-sdk/react/slider. Use Left/Right arrow keys on the step bar.

Oracle Verification & Investigation Trace

After reconstructing the C expression, REA’s verification harness ran 3,205 input combinations against the original x86 binary and confirmed all 63 compiled bytes match[3]Byte-exact proofVerification compares both functional outputs across 3,205 inputs and the exact 63-byte compiled machine-code footprint.rea.tools/showcase/dx-ball. Inspect the illustrative tool latency trace below.

Figure 4 · Capability Matrix & Trace

REA Target Surface & Investigation Span Waterfall

Showing 10 of 10 target families
Target familyPrimary REA toolsPrerequisiteReturns
Native binaries (ELF / Mach-O / PE / DOS)open_binary → analyze_functionHopper, Ghidra, IDA Pro, or KunaPseudocode, assembly, callers, callees, strings, CFG, xrefs
Go & Rust cargo-auditable binariesinspect_go_binary / inspect_rust_binaryNone (built-in static parser)Compiler version, module graph, crate versions, build settings
CUDA/HIP code objects & GGUF / safetensorsinspect_gpu_code_objects / inspect_model_artifactNone (header & fatbin parser)Kernel parameters, PTX text, tensor declarations, header digests
Electron ASAR & bundled JavaScriptanalyze_javascript_applicationNode.js 22/24/26 (no native engine)Module graph, IPC boundaries, preload APIs, route tables, fuses
Live web apps & WebMCP pagescapture_browser_scenario → export_environment_bundleLoopback CDP Chrome-family browserDOM capture, scripts, WebMCP schemas, AgentEnv RL bundles
HAR, Fiddler SAZ, mitmproxy, qloginspect_web_network_captureSaved capture file (no live fetch)Requests, protobuf/gRPC payloads, source locations, stream stats
Android APKs, signatures & Flutterinspect_android_package / inspect_apk_signatureStatic for signatures/Flutter; JADX + JDK for JavaManifest, JADX decompilation, v1–v3.1 cert lineage, Dart hashes
.NET PE/CLI & Unity IL2CPP metadatainspect_managed_artifact / inspect_il2cpp_metadataNone (static metadata decoder)CIL hashes, P/Invoke maps, global-metadata.dat types & methods
Firmware, PCAPs & sigrok logic tracesinspect_firmware_regions / inspect_pcap_captureBinwalk/Unblob, TShark 4.x, or sigrok-cli on LinuxFirmware regions, DNS/TLS summaries, decoded bus annotations
SQLite + WAL, CPython .pyc & Erlang BEAMinspect_sqlite_database / inspect_python_pycNone (built-in static reader)Schema/rows, marshal code objects, BEAM atoms & export tables
Sample Investigation Trace (DX-Ball 940 ms Session)
Select any span row (or use Up/Down arrow keys) to inspect its phase notes.
rea: dx-ball investigation
open_binary(DXBALL.EXE)
analyze_function(0x406400)
analyze_function(0x411f40)
read_bytes(0x420068, 0x4210a0)
ui-sdk: agent.act(verify)
End-to-end: 940 ms total
session
Uses @ui-sdk/react/input, @ui-sdk/react/segmented-control, and @ui-sdk/react/waterfall (accessible treegrid timeline).

Notes & References

  1. Vercel Labs (2026). “Introducing UI SDK: A library of behaviors to build your components. Made for agents.” github.com/vercel-labs/ui
  2. REA Project (2026). “Reverse Engineer Anything: One MCP for reverse engineering across binaries, applications, and runtime behavior (v6.8.0, 229 tools).” github.com/morluto/rea
  3. REA Showcase (2026). “Rebuilding DX-Ball 1.07 from its executable: sound panning reconstruction & 3,205 oracle checks.” rea.tools/showcase/dx-ball
  4. REA Showcase (2026). “How Notion Desktop 7.6.1 copies text and HTML across its Electron preload/IPC bridge.” rea.tools/showcase/notion
  5. Editorial craft references: SID-2 Technical Report (three-column reading grid, inline figure toggles, margin sidenotes) and Architect Labs Frostbite (editorial left rail, serif display headlines, cobalt telemetry). sid.ai & architectlabs.com