{"slug": "rea-reverse-engineer-anything", "title": "REA Reverse – Engineer Anything", "summary": "REA, a reverse-engineering tool for coding agents, launched with an npx rea-agents@latest setup command that connects it to an agent so the agent can inspect a running program and explain its behavior. In two worked examples, REA recovered the Chrome dinosaur game's speed rule (start speed 6, ACCELERATION 0.001 per update, MAX_SPEED 13, reaching 10.0 after 4,000 updates and 13.0 after 10,000) and Windows Calculator's % button logic, where 200 + 10% returns 220 because one branch divides by 100 while the other also multiplies by the first number.", "body_md": "Reverse engineering, with your coding agent\n\n# Find out how\n\nsoftware works.\n\nREA gives your agent the tools to inspect a program and explain what it does.\n\n              Already know RE?\n              [Skip to analysis guides →](#analysis-guides)\n\n## Set up REA\n\nCopy this into your coding agent:\n\nInstall 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.\n\n```\nnpx rea-agents@latest setup\n\n```\n\n## What is reverse engineering?\n\n              Finding out how software works by\n              **examining the program itself.**\n\nThe goal: understand a feature well enough to explain it, change it or rebuild it.\n\n            One question:\n            **why does Calculator give 220 for 200 + 10%?**\n\n**Let's try two examples.**\n            Change a game's speed, then return to Calculator and rebuild its %\n            button.\n          \n\nExample 01 · Chrome’s dinosaur game\n\n## Why does the dinosaur get faster?\n\n- Goal\n- Rebuild the game with adjustable speed.\n- Why reverse engineer it?\n- \n                To reproduce its acceleration, we need\n                **the rule in the running game** : how fast it\n                starts, how much it increases and when it stops.\n\nREA returned\n\n**The script actually running in the page.** The\n                  agent reads its update function and speed settings, then uses\n                  that rule in a new game.\n                \n\nUse REA to inspect this dinosaur game. Why does it get faster? Show the speed rule, then build a small version with an adjustable speed.\n\n```\nif (this.currentSpeed < this.config.MAX_SPEED) {\n  this.currentSpeed += this.config.ACCELERATION;\n}\n```\n\n**Start at 6.** Add **0.001** each\n                update without a collision, while speed is below\n                **13**.\n              \n\n[Open the speed lab →](examples/dino-lab/)\n\n## See the script, checks and how to try the analysis\n\n              REA inspected the HTTP browser edition through a local debugging\n              connection and returned the loaded `index.js`,\n              including its source and digest.\n            \n\n```\nACCELERATION: 0.001,\nMAX_SPEED: 13,\nSPEED: 6\n```\n\nWe 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.\n\n              The new mini-game keeps that speed rule. Its drawing, jumping and\n              collision code are a small teaching implementation.\n              [Open the lab](examples/dino-lab/) to see the new code\n              and run the same speed check.\n            \n\n              To inspect the target yourself, follow the\n              [browser connection steps](guides/browser/#prepare)\n              using\n              [the dinosaur page](https://wayou.github.io/t-rex-runner/). Give your agent that page URL and your local debugging\n              endpoint, then copy the prompt above.\n            \n\nExample 02 · Windows Calculator\n\n## Rebuild Calculator’s % button.\n\n              We saw why **200 + 10% gives 220.** Now let’s recover\n              the rules for both + and ×, and try them.\n            \n\n- Goal\n- Build a small calculator that handles both + and × correctly.\n- Why reverse engineer it?\n- \n                The same button uses\n                **different rules after + and ×.** We inspect the\n                installed app to find which number the percentage is applied to.\n\nREA returned\n\n**One branch divides by 100. The other also multiplies by the\n                    first number.**\n                  The agent uses both to recreate the % button.\n                \n\n                For this example, `previous = 200` and\n                `current = 10`.\n              \n\nUse REA to inspect Windows Calculator’s % button. Recover the rules after + and ×, then build a small calculator that uses both.\n\n```\nif (operation == multiply || operation == divide) {\n  percent = current / 100;\n} else {\n  percent = current * previous / 100;\n}\n```\n\n- With +\n- \n**Take 10% of the first number.**`10% of 200 = 20 → 200 + 20 = 220`\n- With ×\n- \n**Turn 10% into 0.1.**`200 × 0.1 = 20`\n\n## See the real code and how the answer was checked\n\n```\n0x180124945: MOV EAX, dword ptr [R13 + 0x18]\n0x180124949: CMP EAX, 0x5c\n0x18012494c: JZ 0x180124aba\n0x180124952: CMP EAX, 0x5b\n0x180124955: JZ 0x180124aba\n0x18012495b: MOV EDX, 0x64\n#define IDC_MUL 92      // 0x5c\n#define IDC_DIV 91      // 0x5b\n#define IDC_PERCENT 118 // 0x76\n\n0x64 = 100\n```\n\nYour first investigation\n\n## Try REA on a small app.\n\nDownload our Notes example, trace its CSV export, and check one changed input.\n\n[Try the guided example](first-investigation/)\n\n## Want to go deeper?\n\n              Tell your agent what you want to understand or build. With REA,\n              you can work together on anything from\n              **cloning this website** to\n              **reconstructing a game from its executable.**\n\nUse REA to inspect https://rea.tools/. Clone this website for me.\n\nUse REA to reconstruct this game from its executable. Recover the gameplay logic in C and test it against the original.\n\n### Native binaries\n\nInspect functions, strings, references and call relationships in executables and libraries.\n\n[Native analysis guide](guides/native/)\n\n### JavaScript & Electron\n\nMap modules, routes, IPC and native dependencies from an application folder or ASAR archive.\n\n[Application workflows](guides/javascript/)\n\n### Browser & runtime activity\n\nCapture selected browser or process activity, then compare the results across runs.\n\n[Browser observation guide](guides/browser/)\n\n## Any questions?\n\n[Read the FAQ](faq/),\n            [chat with us on Discord](https://discord.gg/GkcryMnJDM),\n            or\n            [open a GitHub issue](https://github.com/morluto/rea/issues/new/choose)\n            for bugs and feature requests.", "url": "https://wpnews.pro/news/rea-reverse-engineer-anything", "canonical_source": "https://rea.tools/", "published_at": "2026-10-10 00:37:07+00:00", "updated_at": "2026-10-10 00:55:57.091326+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["REA", "Chrome dinosaur game", "Windows Calculator", "npx rea-agents"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/rea-reverse-engineer-anything", "markdown": "https://wpnews.pro/news/rea-reverse-engineer-anything.md", "text": "https://wpnews.pro/news/rea-reverse-engineer-anything.txt", "jsonld": "https://wpnews.pro/news/rea-reverse-engineer-anything.jsonld"}}