spore-decomp

Spore, rebuilt byte for byte

Every function of Spore's SporeApp.exe (2008, PC) rewritten as readable C++ that compiles, with the original compilers, to exactly the machine code that shipped. Almost right counts as zero.

Spore and Galactic Adventures are effectively one program. The current PC release (Steam and GOG) ships one executable for each, built from the same source with the same compilers: 99.75% of Spore's functions are byte-identical in Galactic Adventures, which adds about 1% of different code. Every function rebuilt here counts for both games.

29.2%of the code, by bytes
65,772of 89,229 functions byte-exact
4.32 MBof 14.78 MB rebuilt
35.3%matching, proven or tested (953 + 2,981 more functions)
matching (byte-exact) 29.2%proven equivalent 0.8%tested 5.3%not yet

These numbers are Spore's own code. The open-source libraries the game links (zlib, libpng, libjpeg, expat, OpenSSL and EA's published libraries) are counted apart: they are rebuilt by compiling their published sources, which recovers none of Spore's code. 1,292 of their 1,370 functions (94.6% of 306 KB) are rebuilt so far.

See every function on the map of the program, and watch it fill in.

Bytes are the honest measure: most of what remains is in large functions. Every count here is checked against retail fingerprints by the pull-request check; nothing is counted on trust. "Proven equivalent" functions compile to different bytes that a machine-checked proof shows behave identically to the original for every input. "Tested" functions passed a randomized test sweep: run side by side with the original on random inputs until every branch had run, with identical results. That is strong evidence, not a proof. Both stay open until someone makes them byte-exact.

Over time

0%25%50%75%100%Oct 3Oct 11Oct 19Oct 27Nov 4Nov 12Nov 2073.7% matching, functions35.3% + tested30.0% + proven29.2% matching, bytes

Matching share at the end of each day (solid: bytes, dashed: functions), with proven and tested stacked above it by bytes. The drop on Nov 9 is the pull-request fingerprint check arriving: 1,093 earlier matches that fail it from a clean checkout were set aside.

By function size

sizefunctions doneofbytes doneshare
0-63 bytes45,38347,4381.21 MB95%
64-255 bytes18,46728,5321.97 MB58%
256-1023 bytes1,70910,782702 KB14%
1024-4095 bytes1902,260347 KB9%
4096+ bytes23217119 KB9%

By module

modulebyte-exact (bytes)functionscode
SPGonzago
26%23,403 / 32,1595.42 MB
SPEngine
20%3,502 / 6,2421.58 MB
UTFSpore_Win32
30%4,213 / 7,1161.42 MB
SPEditors
29%3,917 / 5,7491.30 MB
SPBake
34%1,411 / 2,198971 KB
Compiler-generated code
99%21,841 / 22,205920 KB
Havok
10%994 / 2,125683 KB
SPCreatureAnim
15%622 / 1,325455 KB
SPTerrain
14%435 / 917425 KB
SPAudio
35%1,567 / 2,361366 KB
Open-source libraries
95%1,292 / 1,370306 KB
EA sound library
11%443 / 1,063286 KB
Swarm
16%474 / 885275 KB
Spui
29%1,148 / 1,696263 KB
Native Release
10%372 / 915163 KB
SPMovie
24%215 / 36268 KB
dll_obj
17%41 / 976,810 B
SporeApp
22%12 / 195,309 B
Not yet attributed
29%1,162 / 1,795307 KB

Modules are EA's own top-level source directories from the development build. "Compiler-generated code" is the glue the compiler emits for every source file (initializers and destructors of global objects, exception-handling stubs); "Open-source libraries" are the published libraries the game links. "Not yet attributed" is code whose module is not known yet, most of it added with Galactic Adventures after the development build the module map comes from.

Contributors

contributorpull requestsfunctionsbytesmade readable*
supercid87482,578196,4860
turtnip391,335145,3820
NoahBPeterson4155866,4894
davurphy6968865,5360
tricko3D320059,3390
MugenMan13235530,3160
ThijnBr2201,4140

Recent pull requests

pull requestmergedbyfunctionsbytesmade readable*model or tool
#5612026-11-21turtnip101,4390Claude Opus 5.5
#5602026-11-21turtnip6811,0870Claude Opus 5.5
#5592026-11-21turtnip8111,5830Claude Opus 5.5
#5582026-11-21turtnip121,2490Claude Opus 5.5
#5562026-11-21turtnip35590Claude Opus 5.5
#5552026-11-21turtnip8011,2500Claude Opus 5.5
#5532026-11-20turtnip808,7300Claude Opus 5.5
#5452026-11-20turtnip807,3270Claude Opus 5.5
#5432026-11-20NoahBPeterson004
#5372026-11-20turtnip806,6120Claude Opus 5.5
#5352026-11-20turtnip809,7580Claude Opus 5.5
#5342026-11-20turtnip778,1210Claude Opus 5.5
#5332026-11-20turtnip817,2470Claude Opus 5.5
#5322026-11-20turtnip786,5320Claude Opus 5.5
#5302026-11-20turtnip806,9500Claude Opus 5.5
#5292026-11-20turtnip817,3740Claude Opus 5.5
#5282026-11-20davurphy33320Three GPT-6.2 Sol workers at low reasoning attem
#5272026-11-20turtnip785,8660Claude Opus 5.5 (Claude Code): four parallel sub
#5262026-11-20davurphy68820Three GPT-6.2 Sol workers at low reasoning attem
#5252026-11-20NoahBPeterson1560Claude Opus 5.5
#5232026-11-20davurphy78230Codex with GPT-6.2 Sol agents.
#5222026-11-20turtnip758,4620Claude Opus 5.5 (Claude Code): four parallel sub
#5162026-11-20turtnip817,5710Claude Opus 5.5 (Claude Code): four parallel sub
#5112026-11-19turtnip497,8690Claude Opus 5.5 (Claude Code): ten parallel suba
#5102026-11-19turtnip212,5700Claude Opus 5.5 (Claude Code): five parallel sub

Counted from pull requests merged since contributions opened (November 2026). Most earlier work was done by the maintainer's own agent runs. *"Made readable": byte-exact functions a pull request made easier to read without changing their bytes: it removed byte offsets (pointer casts plus a number, such as *(int*)(p + 8), where the code should name a member), or it gave a function whose bytes a generated match already reproduced with another function's source its own source, with the right calls and globals. More measures may be added. These count here, not as new functions.

Help

Hundreds of functions are only a few bytes from a match. Start here.