Engineering / reverse-engineering
Reverse engineer opaque software toward a stated goal, from console ROMs and disc images to installed PC and mobile games, native or managed binaries, firmware, file and save formats, network protocols, and undocumented APIs, looping locate, understand, implement, and prove until a differential test against the original passes.
Drive one reverse engineering goal to proven completion, on any target from a cartridge ROM or disc image to an installed PC game, an engine build, a mobile app, firmware, a file format, or a protocol. The running original is the only authority. Your memory, a decompiler's guess, a wiki, and a user's report are leads until an experiment on the pinned target confirms them. A loop ends in evidence, never in "looks right".
Run phases 0 and 1 once per target. Then repeat phases 2 to 6 for each unit of work (one record, one routine, one message type, one enemy, one file chunk) until the stop rule holds. Load each reference when its phase begins, not before.
| Phase | Do | Exit when | Read |
|---|---|---|---|
| 0. Input | Identify the target class and pin the build by hash and version. Write the goal as an observable acceptance: what must match the original, over which inputs, compared how. Pick the oracle. Confirm authorization and the legal line. | The goal names a check that can fail | Goal, Targets |
| 1. Harness | Make the original controllable before studying it: scripted input, seeded randomness and clock, snapshots or record and replay, memory peek and poke, traces. | Two runs from one state and one script trace identically | Harness |
| 2. Locate | Find where the data or logic lives, cheapest technique first. | Each location has a confidence tier and a re-verify step | Locate |
| 3. Understand | Predict, then observe: poke the location, run, compare with the prediction. Name the routine and the field that do it. | The claim is in the ledger as verified (how) or assumed | Ledger |
| 4. Output | Integrate at the least invasive rung that reaches the goal, through tools that read the target rather than hand-copied values. | Installed but unused, the target runs identically to native | Implement |
| 5. Test | Run the original and yours from the same state and input, aligned on the target's own clock (frame, tick, message). Compare everything and explain each allowed difference. Break your output on purpose and confirm each break fails. | Every spec PASS, every mutation FAIL | Differential |
| 6. Iterate | On FAIL, fix the first divergence at its root, update the ledger, rerun every spec. Keep an attempt only when a fresh oracle run beats the recorded best with no regression; otherwise revert it. On INCONCLUSIVE, fix the harness or the spec, not the output. | The stop rule holds | Pitfalls |
Order the units so each adds one new mechanism. Start with the simplest, which builds the harness. Next take the first unit that draws random numbers, moves, or allocates. Then scale, picking the unit most like ones already solved and handing those over as references. Land each unit as its own commit with its ledger rows, after its specs and masks have landed in a reviewed commit of their own.
Stop when all of these hold for the current build:
Stop early and report when the goal needs a decision only the user can make, or the target or tooling is unavailable. Stop a unit, not the goal, when it spends its attempt budget without improving: report its best result, the approaches tried, the remaining diff, and whether it looks solvable.
State what you verified and how, what you assumed, and what no spec reached (states, inputs, code paths). An unreached path is a finding, not a footnote. Then name the next unit of work. Keep the project's copy of the dashboard current for the humans: rewrite its state block from the ledger and the last oracle run at the end of every iteration (Dashboard).
Index routes the vendored OKF knowledge. Read only the concept the current phase needs: