Essay · Draft for review

Does reverse engineering need a bigger model?

By N0zoM1z0 · 13 October 2026

Takeaway

  • Model capability changes the hypotheses an agent can find. Later sessions have opened functions that earlier work left unresolved.
  • A familiar compiler gives specialization something concrete to learn. Some exact matches depend on narrow, reusable source patterns.
  • Give repository knowledge a fair comparison. A smaller model with good retrieval may already know enough to make progress.
  • Train the next useful experiment, and test its oracle. The value of feedback depends on what the checker actually verifies.
  • Measure accepted reconstruction against time and cost. That is the result I want from the whole agent.

What better models changed

Since August 2026, I have been exploring how much reverse engineering an agent can carry out with access to a program and a way to check its work. Most of my experience comes from reconstructing games, especially Touhou. As I have changed models, the repositories have kept a record of what each session managed to recover.

Much of that work aims at exact reconstruction: we compile the maintained source under a pinned historical toolchain and check whether it reproduces the target function. That gives us something concrete to examine when a later model closes a function that earlier work left unresolved. The source changes show what made the breakthrough possible.

The temporary values had to stay alive together

In one TH09 attack function, much of the logic was already in place, but the compiled candidate remained a byte short. Although its stack frame had the right size, three temporary vectors occupied different slots from the original. Matching the overall size of the workspace had concealed a difference inside it.

A GPT-6-Sol checkpoint recorded this mismatch after testing several ordinary source arrangements. When GPT-6.1-Sol returned to the problem, it found a useful hypothesis about how long those temporary values needed to stay alive.

Each vector was returned from a calculation and copied into an animation's position. Because C++ keeps a returned temporary alive until the end of the expression using it, grouping the real operations into one expression kept the three values alive together. The compiler could no longer reuse the same storage for all of them.

That recovered the distinct temporary slots, but one still shared storage with a real collision workspace used later. Keeping that workspace at function scope separated it from the returned values. With both changes in place, the seventh targeted candidate in the closing session matched. A cold build confirmed the complete 1,436-byte function and all 44 encoded fields.

What interests me is how the discovery and the tests worked together. The lifetime hypothesis gave the agent a new direction; compiler feedback helped it refine that hypothesis into a source arrangement that matched.

A different control-flow graph

A second TH09 function shows why that new direction can matter. Here, the obstacle was how several branches shared their final work. GPT-6.1-Sol's earlier work reproduced two diagnostic regions, yet the complete candidate remained 1,510 bytes against a 1,491-byte target. Those matching regions did not resolve the way the branches joined up.

GPT-6-Astra changed the surrounding control-flow graph, making completion and frame processing complementary branches followed by one common frame increment and return. Once the compiler saw the branches in that context, it produced the required block sharing. The entire 1,491-byte function matched, and a recompile replay was accepted.

Changing the representation opened a more productive search space. Both cases give me a reason to take general model capability seriously: an agent can keep trying local variations for a long time before finding a better way to express the surrounding work.

At the same time, the later sessions started with earlier source and recorded failures. That accumulated work was part of their advantage. The history lets us inspect the discoveries and their checks; a controlled comparison would help separate the effect of the model from the experience it inherited.

This is where the question becomes interesting to me. Some of the progress came from finding a new representation, while much of the remaining work involved testing source forms against a familiar compiler. How much needs broad reasoning ability, and how much could a model learn through repeated experience with that compiler and code?

Why might a specialist do well?

Touhou gives us a concrete reason to expect that experience to help. Much of the game code comes from the same author, ZUN, so recurring habits are a reasonable starting assumption. The repositories back that up with useful examples: related loops and helper arrangements have supplied hypotheses across games.

Those source patterns become more specific when we include the compiler. Under a particular version and set of options, small changes in source can produce repeatable differences in machine code. Some of those differences are surprisingly obscure.

In TH095, for example, even the identifier backing a real local variable could change where VC7.1 put it on the stack. Moving the declaration alone did not solve the layout, but an earlier background function had exposed a useful identifier bucket. That gave us a more promising hypothesis for the reconstruction of Supervisor::LoadDat.

Reusing the known backing identifier for the real file-size variable put it and the character buffer in the required homes, without changing the buffer's genuine 128-byte size. With that layout, all 151 bytes of the function and its 15 relocations matched.

This is the sort of narrow detail a general model may not know when it arrives. A specialist trained on this compiler could encounter many such cases and learn which source variations are worth testing first.

