CNetworkStringTableContainer::ReadStringTables
0x001a5260 · 488 bytes · __thiscall
_ZN28CNetworkStringTableContainer16ReadStringTablesER7bf_read
Decompiled
undefined (2 params)
/* CNetworkStringTableContainer::ReadStringTables(bf_read&) */
undefined4 __thiscall
CNetworkStringTableContainer::ReadStringTables(CNetworkStringTableContainer *this,bf_read *param_1)
{
int iVar1;
uint *puVar2;
undefined4 *puVar3;
uint uVar4;
uint uVar5;
char cVar6;
CNetworkStringTable *this_00;
uint uVar7;
int in_GS_OFFSET;
uint local_130;
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = *(int *)(param_1 + 0x14);
uVar7 = *(uint *)(param_1 + 0x10);
if (iVar1 < 8) {
puVar2 = *(uint **)(param_1 + 0x18);
if (puVar2 == *(uint **)(param_1 + 0x1c)) {
*(undefined4 *)(param_1 + 0x14) = 1;
*(undefined4 *)(param_1 + 0x10) = 0;
*(uint **)(param_1 + 0x18) = puVar2 + 1;
param_1[4] = (bf_read)0x1;
goto LAB_001a5360;
}
if (*(uint **)(param_1 + 0x1c) < puVar2) {
param_1[4] = (bf_read)0x1;
*(undefined4 *)(param_1 + 0x10) = 0;
goto LAB_001a5360;
}
*(uint **)(param_1 + 0x18) = puVar2 + 1;
uVar4 = *puVar2;
*(uint *)(param_1 + 0x10) = uVar4;
if (param_1[4] != (bf_read)0x0) goto LAB_001a5360;
uVar5 = (&CBitBuffer::s_nMaskTable)[8 - iVar1];
*(int *)(param_1 + 0x14) = iVar1 + 0x18;
*(uint *)(param_1 + 0x10) = uVar4 >> ((byte)(8 - iVar1) & 0x1f);
local_130 = (uVar5 & uVar4) << ((byte)iVar1 & 0x1f) | uVar7;
}
else {
*(int *)(param_1 + 0x14) = iVar1 + -8;
local_130 = uVar7 & 0xff;
if (iVar1 + -8 == 0) {
puVar3 = *(undefined4 **)(param_1 + 0x18);
*(undefined4 *)(param_1 + 0x14) = 0x20;
if (puVar3 == *(undefined4 **)(param_1 + 0x1c)) {
*(undefined4 *)(param_1 + 0x14) = 1;
*(undefined4 *)(param_1 + 0x10) = 0;
*(undefined4 **)(param_1 + 0x18) = puVar3 + 1;
}
else if (*(undefined4 **)(param_1 + 0x1c) < puVar3) {
param_1[4] = (bf_read)0x1;
*(undefined4 *)(param_1 + 0x10) = 0;
}
else {
*(undefined4 **)(param_1 + 0x18) = puVar3 + 1;
*(undefined4 *)(param_1 + 0x10) = *puVar3;
}
}
else {
*(uint *)(param_1 + 0x10) = uVar7 >> 8;
}
}
if (0 < (int)local_130) {
uVar7 = 0;
do {
CBitRead::ReadString((CBitRead *)param_1,local_120,0x100,false,(int *)0x0);
this_00 = (CNetworkStringTable *)(**(code **)(*(int *)this + 0x10))(this,local_120);
cVar6 = CNetworkStringTable::ReadStringTable(this_00,param_1);
if (cVar6 == '\0') {
Host_Error("Error reading string table %s\n",local_120);
}
uVar7 = uVar7 + 1;
} while (uVar7 != local_130);
}
LAB_001a5360:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return 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.