CBaseClientState::PrepareSteamConnectResponse
0x001011d0 · 152 bytes · __cdecl
_ZN16CBaseClientState27PrepareSteamConnectResponseEybRK8netadr_sR8bf_write
Decompiled
undefined (4 params)
/* CBaseClientState::PrepareSteamConnectResponse(unsigned long long, bool, netadr_s const&,
bf_write&) */
undefined4
CBaseClientState::PrepareSteamConnectResponse
(ulonglong param_1,bool param_2,netadr_s *param_3,bf_write *param_4)
{
char cVar1;
short sVar2;
int iVar3;
uint uVar4;
int in_GS_OFFSET;
undefined4 local_1c;
undefined4 local_18;
undefined4 local_14;
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
local_1c = *(undefined4 *)param_4;
local_18 = *(undefined4 *)(param_4 + 4);
local_14 = *(undefined4 *)(param_4 + 8);
iVar3 = netadr_s::GetType((netadr_s *)param_4);
if ((iVar3 == 1) || (cVar1 = netadr_s::IsLocalhost((netadr_s *)param_4), cVar1 != '\0')) {
uVar4 = netadr_s::addr_ntohl((netadr_s *)&net_local_adr);
netadr_s::SetIP((netadr_s *)&local_1c,uVar4);
}
sVar2 = netadr_s::GetPort((netadr_s *)&local_1c);
if (sVar2 == 0) {
netadr_s::SetPort((netadr_s *)&local_1c,0x6987);
}
if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 1;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.