CNetworkStringDict::CTableItem::ComputeHash
0x001a8780 · 177 bytes · __thiscall
_ZN18CNetworkStringDict10CTableItem11ComputeHashEv
Decompiled
undefined (1 param)
/* CNetworkStringDict::CTableItem::ComputeHash() */
void __thiscall CNetworkStringDict::CTableItem::ComputeHash(CTableItem *this)
{
int iVar1;
int iVar2;
char *pcVar3;
int iVar4;
int in_GS_OFFSET;
undefined4 uStackY_40;
int aiStack_38 [2];
int local_30 [3];
undefined4 local_24;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uStackY_40 = 0x1a87a2;
pcVar3 = (char *)CUtlString::Get((CUtlString *)(this + 4));
uStackY_40 = 0x1a87ac;
iVar4 = _V_strlen(pcVar3);
local_30[0] = iVar4 + 1;
iVar2 = -((iVar4 + 0x10U & 0xfffffff0) + 0x10);
iVar1 = (int)local_30 + iVar2;
*(int *)((int)aiStack_38 + iVar2 + 4) = iVar4 + 1;
*(char **)((int)aiStack_38 + iVar2) = pcVar3;
*(int *)(&stack0xffffffc4 + iVar2) = iVar1;
*(undefined4 *)((int)&uStackY_40 + iVar2) = 0x1a87d7;
V_strncpy(*(char **)(&stack0xffffffc4 + iVar2),*(char **)((int)aiStack_38 + iVar2),
*(int *)((int)aiStack_38 + iVar2 + 4));
*(undefined4 *)((int)aiStack_38 + iVar2) = 0x2f;
*(int *)(&stack0xffffffc4 + iVar2) = iVar1;
*(undefined4 *)((int)&uStackY_40 + iVar2) = 0x1a87e7;
V_FixSlashes(*(char **)(&stack0xffffffc4 + iVar2),*(char *)((int)aiStack_38 + iVar2));
*(int *)(&stack0xffffffc4 + iVar2) = iVar1;
*(undefined4 *)((int)&uStackY_40 + iVar2) = 0x1a87ef;
_V_strlower(*(char **)(&stack0xffffffc4 + iVar2));
*(undefined4 **)(&stack0xffffffc4 + iVar2) = &local_24;
*(undefined4 *)((int)&uStackY_40 + iVar2) = 0x1a87f7;
CRC32_Init(*(ulong **)(&stack0xffffffc4 + iVar2));
iVar4 = local_30[0];
*(int *)((int)aiStack_38 + iVar2) = iVar1;
*(undefined4 **)(&stack0xffffffc4 + iVar2) = &local_24;
*(int *)((int)aiStack_38 + iVar2 + 4) = iVar4;
*(undefined4 *)((int)&uStackY_40 + iVar2) = 0x1a880a;
CRC32_ProcessBuffer(*(ulong **)(&stack0xffffffc4 + iVar2),*(void **)((int)aiStack_38 + iVar2),
*(int *)((int)aiStack_38 + iVar2 + 4));
*(undefined4 **)(&stack0xffffffc4 + iVar2) = &local_24;
*(undefined4 *)((int)&uStackY_40 + iVar2) = 0x1a8812;
CRC32_Final(*(ulong **)(&stack0xffffffc4 + iVar2));
*(undefined4 *)(this + 0x14) = local_24;
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)((int)&uStackY_40 + iVar2) = &UNK_001a8831;
__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.