The opportunity is especially clear in final matching problems where we already understand the behavior. We are then asking which ordinary source form this compiler turns into the observed instructions. Specialization could help the model propose those forms more efficiently, while the target still determines which hypotheses survive.

The useful patterns would have to retain their context, though. TH08 uses VC7, while TH095 and TH09 use VC7.1. TH04's segmented DOS environment uses Turbo C++, and its player reconstruction needed a different set of lifetime and linker-order hypotheses. Shared authorship gives us a prior, but each target tells us whether it applies. Distinguishing those contexts is part of what a specialist would need to learn.

Where should that experience live?

Before deciding to teach those patterns through model training, I would look at the knowledge we already keep in the repository. In the previous essay, I wrote about it becoming the project's working memory. That memory includes compiler lessons, along with the source and failed experiments that made them useful.

By retrieving that record, an agent can start with a known result and inspect how we reached it. It can also avoid alternatives that have already failed in the same context. The starting point improves without changing the model's weights.

For the 373-byte TH09 enemy-spawn function, a GPT-6-Luna-max session drew a hypothesis from TH08's corresponding source family. That earlier source suggested an ordinary loop with branch-local failure handling. TH09's own evidence supplied the bounds and calls, and two cold builds confirmed the complete match.

“The model did not know that compiler quirk” and “the model could not use it” are different problems. Retrieval may solve the first, but turning that fact into a useful candidate still takes work. And if the candidate fails, the model must decide what the result means for its next attempt. Knowing the relevant pattern is only the beginning of that process.

For that reason, I would include a smaller general model with good retrieval in any comparison. Giving it the same library of experience would help us identify what training adds: better candidate generation, better decisions after feedback, or both.

Learning the next useful experiment

Those decisions after feedback are what I would most like to study. In agentic reconstruction, the model proposes an explanation and tests it against the program. Even when the candidate fails, the result can narrow the remaining possibilities and suggest a more useful next experiment.

Consider the temporary-vector example again. Its final source shows the arrangement that worked, but the route to that source contains more information. Each of the following experiments helped identify what still needed to change.

Experiment What its result taught us
Use a typed position assignment The copy behavior improves, but the compiled source still differs.
Consume the returned vectors directly The function reaches the target size. Temporary storage remains wrong.
Group the real operations into one full expression The returned values remain alive together.
Keep the real collision workspace separate The complete function matches in a cold build.

Selected steps from the recorded Type18/24 search. The closing session tested seven candidates; this table groups the lessons.

A training record that keeps this sequence can teach more than the final source alone. It connects each proposed change to an observed result and the next decision. Keeping ineffective variations matters too: they tell a later agent which hypotheses have already been tested in that context.

I would want the model to learn how to use feedback. A neutral result is a reason to reconsider the variation; a changed mismatch may point to another cause. When local edits stop being informative, the agent should be able to revisit the source representation or inspect the evidence again.

Learning to make those choices requires autonomy. Sometimes the useful next step is inspecting another caller rather than compiling another edit. A rigid sequence of required rewrites would remove that choice, along with part of the behavior we want the model to learn.

Why RE is interesting for reinforcement learning

Bounded reconstruction gives us a practical environment for studying these choices. Once the target and compiler are pinned, many source experiments produce quick, repeatable feedback. The agent can compile a candidate, inspect the mismatch and use that observation to choose its next step.

Reinforcement learning could train that decision-making process through the feedback it receives. A candidate accepted by a defined check gives us a concrete outcome, while the sequence of attempts lets us observe how much work it took to reach it.

There is already research supporting this direction. LLM4Decompile studies models specialized for decompilation. AutoDecompiler trains multi-turn refinement using compiler and execution feedback. Their studies focus on functional recovery. For this work, I would use them as a starting point for the related task of finding source that matches a historical compiler's output.

To reach such a well-defined task, though, we may first need to establish what a function owns or devise a new runtime measurement. In TH08, for example, a later collision divergence led back to a one-ULP numerical difference and the old x87 behavior. Before the agent could test a useful correction, it had to work out what to measure.

This suggests another role for a broadly capable model: helping make the problem checkable in the first place. Once that check exists, we can investigate how far a learned search policy can get with it.

When the oracle is wrong

Once we train against that check, its coverage becomes part of what the model learns. I call the reference or checker an oracle. Even if it gives a repeatable answer, we still need to understand what that answer covers.

TH08 showed how much can hide outside that coverage. Some reconstructed functions passed their exact comparisons with wrong floating constants. The comparator adjusted relocated addresses before checking instructions, but it checked the values behind those addresses only when they had been explicitly recorded for verification. Other literal references could pass without their values being examined.

