Extraction methodology
How the three custom, undocumented file formats were reverse-engineered from first principles.
Live validation
What’s been confirmed by actually round-tripping traffic against production, versus what’s static-analysis-only.
Go implementation roadmap
What a compatible Go client needs to implement, and in what order.
Game entity ID reference
The full catalog of game entity IDs recovered from the data tables.
Client architecture
The client is built on Unity, but the game’s C# isn’t IL2CPP-compiled at all.libil2cpp.so is FunPlus’s FM_Mono bridge: it exports the il2cpp ABI and runs the managed code on upstream Mono 6.13.0. Instead of compiled game code:
- Gameplay logic and UI, city building, army/hero systems, world map, alliance, chat, mail, shop, and nearly every network command (3,115 in the Lua catalog), is written in Lua (18,733 compiled modules in 1.0.364, hot-updated as one bundle).
- Engine glue and platform integration, the network stack, the crypto, asset/resource management, the world-map viewport protocol, and third-party SDK wiring, lives in hot-updatable C#: 118 XOR’d
.mdlassemblies that FM_Mono loads at startup. Thedllreshot-update manifest lists replacements for 117 of them (mscorlibhas no entry), andnoUpdateAssemblies.jsonpinsSmartFox2Xto the APK copy, so the SFS2X data-model library changes only with an app release, unless a hot update replaces the pin list itself (static-analysis-only). - The static core,
libil2cpp.so(the FM_Mono bridge), the Mono runtime, the Unity engine, and the native xLua library, is what’s actually fixed at app-store-release granularity. It contains no game logic at all (see Native binaries & security).
- HTTP(S) for bootstrap, version check, hot-update manifests, and gate-server discovery (the “GSL” flow), wrapped in a custom RSA+AES hybrid scheme.
- A raw TCP socket speaking a hand-rolled reimplementation of SmartFoxServer 2X’s binary
SFSObjectprotocol, carrying every gameplay command as a stringcmd(e.g."mail.read") plus a typed key/value payload.
Layer diagram
What a Go client actually needs
Only two of these three layers matter for protocol compatibility: the crypto (Gate-server crypto) and the wire format (SFS2X wire protocol, Command reference). The Lua/C# split is a client-implementation detail, a Go client talks TCP and HTTP directly and never touches Lua. The native-binary survey exists to answer one practical question: does anything below the protocol layer (anti-cheat, device attestation, signing) block a clean-room client?Short answer: no, for creating and driving new guest accounts, and for binding a guest session to a real account via email verification, both confirmed live, end to end, repeatedly. Reconnecting into an already-established account’s live game state is confirmed live too, including against the shipped code after a security fix swapped part of the
ta blob for placeholders (an unattended cron reconnected and collected real resources over multiple days, August 2026; since the 1.0.370 follow-up the iOS ta fills those fields again, static-analysis-only). It’s just not yet fully general-purpose: it still needs a captured access token and server address, see Native binaries & security and Live validation against production for the full scope and current state.