Skip to content
riyukuro edited this page Nov 8, 2026 · 24 revisions

MS2Recomp

MS2Recomp is a work-in-progress recompilation of the MapleStory 2 client (KMS2 development build, x64, April 2022). Functions recovered from the original executable are rewritten as C++ and compiled into a replacement executable. Most recovered functions match the original machine code byte for byte. The project also builds a development proxy DLL that redirects calls into the recovered code.

The full executable can be built in Visual Studio with the required toolchain and SDKs, without needing the original client executable. The repository does not include the client, game assets, Gamebryo source, or other SDKs; consult the build guide for prerequisites.

Progress

The table below is regenerated on each publish, along with the progress image.

Area Functions Matched Equivalent Done
Game · ms2 176,747 176,600 (99.9%) 142 (0.1%) 100.0%
Runtime & middleware 24,765 24,009 (96.9%) 639 (2.6%) 99.5%
Gamebryo engine 16,881 16,841 (99.8%) 27 (0.2%) 99.9%
Game framework · egf 13,113 13,101 (99.9%) 11 (0.1%) 100.0%
Libraries 6,731 6,372 (94.7%) 22 (0.3%) 95.0%
Foundation 13,065 13,061 (100.0%) 4 (0.0%) 100.0%
Imports 782 780 (99.7%) 1 (0.1%) 99.9%
Total 252,084 250,764 (99.5%) 846 (0.3%) 99.8%

Link aliases: 269 left: 8 /alternatename lines in the no-exe build's data/fullexe/plain/alias.rsp and 261 #pragma comment(linker, "/alternatename:...") lines in 41 source files of the same build. The linker uses an alias to send a call that the recovered code makes under a placeholder name or signature to the real function, or to bind a placeholder data name to the real object. An alias goes away once every user takes the real declaration; the goal is 0. The glue file held 19,884 on 2026-10-31. Part of the drop since then is aliases moved into the sources, not removed, which is why both places are counted.

The totals exclude Nexon Messenger functions, which are stubbed by design. See the repository's README for the full breakdown and notes on functions that are not counted as missing.

Recent fixes that the byte-match checks can't see (merge 72): Knight basic attacks did not hit (an inline view read the wrong flag), the IME's TSF interface IDs were 8 bytes instead of 16, the ASTriggerState vftable had 16 of its 25 slots, four MFC message-map entries were wrong, two WorldService map lookups got the reference count wrong (a leak and an over-release), a fly-by camera copied an uninitialised setting, and three float constants were 1 ULP off.

Recent fixes that the byte-match checks can't see (merge 73): equipping an item crashed the client (sword dragged onto the Character window), the Merat market search read its job and sort values from each other's keys, the tooltip texts stayed stale after a string reload, a failed Razer Chroma SDK load left the SDK half-loaded, and item event broadcasts also reloaded the character-create dialog's customize controller. The equip crash is the only one seen in the client; the other effects come from reading the code.

Functions rose by 458 in merge 73: 458 atexit destructors, real functions of the original that no earlier table listed, are now counted.

Guides

  • How Matching Works — matching terminology, symbols, and compiler setup.
  • Codegen Patterns — practical clues for recovering source shapes from compiler output.
  • Schema Atlas — index for generated game data, packet, and type references.

Project documentation: README · Building · Contributing.

Clone this wiki locally