sots-re/ghidra/addresses.d/lane-g2.json

348 lines
16 KiB
JSON

{
"entries": [
{
"name": "GameSpy_GSIStartAvailableCheck",
"addr": "0x0040a060",
"convention": "cdecl",
"prototype": "void (const char* gamename) /* GameSpy SDK gsAvailable. sprintf(\"%s.available.gamespy.com\"), inet_addr/gethostbyname, UDP socket, sendto port 27900 (htons 0x6cfc) with '\\x09\\0\\0\\0\\0' + gamename + NUL, len = strlen(gamename)+6. Overridable hostname buffer at 0x00b085b0. Leaves socket = -1 on DNS failure. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_GSIAvailableCheckThink",
"addr": "0x0040a210",
"convention": "cdecl",
"prototype": "int (void) /* returns 0=waiting 1=available 2=unavailable 3=temporarily-unavailable. Socket==-1 (start failed) => returns 1. Retries once after 2000 ms then returns 1. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_AvailableCheckParseReply",
"addr": "0x0040a1a0",
"convention": "fastcall",
"prototype": "int (const uint8_t* pkt /*EAX*/, const sockaddr_in* from /*ECX*/, int len, uint32_t* out_status) /* requires len>=7, from.sin_addr/sin_port match, pkt[0..2]==FE FD 09, out = big-endian pkt[3..6]. Returns 0 on match, 1 otherwise. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_NatNeg_Resolve",
"addr": "0x00412530",
"convention": "cdecl",
"prototype": "void (void) /* resolves natneg1.gamespy.com / natneg2.gamespy.com; UDP port 27901 (htons 0x6cfd) bound in FUN_00412200 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_NNBeginNegotiationWithSocket",
"addr": "0x00412590",
"convention": "cdecl",
"prototype": "int (SOCKET s, int cookie, int clientindex, void* progresscb, void* completedcb, void* userdata) /* only reachable from the server-browser join path and the host side; the direct-address join never calls it */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_peerInitialize",
"addr": "0x00416be0",
"convention": "cdecl",
"prototype": "void* (PEERCallbacks* cbs /* 0x74 bytes */)",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_peerSetTitle",
"addr": "0x00416cc0",
"convention": "cdecl",
"prototype": "int (void* peer, const char* title, const char* secretKey, const char* sbTitle, const char* sbSecretKey, int sbGameVersion, int sbMaxUpdates, int natNegotiate, const int pingRooms[3], const int crossPingRooms[3]) /* SOTS passes title=sbTitle=\"swordots\", key=sbSecretKey=\"Z5gR9Z\", sbGameVersion=[0x00b2d510], sbMaxUpdates=30, natNegotiate=1 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_peerStartReportingWithSocket",
"addr": "0x00416a50",
"convention": "cdecl",
"prototype": "int (void* peer, SOCKET s, unsigned short port)",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_qr2_init_socket",
"addr": "0x0041d1a0",
"convention": "cdecl",
"prototype": "int (qr2_t* qrec, SOCKET s, int boundport, const char* gamename, const char* secret_key, int ispublic, int natnegotiate, void* serverkey_cb, void* playerkey_cb, void* teamkey_cb, void* keylist_cb, void* count_cb, void* adderror_cb, void* userdata) /* builds \"%s.master.gamespy.com\", UDP 27900 (htons 0x6cfc); also references 255.255.255.255 for LAN */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_qr2_register_key",
"addr": "0x0041e730",
"convention": "cdecl",
"prototype": "void (int keyid, const char* name)",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_ServerBrowserNew",
"addr": "0x00420060",
"convention": "cdecl",
"prototype": "void* (const char* queryForGamename, const char* queryFromGamename, const char* queryFromKey, int queryFromVersion, int maxConcUpdates, int queryVersion, int lanBrowse, void* callback, void* instance)",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_ServerBrowserLANUpdate",
"addr": "0x00420160",
"convention": "cdecl",
"prototype": "int (void* sb, int startSearch, unsigned short startSearchPort, unsigned short endSearchPort)",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_ServerBrowserHalt",
"addr": "0x00420110",
"convention": "cdecl",
"prototype": "void (void* sb)",
"status": "mapped",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_SBServerListConnect",
"addr": "0x00420840",
"convention": "thiscall",
"prototype": "int (SBServerList* this) /* master index = (unsigned)(fold over tolower(c): h = c - h*0x63306ce7) % 20; sprintf(\"%s.ms%d.gamespy.com\"), TCP port 28910 (htons 0x70ee). Override hostname global at 0x00b09440. For gamename \"swordots\" the index is 5. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "GameSpy_chatConnectPeerchat",
"addr": "0x00417ab0",
"convention": "cdecl",
"prototype": "int (...) /* passes \"peerchat.gamespy.com\", TCP port 6667 (0x1a0b) to the socket-connect helper at 0x00408fe0 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_AutoJoin_ctor",
"addr": "0x0076c6a0",
"convention": "thiscall",
"prototype": "void (AutoJoin* this /*0x90 bytes*/, const void* params, const char* address) /* vftable 0x00a218f4; address std::string at +0x68 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_AutoJoin_Think",
"addr": "0x00778a90",
"convention": "thiscall",
"prototype": "bool (AutoJoin* this) /* vftable slot 2. Runs GSIStartAvailableCheck/Think, stores availability at +5, then AutoJoin_InitServerBrowser */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_AutoJoin_InitPeer",
"addr": "0x007617f0",
"convention": "thiscall",
"prototype": "bool (AutoJoin* this) /* refuses when this->available (+5) == 0; peerInitialize + peerSetTitle(\"swordots\",\"Z5gR9Z\") */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_GameBrowserPanel_InitPeer",
"addr": "0x00778c40",
"convention": "thiscall",
"prototype": "bool (GameBrowserPanel* this) /* gated on this+0x8a (availability); peerInitialize + peerSetTitle */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_GameBrowserPanel_ctor_tail",
"addr": "0x0077e210",
"convention": "thiscall",
"prototype": "GameBrowserPanel* (GameBrowserPanel* this, ...) /* calls Game_RegisterQR2Keys then GSIStartAvailableCheck(gamename) */",
"status": "mapped",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_GameBrowserPanel_LANPage_CreateBrowser",
"addr": "0x0077dde0",
"convention": "thiscall",
"prototype": "void (LANPage* this) /* vftable slot 18. ServerBrowserNew(\"swordots\",\"swordots\",\"Z5gR9Z\", 0, 30, 1, lanBrowse=1, cb, this) into this+0xb9c. NO availability gate. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_GameBrowserPanel_LANPage_Refresh",
"addr": "0x0077de50",
"convention": "thiscall",
"prototype": "void (LANPage* this) /* ServerBrowserHalt then ServerBrowserLANUpdate(sb, 1, g_LanScanPort, g_LanScanPort + g_LanScanPortRange) */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_GameBrowserPanel_ShowManualJoinDialog",
"addr": "0x0077e590",
"convention": "thiscall",
"prototype": "void (GameBrowserPanel* this) /* news a 0x166c-byte ManualJoinDialog (ctor 0x0077c790, vftable 0x00a22604) and binds Game_ManualJoin_OnAccept as its handler */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_ManualJoin_OnAccept",
"addr": "0x0076ef90",
"convention": "cdecl",
"prototype": "void (void* sender, int action, GameBrowserPanel* self) /* validates the typed address with Game_ParseHostAddress then App_StartJoin(params, address, serverBrowser = NULL) -- the GameSpy-free join */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_ParseHostAddress",
"addr": "0x008f64d0",
"convention": "cdecl",
"prototype": "bool (std::string* out_host, int* out_port, const char* text) /* sscanf \"%d.%d.%d.%d:%d%1s\" must yield 4 or 5 fields with every octet <= 255, then sscanf \"%[^:]:%d\"; out_port = -1 when absent. Dotted-quad only -- hostnames are rejected. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "App_StartJoin",
"addr": "0x00899e30",
"convention": "thiscall",
"prototype": "bool (App* this, const void* params, const char* address, void* serverBrowser) /* news Game::StrategyJoin (0xc8 bytes) into this+0x158; serverBrowser may be NULL */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_StrategyJoin_ctor",
"addr": "0x00777b10",
"convention": "thiscall",
"prototype": "StrategyJoin* (StrategyJoin* this, const void* params /*0x58 by value*/, const char* address, void* serverBrowser) /* vftable 0x00a21904. serverBrowser == NULL => state (+0x80) = 1, direct connect; else state 0, ServerBrowserAuxUpdateIP + NAT negotiation */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_StrategyJoin_Think",
"addr": "0x00765810",
"convention": "thiscall",
"prototype": "bool (StrategyJoin* this) /* vftable slot 2; jump table at 0x00765948 for states 1..5 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_StrategyJoin_QueryViaServerBrowser",
"addr": "0x00770e70",
"convention": "thiscall",
"prototype": "bool (StrategyJoin* this, void* serverBrowser) /* ServerBrowserAuxUpdateIP-style direct query then NNBeginNegotiationWithSocket */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "App_ConnectToStrategyHost",
"addr": "0x0089a7e0",
"convention": "thiscall",
"prototype": "bool (App* this, const char* address, const char* playerName) /* the direct-connect entry reached from StrategyJoin state 1; news a 0x130-byte client into this+0x14c and stamps the version word from 0x00b2d510 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_OnJoinGame_ChooseAddress",
"addr": "0x00772f60",
"convention": "thiscall",
"prototype": "bool (GameBrowserPanel* this) /* picks private vs public SBServer address; logs \"same NAT\" / \"behind NAT, but can still connect directly\" / \"requires NAT negotiation\"; reads SBServerGetIntValue(server, \"password\", 0) */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_StrategyHost_InitPeer",
"addr": "0x007c1ee0",
"convention": "thiscall",
"prototype": "bool (StrategyHost* this) /* refuses when this+0x24e (availability) == 0; peerInitialize with a 0x74-byte callback table then peerSetTitle */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_StrategyHost_StartReporting",
"addr": "0x007c2dd0",
"convention": "thiscall",
"prototype": "void (StrategyHost* this) /* if this+0x2c == 1 && this+0x30 != 0: qr2_init_socket(..., ispublic = 0) -- LAN reporting, no master heartbeat. Otherwise StrategyHost_InitPeer then peerStartReportingWithSocket. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_RegisterQR2Keys",
"addr": "0x00898bf0",
"convention": "cdecl",
"prototype": "void (void) /* 16 qr2_register_key calls: 50..57 slot0..slot7, 58 numslots, 59 mapshape, 60 numsys, 61 turn, 62 scenario, 63 settings, 64 slot_, 65 ranks */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_LoadNetworkConfig",
"addr": "0x005a0610",
"convention": "thiscall",
"prototype": "void (Config* this) /* reads ini section [Network]: SyncCheckStrategy=True, SyncCheckCombat=True, SyncLogStrategy=False, SyncLogCombat=False, HostPort=3369, CombatHostPort=3370, LanScanPort=3369, LanScanPortRange=1, HeartbeatPeriod=15000, ConnectionTimeout=45000, MaxTxMessageSize=512, CombatLatency=1000 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "Game_ParseJoinCommandLine",
"addr": "0x0089d280",
"convention": "thiscall",
"prototype": "bool (App* this) /* GetCommandLineW + CommandLineToArgvW; matches the literal \"/join\", takes the next argv as the address and the one after as an optional second string, then constructs Game::AutoJoin into this+0x158 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_GameSpyGameName",
"addr": "0x00a35cd4",
"convention": "data",
"prototype": "const char* /* -> \"swordots\" at 0x00a35c50 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_GameSpySecretKey",
"addr": "0x00a35cd8",
"convention": "data",
"prototype": "const char* /* -> \"Z5gR9Z\" at 0x00a35c48 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_GameVersionWord",
"addr": "0x00b2d510",
"convention": "data",
"prototype": "uint32_t /* packed build word; bits 16..23 = minor<<4 | major parsed from \"1.8.1\", byte 1 = edition flags, low nibble = build flavour. Passed as peerSetTitle sbGameVersion and stamped into the join handshake. */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_LanScanPort",
"addr": "0x00b13c6c",
"convention": "data",
"prototype": "uint16_t /* [Network] LanScanPort, default 3369 */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_LanScanPortRange",
"addr": "0x00b13c70",
"convention": "data",
"prototype": "uint32_t /* [Network] LanScanPortRange, default 1; LAN sweep is [LanScanPort, LanScanPort+Range] */",
"status": "verified",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_GameSpyAvailableHostOverride",
"addr": "0x00b085b0",
"convention": "data",
"prototype": "char[] /* when non-empty, replaces \"<gamename>.available.gamespy.com\" in the availability check */",
"status": "mapped",
"source": "findings/subsystems/multiplayer-gamespy.md"
},
{
"name": "g_GameSpyMasterHostOverride",
"addr": "0x00b09440",
"convention": "data",
"prototype": "const char* /* when non-NULL, replaces \"<gamename>.ms<N>.gamespy.com\" in SBServerListConnect */",
"status": "mapped",
"source": "findings/subsystems/multiplayer-gamespy.md"
}
]
}