DataTable_LoadDataTablesFromBuffer
0x00144eb0 · 265 bytes · __cdecl
_Z34DataTable_LoadDataTablesFromBufferP7bf_readi
Decompiled
undefined (2 params)
/* DataTable_LoadDataTablesFromBuffer(bf_read*, int) */
undefined4 DataTable_LoadDataTablesFromBuffer(bf_read *param_1,int param_2)
{
bf_read *pbVar1;
undefined4 *puVar2;
uint uVar3;
char cVar4;
do {
uVar3 = *(uint *)(param_1 + 0x10);
pbVar1 = param_1 + 0x14;
*(int *)pbVar1 = *(int *)pbVar1 + -1;
if (*(int *)pbVar1 == 0) {
puVar2 = *(undefined4 **)(param_1 + 0x18);
*(undefined4 *)(param_1 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(param_1 + 0x1c)) {
*(undefined4 *)(param_1 + 0x14) = 1;
*(undefined4 *)(param_1 + 0x10) = 0;
*(undefined4 **)(param_1 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(param_1 + 0x1c) < puVar2) {
param_1[4] = (bf_read)0x1;
*(undefined4 *)(param_1 + 0x10) = 0;
}
else {
*(undefined4 **)(param_1 + 0x18) = puVar2 + 1;
*(undefined4 *)(param_1 + 0x10) = *puVar2;
}
}
else {
*(uint *)(param_1 + 0x10) = uVar3 >> 1;
}
if ((uVar3 & 1) == 0) {
return 0;
}
uVar3 = *(uint *)(param_1 + 0x10);
pbVar1 = param_1 + 0x14;
*(int *)pbVar1 = *(int *)pbVar1 + -1;
if (*(int *)pbVar1 == 0) {
puVar2 = *(undefined4 **)(param_1 + 0x18);
*(undefined4 *)(param_1 + 0x14) = 0x20;
if (puVar2 == *(undefined4 **)(param_1 + 0x1c)) {
*(undefined4 *)(param_1 + 0x14) = 1;
*(undefined4 *)(param_1 + 0x10) = 0;
*(undefined4 **)(param_1 + 0x18) = puVar2 + 1;
}
else if (*(undefined4 **)(param_1 + 0x1c) < puVar2) {
param_1[4] = (bf_read)0x1;
*(undefined4 *)(param_1 + 0x10) = 0;
}
else {
*(undefined4 **)(param_1 + 0x18) = puVar2 + 1;
*(undefined4 *)(param_1 + 0x10) = *puVar2;
}
}
else {
*(uint *)(param_1 + 0x10) = uVar3 >> 1;
}
cVar4 = RecvTable_RecvClassInfos(param_1,(bool)((byte)uVar3 & 1),param_2);
} while (cVar4 != '\0');
Host_Error("DataTable_ParseClientTablesFromBuffer failed.\n");
return 0;
}
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.