CBaseClientState::BuildReserveServerPayload
0x00103090 · 566 bytes · __thiscall
_ZN16CBaseClientState25BuildReserveServerPayloadER8bf_writei
Decompiled
undefined (3 params)
/* CBaseClientState::BuildReserveServerPayload(bf_write&, int) */
void __thiscall
CBaseClientState::BuildReserveServerPayload(CBaseClientState *this,bf_write *param_1,int param_2)
{
char cVar1;
int iVar2;
int in_GS_OFFSET;
IceKey local_35c [12];
uchar *local_350 [3];
int local_344;
void *local_338 [4];
int local_328;
uint local_300;
uint local_2fc;
undefined1 local_2f8 [728];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
bf_write::bf_write((bf_write *)local_350,local_2f8,0x2d8,-1);
bf_write::WriteLong((bf_write *)local_350,-0x1124111);
bf_write::WriteLongLong(CONCAT44(*(undefined4 *)(this + 0x15c),(bf_write *)local_350));
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_338,0,0,0);
/* try { // try from 00103130 to 001031d2 has its CatchHandler @ 001032ca */
cVar1 = CUtlBuffer::IsBigEndian((CUtlBuffer *)local_338);
if (cVar1 != '\0') {
CUtlBuffer::SetBigEndian((CUtlBuffer *)local_338,false);
}
iVar2 = 0;
if ((*(KeyValues **)(this + 0x164) == (KeyValues *)0x0) ||
(KeyValues::WriteAsBinary(*(KeyValues **)(this + 0x164),(CUtlBuffer *)local_338),
iVar2 = local_328, local_328 < 0x259)) {
bf_write::WriteLong((bf_write *)local_350,iVar2);
if (0 < iVar2) {
bf_write::WriteBytes((bf_write *)local_350,local_338[0],iVar2);
}
while ((local_344 + 7U & 0x38) != 0) {
bf_write::WriteByte((bf_write *)local_350,0);
}
IceKey::IceKey(local_35c,1);
local_300 = param_2 ^ 0x5ef8ce12;
local_2fc = param_2 ^ 0xaa98e42c;
/* try { // try from 001031fc to 00103240 has its CatchHandler @ 001032e1 */
IceKey::set(local_35c,(uchar *)&local_300);
EncryptBuffer(local_35c,local_350[0],local_344 + 7 >> 3);
bf_write::WriteLong(param_1,local_344 + 7 >> 3);
IceKey::~IceKey(local_35c);
/* try { // try from 00103266 to 001032c7 has its CatchHandler @ 001032ca */
bf_write::WriteBytes(param_1,local_350[0],local_344 + 7 >> 3);
}
else {
(**(code **)(*(int *)this + 200))(this,*(int *)(this + 0x174) + 0x20,0);
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_338);
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
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.