To close that gap, a wider audit examined all 1,548 floating-literal references. It corrected twelve stale rows across five accepted functions, including a bullet-spread increment of 1.0f where the target required 32.0f.

A learner rewarded by the old check could learn to produce the wrong reconstruction. We had not trained an RL model against this oracle; the observed failure was in the check itself. But using that check as a reward would have made the same blind spot part of the learning environment.

A functional test can have a similar blind spot. Differential-fuzzing research on LLM decompilers has found behavior differences beyond the supplied tests. Passing those tests therefore needs to be read in terms of the cases they exercise, just as an instruction match needs to be read in terms of the bytes and data it checks.

Before using either kind of check as a reward, I would test it with deliberate failures. I would also keep final acceptance outside the candidate's editable source, so the model has to satisfy the check through its reconstruction. Otherwise, something like a byte array copied from the target could satisfy a naive score without recovering useful source.

Improving the learner and improving its oracle belong to the same research problem. As the learner gets better at optimizing the feedback we give it, understanding that feedback becomes more important too.

A comparison worth running

With those checks in place, I would start the comparison on a fixed VC7.1 task family. First, I would establish baselines for a strong general model and a smaller one. Adding repository knowledge to the smaller model would show what retrieval changes. From there, supervised specialization and an RL-trained version would let us examine what training adds.

To make those comparisons informative, each model would receive the same target evidence and tools. For the training-specific comparisons, I would keep the base model and available knowledge fixed as well. Repeated trials would help distinguish a reliable search strategy from a lucky candidate.

I would then separate two starting conditions: reconstructing a function from its instructions, and closing the last few differences in maintained source. A specialist might be excellent at the second task while a general model does much of the work needed to reach it. Measuring them separately would reveal that division of work.

Both tasks need genuinely held-out examples. Because related Touhou games share engine code, holding out a game's name would still allow nearly identical functions to appear in training. I would instead hold out source families and keep their accepted answers out of both training and retrieval.

On those examples, the outcome would be complete, independently validated matches. Giving each model the same candidate or compile budget would help compare search quality. Measuring elapsed time and total cost, including compilation, would tell us whether that quality produces an efficient workflow. Training costs would need their own accounting too.

Both views matter because a cheaper proposal can become an expensive workflow if it causes more uninformative compiles. Conversely, a slower model may pay for itself by finding a useful experiment sooner. The comparison should capture those costs.

Counting accepted results also keeps intermediate progress in perspective. One TH09 replay-save candidate already had the target's 1,825-byte length, yet 467 byte positions differed. Even a byte-difference count can change abruptly when a branch encoding changes. Such diagnostics can guide the next experiment, but I would validate any reward for “getting closer” against the full acceptance check.

I would be interested in the pattern across these results. If a specialist does well within a familiar compiler family, does that advantage survive a toolchain change? And once both models have good retrieval, how much does training still add? The answers would help us decide where each kind of model is most useful.

What kind of agent does this suggest?

If the models turn out to help at different stages, a useful arrangement might be a broad agent with access to a specialist. Once a task becomes a familiar compiler search, it could ask the specialist for candidates. If the results stop making sense, the broader agent could return to the target evidence or investigate the measurement itself.

In that arrangement, specialization becomes a tool the agent can choose as the investigation develops. The agent keeps the freedom to change direction that made the earlier breakthroughs possible.

This follows naturally from the industrial shift I described in the previous essay. Being able to run many more experiments changes how we organize the work. It also gives us a reason to ask which decisions need broad judgment and which improve through repeated experience with a particular craft.

For now, the strongest general model has earned its place in my workflow by opening problems I had left unresolved. Those successes are what make me want to examine the work more closely: how much depended on the model's breadth, and how much could be handled by a model trained in this particular kind of reconstruction?

The repositories give us a way to test the question. I would like to use that record to build the comparison and see what we learn.

Evidence and model attribution

The examples describe historical reconstruction checks recorded in public commits. Their byte counts apply to the stated functions, not whole-game runtime correctness. Source and matching records were reviewed on 13 October 2026.

The TH09 label gpt-dots identifies GPT-6-Astra. gpt-web changed with the model used at the time, so that label alone does not identify an individual run. Explicit model names in the other cited commits establish their recorded attribution; the histories do not contain uniform per-run cost or effort measurements.

The proposed specialist and RL comparisons are future experiments. The project histories motivate them; no trained specialist was evaluated for this essay.

Top