CWin32UploadGameStats::ReceiveProtocolOkay
0x00213000 · 304 bytes · __thiscall
_ZN21CWin32UploadGameStats19ReceiveProtocolOkayER22EGameStatsUploadStatusR10CUtlBuffer
Decompiled
undefined (3 params)
/* CWin32UploadGameStats::ReceiveProtocolOkay(EGameStatsUploadStatus&, CUtlBuffer&) */
undefined4 __thiscall
CWin32UploadGameStats::ReceiveProtocolOkay
(CWin32UploadGameStats *this,EGameStatsUploadStatus *param_1,CUtlBuffer *param_2)
{
char cVar1;
undefined4 uVar2;
char local_1d [13];
UpdateProgress(*(TGameStatsParameters **)(this + 0x2c),
"Receiving harvesting protocol acknowledgement.");
*(undefined4 *)(param_2 + 0xc) = 0;
*(undefined4 *)(param_2 + 0x10) = 0;
*(undefined4 *)(param_2 + 0x20) = 0;
*(undefined4 *)(param_2 + 0x1c) = 0;
param_2[0x14] = (CUtlBuffer)0x0;
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)param_2);
uVar2 = DoBlockingReceive(this,1,param_2);
if ((char)uVar2 == '\0') {
UpdateProgress(*(TGameStatsParameters **)(this + 0x2c),"Didn\'t receive protocol failure data.")
;
*(undefined4 *)param_1 = 1;
return uVar2;
}
if (((byte)param_2[0x15] & 1) == 0) {
cVar1 = CUtlBuffer::CheckGet(param_2,1);
if (cVar1 == '\0') goto LAB_002130cc;
cVar1 = *(char *)(*(int *)param_2 + (*(int *)(param_2 + 0xc) - *(int *)(param_2 + 0x20)));
*(int *)(param_2 + 0xc) = *(int *)(param_2 + 0xc) + 1;
}
else {
local_1d[0] = '\0';
CUtlBuffer::Scanf(param_2,"%c",local_1d);
cVar1 = local_1d[0];
}
if (cVar1 != '\0') {
UpdateProgress(*(TGameStatsParameters **)(this + 0x2c),"Protocol OK.");
*(undefined4 *)(this + 0x14) = 4;
return uVar2;
}
LAB_002130cc:
UpdateProgress(*(TGameStatsParameters **)(this + 0x2c),"Server rejected protocol.");
*(undefined4 *)param_1 = 1;
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.