About
The shipped program, recovered as source that builds.
Redivivus is Latin for a thing restored to life. Not a reimplementation that behaves like Diablo II: the 1.14d Game.exe, taken apart function by function, turned back into C++, and compiled into a working executable again.
01The same idea as Devilution
Devilution did this for the first Diablo: it reconstructed the shipped Diablo.exe as source that builds, and DevilutionX grew from it into the port many people play Diablo with today. Redivivus is the same idea for Diablo II. Two things differ.
- The evidence
- Devilution could lean on debug symbols left on a PlayStation release for many of its names and types. No such symbols exist for 1.14d, so every name, type and structure here was reverse-engineered, cross-checked where possible against the game's own assert messages and against the Mac build.
- The target
- Devilution worked toward a binary that matches the original byte for byte. Redivivus aims first for one that behaves like the original; byte-matching individual functions comes after. Where that stands
02How it was made
It started in 2021, well before large language models were any use for this work. The reverse-engineering of 1.14d, naming, typing and understanding the code, was done by hand over years.
Once LLMs became usable for it they sped the work up considerably: proposing types, chasing crashes, building the tooling below. They joined an existing project; they did not start it.
- Reverse-engineerThe 1.14d
Game.exein Ghidra: every function named, typed and given its calling convention; every global given a type and an extent. - Regenerateghidra-reconstruct pulls the decompilation through ghidra-mcp, parses it into a C++ syntax tree, undoes the decompiler's artifacts and emits the tree.
- Build, run, traceEvery crash is traced to its cause and fixed where it belongs: usually in the Ghidra database, sometimes in the generator, rarely by hand in the source.
Building and running · Building with the original compilers, Visual C++ 2005 SP1 and Apple LLVM 4.2 →
03Contributing
Most of the tree is regenerated, so a fix that belongs in the reverse-engineering (a wrong type, a missing parameter) goes into the Ghidra database as a proposal. It survives every regeneration after it.
- ConnectGive your agent one line (onboard your agent). It adds the read-only MCP server; sign-in is with GitHub.
- ReadBoth databases:
win, 1.14dGame.exeand the ground truth, andmac. Read the house rules and the Ghidra traps first. - ProposeOne claim per proposal: up to 250 edits applied all-or-nothing, so a bulk sweep fits in one, each with the value you saw and evidence a reviewer can re-check. It is checked live at once.
- ReviewThe maintainer approves or rejects it, with a comment.
proposal_statusfollows it. - AppliedOne Ghidra transaction and one regeneration commit, with you as the git author.
- What can be proposed
- Names of functions, globals, variables and struct fields; types of variables, globals and fields; prototypes and calling conventions. Only default names (
FUN_*,DAT_*,param_N, ...) are renamed. - What counts as evidence
- An xref, a call site, the Mac counterpart, an assert string, a field access, each by address and each verified. "It looks like" is not evidence.
- Code and crashes
- Changes to hand-written code as pull requests or patches against a release tag. Crashes as an issue with the
d2crash-*.txtreport attached.
All proposals → · questions on Discord
04Future ideas
Other Diablo II code is known to exist and could be recovered the same way.
- D2Server
- The game-server module that hosted closed Battle.net games. Recovered as source, it would give a realm game server built from the same code as the game itself.
- The Mac build
- It carries code the Windows executable never had, most visibly an OpenGL renderer. D2OpenGL already brings that renderer to 1.14d on Windows.
05Credits
- Much of the 1.14d reverse-engineering comes from blizzhackers, dzik in particular.
- The byte-match oracle in
asm_matching/is Niehztog's, and Nugwa628 found many of the difference classes it measures. - D2MOO supplied many of the structure layouts this work started from in 2021, though it went another direction since.