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.

Set up REA

Copy this into your coding agent:

Your coding 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 in your terminal:

npx rea-agents@latest setup

Approve the setup plan, then restart your agent.

What is reverse engineering?

Finding out how software works by examining the program.

For example: why does Calculator turn 200 + 10% into 220?

Before REA · You investigate

  1. 01
    Find the code behind the button.Which executable or library handles %?
  2. 02
    Read the instructions.What do these branches and calls mean?
  3. 03
    Recover the calculation.Follow the inputs, operators and constants.
  4. 04
    Check your explanation.Does it agree with the program?
CMP EAX, 0x5c
JZ 0x180124aba
CMP EAX, 0x5b
JZ 0x180124aba
MOV EDX, 0x64

With REA · You ask your agent

Example prompt · Calculator

Use REA to inspect Windows Calculator. Why does 200 + 10% give 220? Show the code behind the % button.

Example explanation from the findings

With addition, % calculates a percentage of the first number.

10% of 200 is 20.
Then 200 + 20 = 220.

Your agent uses REA to locate and read the code, then connects the findings to your question.

You describe the behavior. The agent carries out the investigation with REA.

Example 01 · Windows Calculator

What does the % button actually do?

The answer depends on the operator. Compare addition and multiplication.

Try the calculation

200 + 20

10% of 200 = 20. Then 200 + 20 = 220.

Interactive illustration of the inspected percentage rule.

REA finds the branch. The agent explains it.

The installed app’s calculation code checks for multiplication or division before computing the percentage.

Readable summary of the % handler
if (operation == multiply || operation == divide) {
  percent = current / 100;
} else {
  percent = current * previous / 100;
}
Addition
200 + 10% → 200 + 20 → 220
Multiplication
200 × 10% → 200 × 0.1 → 20
See the real code and how the answer was checked
  1. 01 · Inspect calc.exeA launcherREA finds ShellExecuteW opening ms-calculator:.
  2. 02 · Inspect the appCalcViewModel.dllIts % handler checks two operator IDs and uses the constant 100.
  3. 03 · Interpret and checkTwo percentage rulesMicrosoft’s public implementation and unit tests explain the same distinction.
REA · selected original instructions
0x180124945: MOV EAX, dword ptr [R13 + 0x18]
0x180124949: CMP EAX, 0x5c
0x18012494c: JZ 0x180124aba
0x180124952: CMP EAX, 0x5b
0x180124955: JZ 0x180124aba
0x18012495b: MOV EDX, 0x64
Operator IDs · Microsoft’s source
#define IDC_MUL 92      // 0x5c
#define IDC_DIV 91      // 0x5b
#define IDC_PERCENT 118 // 0x76

0x64 = 100

Inspected with REA 4.1.0: Windows Calculator 11.2508.4.0, x64. The readable summary uses names from Microsoft’s public source to explain the recovered branch.

Percentage implementation · Microsoft’s test cases · Native setup guide

Example 02 · Chrome’s dinosaur game

Find the speed rule. Rebuild it. Change it.

Why does the dinosaur game get faster? Use REA to read the running page’s script, then turn the answer into a game you can adjust.

Example prompt · Dinosaur game

Use REA to inspect this dinosaur game. Why does it get faster? Show the speed rule, then build a small version with an adjustable speed.

Inspected target: wayou’s Chromium-derived browser edition.

REA · loaded index.js · selected lines
if (this.currentSpeed < this.config.MAX_SPEED) {
  this.currentSpeed += this.config.ACCELERATION;
}

Start at 6. Add 0.001 each update without a collision, while speed is below 13.

Open the speed lab →

Play the reconstruction

6 → 10 → 13

Original rule: start at 6, then increase toward 13.

Move the slider to set your own speed. Space or Jump clears a cactus.

From the running game to a new version

  1. 01 · InspectREA returns the loaded scriptThe agent reads the update function and its speed settings.
  2. 02 · RebuildUse the recovered ruleStart at 6 and add 0.001 while speed is below 13.
  3. 03 · Change and playMake speed adjustableKeep the original acceleration, or choose your own pace.
See the script, checks and how to try the analysis

REA inspected the HTTP browser edition through a local debugging connection and returned the loaded index.js, including its source and digest.

Selected settings from the inspected script
ACCELERATION: 0.001,
MAX_SPEED: 13,
SPEED: 6

We called the original game’s update function in a controlled browser check, with obstacles and automatic scheduling disabled. After 4,000 updates, speed was 10.0; after 10,000, it was 13.0, rounded to one decimal.

The new mini-game keeps that speed rule. Its drawing, jumping and collision code are a small teaching implementation. Open the lab to see the new code and run the same speed check.

To inspect the target yourself, follow the browser connection steps using the dinosaur page. Give your agent that page URL and your local debugging endpoint, then copy the prompt above.

Inspected speed code · Chromium Authors · BSD license

Your first investigation

Try REA on a small app.

Download our Notes example, trace its CSV export, and check one changed input.

Try the guided example

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 guide

JavaScript & Electron

Map modules, routes, IPC and native dependencies from an application folder or ASAR archive.

Application workflows

Browser & runtime activity

Capture selected browser or process activity, then compare the results across runs.

Browser observation guide

Case 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.

Follow the investigation

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 bridge

Clipboard IPC channel

Preload · send
invokerInMain(
  "notion:clipboard:write"
)
Main process · receive
addListener(
  "notion:clipboard:write",
  handler
)
Matching names give the investigation a path to follow.

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 calculation

Fixed and aimed rings

TH04's fixed and aimed 16-bullet rings side by side. The first bullet is highlighted in blue; adding the player direction rotates every bullet while preserving the spacing.
Adding the player's direction rotates every bullet by the same angle.

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 solution

One check reveals one character

From REA's code and data
Mask: skip 21, select 1, skip 14
Target: 55

code[21] = 55  →  '7'
Each mask selects characters whose codes must add up to a stored number. This one selects a single character.

What would you like to understand?

Connect REA to your coding agent, or run your first analysis from the terminal.

Get started

Top