Reverse engineering, with your coding agent
Find out how
software works.
REA gives your agent the tools to inspect a program and explain what it does.
What is reverse engineering?
Finding out how software works by examining the program.
DX-Ball: how does the game place a sound on the left or right?
MOV EAX, dword ptr [EBP + 0x8]
MOV dword ptr [EBP + -0xc], EAX
FILD dword ptr [EBP + -0xc]
FMUL double ptr [0x00420068]
FSUB double ptr [0x00420070]
FMUL double ptr [0x004210a0]
CALL 0x0041678c
// x is the horizontal position
double pan = (double)x;
pan *= 1.5625;
pan -= 500.0;
pan *= pan_scale;
return (int)pan;
x = 0 → pan = −500
Sound to the left
x = 320 → pan = 0
Centered sound
x = 640 → pan = +500
Sound to the right
To explain this, an analyst identifies the input, follows the caller and reads the values at those addresses.
Do I need to read assembly to get started?
No.
Ask your agent about the behavior you want to understand.
Target · DXBALL.EXE
Use REA to inspect this DX-Ball executable. How does it calculate left/right sound panning? Show the relevant code.
This function converts a brick’s horizontal position into a left/right sound value.
At the initial scale of 1, the screen center produces zero. Positions to the left produce negative values; positions to the right produce positive values.
Example prompt and explanation based on the recorded investigation. Supply the executable to your agent.
What REA found for the agent
-
01 · Inspect the function
An integer input
The instructions read
[EBP + 0x8]. The initial pseudocode had missed this input. -
02 · Follow the caller
A brick’s screen position
The caller passes
20 + 30 × tile_x, giving the input its meaning. -
03 · Read the stored data
The calculation’s constants
Byte reads supply
1.5625,500.0and the initial scale1.0.
The reconstruction project checked its maintained C function against 3,205 original-x86 input cases and all 63 compiled bytes. See the code and checks.
Your first investigation
Try REA on a small app.
Find out where an app exports its notes, then check how it formats a title containing commas and quotes.
We provide the example files, a prompt and a result to check.
Set up REA with your agent
Install REA and connect it to this coding agent using npx rea-agents@latest setup. Show me the setup plan for approval, then verify the installation.
Or run this command in your terminal:
npx rea-agents@latest setup
Setup shows a plan for approval. Restart your agent after setup.
What REA can analyze
Choose a guide for your binary, JavaScript app or browser session.
Native binaries
Inspect functions, strings, references and call relationships in executables and libraries.
Native analysis guideJavaScript & Electron
Map modules, routes, IPC and native dependencies from an application folder or ASAR archive.
Application workflowsBrowser & runtime activity
Capture selected browser or process activity, then compare the results across runs.
Browser observation guideCase study · Native
Rebuilding DX-Ball
DX-Ball is a 1996 Windows game. The project is reconstructing it in C, using REA to inspect the executable and independent tests to check the recovered behavior.
Work so far covers boards, resources, brick hits, animations, particles and bonus production. The playable game is still in progress.
- 55
- functions in maintained C
- 45,380
- original-x86 differential cases
- 33
- complete functions with matching compiled bytes
Case study · Electron
Notion's Electron clipboard
A copy operation crosses from the page to Electron's main process. Inspect Notion's packaged JavaScript with REA, then follow one channel through the wrappers to the system clipboard.
Short code excerpts show each handoff. A second figure explains how an HTML marker connects ordinary clipboard text to Notion's structured block data.
Follow the clipboard bridgeClipboard IPC channel
invokerInMain(
"notion:clipboard:write"
)
addListener(
"notion:clipboard:write",
handler
)
Case study · PC-98 DOS
TH04's aimed bullet rings
Inspect a 16-bit DOS function with REA. Follow its angle calculation from original instructions to readable C++, then see how adding the player's direction turns a ring of bullets.
See the bullet calculationFixed and aimed rings
Case study · CTF
Solve a CTF flag checker
Use REA to inspect an easy DownUnderCTF binary. Extract its checking rules, solve for the flag and confirm that the original program accepts it.
See the CTF solutionOne check reveals one character
Mask: skip 21, select 1, skip 14
Target: 55
code[21] = 55 → '7'
What would you like to understand?
Connect REA to your coding agent, or run your first analysis from the terminal.