RecvTable_Decode_Guts<false>
0x00152060 · 421 bytes · __cdecl
_Z21RecvTable_Decode_GutsILb0EEbP9RecvTablePvP7bf_readi
Decompiled
bool (4 params)
/* bool RecvTable_Decode_Guts<false>(RecvTable*, void*, bf_read*, int) */
bool RecvTable_Decode_Guts<false>(RecvTable *param_1,void *param_2,bf_read *param_3,int param_4)
{
bf_read bVar1;
int iVar2;
int iVar3;
int iVar4;
byte *pbVar5;
int in_GS_OFFSET;
CDeltaBitsReader local_37c [16];
undefined **local_36c;
int local_368;
int aiStack_364 [65];
int local_260;
undefined4 local_25c;
int local_250;
int local_24c [4];
undefined4 local_23c;
int local_234;
int local_230;
int local_22c;
int local_228;
bf_read *local_224;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar2 = *(int *)(param_1 + 8);
if (iVar2 == 0) {
Error("RecvTable_Decode: table \'%s\' missing a decoder.",*(undefined4 *)(param_1 + 0xc));
}
CDatatableStack::CDatatableStack
((CDatatableStack *)&local_36c,(CSendTablePrecalc *)(iVar2 + 8),param_2,param_4);
local_36c = &PTR_RecurseAndCallProxies_002adf78;
local_250 = iVar2;
CDatatableStack::Init((CDatatableStack *)&local_36c,false);
CDeltaBitsReader::CDeltaBitsReader(local_37c,param_3);
while( true ) {
iVar4 = CDeltaBitsReader::ReadNextPropIndex(local_37c);
if (iVar4 == -1) break;
local_260 = iVar4;
local_25c = *(undefined4 *)(*(int *)(local_368 + 0x2c) + iVar4 * 4);
iVar3 = *(int *)(*(int *)(iVar2 + 0x120) + iVar4 * 4);
local_23c = 1;
pbVar5 = (byte *)(*(int *)(local_368 + 0x40) + iVar4);
local_230 = aiStack_364[*pbVar5];
if (iVar3 == 0) {
local_22c = 0;
}
else {
local_22c = aiStack_364[*pbVar5] + *(int *)(iVar3 + 0x2c);
}
local_24c[0] = 0;
if (aiStack_364[*pbVar5] != 0) {
local_24c[0] = iVar3;
}
local_228 = *(int *)(*(int *)(iVar2 + 0x34) + iVar4 * 4);
local_224 = param_3;
local_234 = param_4;
/* try { // try from 0015214a to 0015215f has its CatchHandler @ 00152206 */
(**(code **)(g_PropTypeFns + *(int *)(local_228 + 8) * 0x24 + 4))(local_24c);
g_nPropsDecoded = g_nPropsDecoded + 1;
}
bVar1 = param_3[4];
CDeltaBitsReader::~CDeltaBitsReader(local_37c);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return (bool)((byte)bVar1 ^ 1);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.