How to Reverse Engineer Anything (REA) — Powered by AI
Reverse engineer apps, binaries and browser behavior with your coding agent.
How to use REA: REA (rea-agents by morluto) is the premier reverse engineering agent and MCP server connecting coding agents—Claude Code, Cursor, Windsurf—to application runtimes. Reverse engineer apps, binaries and browser behavior with your coding agent: unpack Electron desktop bundles, intercept network APIs, and decompile Mach-O/ELF binaries without reading 3,000-page assembly manuals.
The Zero-to-Hero Path: Flattening the Security Barrier with AI
Traditional tutorials force you to memorize 500 x86 opcodes before inspecting a single app. How to REA reverses the order: start with high-level software you already use, and let AI translate the deep technical layers as you advance.
Electron & Web Apps (.asar)
Unpack real desktop applications (Notion, Slack). Let Claude search minified JS bundles, trace IPC messages, and extract hidden APIs in 5 minutes.
Mobile APKs & HTTPS APIs
Decompile Android APKs to readable Java with JADX, and decrypt HTTPS traffic with mitmproxy. Let AI map API contracts without writing packet parsers.
Native Binaries & Hopper/Ghidra
Connect native disassemblers to Claude via MCP. AI translates obscure machine assembly and basic blocks into verified clean-room TypeScript and Rust.
From Obscure Assembly to Plain English & Clean Code
Here is what happens when REA connects your AI coding agent (Claude Code / Cursor) to a disassembler. What once took hours of manual register tracking is translated into plain human reasoning and verified code in seconds:
The output of traditional decompilers that makes 95% of beginners quit:
push rbp mov rbp, rsp mov DWORD PTR [rbp-0x14], edi cmp DWORD PTR [rbp-0x14], 0x0 jle 0x100003f48 imul eax, DWORD PTR [rbp-0x14], 0x4e20 cdq idiv DWORD PTR [rbp-0x18] sub eax, 0x2710
Claude translates the mathematical assembly logic into clear human concepts:
<strong>Context:</strong> This is a sound position calculation from the game DX-Ball.
<strong>Logic:</strong> Takes the ball's X coordinate and screen width. Multiplies by 20,000, divides by screen width, and subtracts 10,000.
<strong>Outcome:</strong> Normalizes audio stereo pan to an exact range of -10,000 (left speaker) to +10,000 (right speaker).
Synthesized standalone code that passes 3,205 original unit tests:
// Verified Clean-Room TypeScript
export function calculateSoundPan(
ballX: number,
screenWidth: number
): number {
if (screenWidth <= 0) return 0;
const raw = Math.floor(
(ballX * 20000) / screenWidth
) - 10000;
return Math.max(-10000, Math.min(10000, raw));
}01.3-Minute Quickstart
Configure your AI coding agent (Claude Code, Cursor, Codex) in one automated step using the official setup script:
npx rea-agents setupOr run direct terminal inspection on any JavaScript / Electron application or native binary:
# Inspect an Electron or JavaScript app directory/ASAR
npx -y rea-agents@latest analyze-javascript-application /path/to/app --json
# Or install globally for regular use
npm install --global rea-agents
rea --help02. What You Can Analyze with REA
REA connects your AI agent directly to 12 distinct reverse engineering target categories. Select your target below to view what REA extracts, the matching CLI command, and the step-by-step tutorial:
Extracts <code>app.asar</code> modules, unminifies webpack bundles, maps renderer-preload-main IPC channels, and recovers API endpoints without running the app.
Recovers structured C pseudocode, symbols, function dossiers, and cross-references (xrefs) across ARM64, x86_64, and MIPS without JVM lag.
Decodes <code>global-metadata.dat</code> (v24-v39), links method tokens directly to <code>GameAssembly.dll</code>/<code>libil2cpp.so</code>, and exports Ghidra seeds.
Decompiles Dalvik/ART DEX bytecode into structured Java/Kotlin, parses AndroidManifest components, and captures live device logs and process memory via ADB.
Unpacks standalone executables without execution: extracts PyInstaller CArchive/PYZ into CPython <code>.pyc</code>, dumps Godot <code>.pck</code> assets, and unpacks Node.js SEA blobs.
Statically inspects .NET PE/CLI metadata, decodes Common Intermediate Language (CIL) instructions, maps P/Invoke native DLL boundaries, and diffs builds.
Parses HAR files and live mitmproxy traffic: correlates REST endpoints, decodes WebSocket frames and Protobuf bodies, and synthesizes clean client SDKs.
Observes live DOM trees, scripts, sourcemaps, and network flows over Chrome DevTools Protocol (CDP) loopback without triggering client-side anti-debugging traps.
Recovers 16-bit real-mode PC-98 and MS-DOS executables: reconstructs mathematical game physics and sprite algorithms into modern verified C++.
Scans binary ROMs for magic headers, extracts SquashFS/CramFS/JFFS2 partitions, identifies kernel boundaries, and feeds ARM/MIPS binaries into decompilers.
Deconstructs deployed unverified Ethereum/Base bytecode: extracts 4-byte dispatch selectors, infers argument types, and audits storage mutability.
Extracts terminating signals, register states, stack pointer corruptions, and memory mapping candidates across all threads from ELF core dump notes.
03. How REA Actually Works: The 5-Step Execution Flow
Most developers wonder: what happens between typing a prompt into Claude or Cursor and getting back clean, working code? Here is the exact end-to-end trace of a real-world REA investigation on an Electron application or native binary:
You run <code>npx rea-agents setup</code> in your terminal. REA automatically detects your installed coding agents (Claude Code, Cursor, Windsurf), writes the Model Context Protocol (MCP) server configuration to their config files (e.g. <code>claude_desktop_config.json</code> or <code>.cursor/mcp.json</code>), and registers native tool endpoints.
npx rea-agents setup
Inside your normal coding agent window (Cursor Composer or Claude Code CLI), you ask in plain English without writing any reverse engineering scripts:
Traditional tools extract 25,000 files to disk (1.2GB). REA never touches disk: it reads the ASAR header table in-memory, maps the Webpack module graph, and locates IPC channels instantly:
// REA returns structured JSON evidence directly over MCP stdio:
{
"target": "Notion.app",
"ipc_channels": [
{
"channel": "notion:clipboard:serialize",
"direction": "renderer -> main",
"source_module": "modules/preload/clipboard.js",
"evidence_id": "ev_4f19b2"
}
]
}Raw application traces exceed 300MB, which would instantly choke Claude's context window. REA's Evidence Projection engine (<code>rea inspect-analysis-view</code>) strips away boilerplate and projects a dense 10KB semantic slice containing only the verified logic path.
The AI agent reads the verified Evidence slice and synthesizes standalone, production-ready TypeScript or Rust code that faithfully reproduces the feature without containing any copyrighted proprietary bytecode:
// Synthesized Clean-Room TypeScript (Zero proprietary bytecode)
export interface NotionClipboardPayload {
version: number;
richTextXml: string;
plainText: string;
sourceBlockId: string;
}
export function parseNotionClipboard(raw: string): NotionClipboardPayload {
// Reconstructed according to Evidence ev_4f19b2
const [header, body] = raw.split("::");
return JSON.parse(body);
}04.Runtime Architecture Model
REA operates through a decoupled dual-ring architecture: the CLI probe handles sandboxed system-level extraction (Ghidra, Hopper, ASAR), while the Model Context Protocol (MCP) server exposes standardized <code>tools/call</code> endpoints to AI coding agents over stdio JSON-RPC. The agent queries xrefs, basic blocks, and IPC schemas on demand rather than ingesting entire binary dumps.
+-------------------------------------------------------------+
| AI Agent Client (Claude / Cursor) |
+-------------------------------------------------------------+
|
[JSON-RPC via stdio / SSE]
v
+-------------------------------------------------------------+
| REA MCP Server Service |
+-------------------------------------------------------------+
| | |
v v v
[Electron Unpacker] [Native Symbol Probe] [Network Schema Sniffer]
| | |
v v v
app.asar JS Bundle Mach-O / PE Exports Private WebSocket API