CSentence::ComputeDataCheckSum
0x000ddd20 · 233 bytes · __thiscall
_ZN9CSentence19ComputeDataCheckSumEv
Decompiled
undefined (1 param)
/* CSentence::ComputeDataCheckSum() */
ulong __thiscall CSentence::ComputeDataCheckSum(CSentence *this)
{
char *pcVar1;
int iVar2;
int iVar3;
undefined1 *puVar4;
int iVar5;
int iVar6;
ulong local_24;
undefined4 local_20 [4];
CRC32_Init(&local_24);
pcVar1 = *(char **)this;
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
iVar2 = _V_strlen(pcVar1);
puVar4 = &DAT_002c79d4;
if (*(undefined1 **)this != (undefined1 *)0x0) {
puVar4 = *(undefined1 **)this;
}
iVar5 = 0;
CRC32_ProcessBuffer(&local_24,puVar4,iVar2);
iVar2 = *(int *)(this + 0x10);
if (0 < iVar2) {
do {
iVar6 = iVar5 * 4;
iVar5 = iVar5 + 1;
local_20[0] = CWordTag::ComputeDataCheckSum(*(CWordTag **)(*(int *)(this + 4) + iVar6));
CRC32_ProcessBuffer(&local_24,local_20,4);
} while (iVar5 != iVar2);
}
iVar2 = *(int *)(this + 0x3c);
iVar6 = 0;
iVar5 = 0;
if (0 < iVar2) {
do {
CRC32_ProcessBuffer(&local_24,(void *)(*(int *)(this + 0x30) + iVar6),4);
iVar3 = *(int *)(this + 0x30) + iVar6;
iVar6 = iVar6 + 0xc;
CRC32_ProcessBuffer(&local_24,(void *)(iVar3 + 4),4);
iVar5 = iVar5 + 1;
} while (iVar5 != iVar2);
}
CRC32_Final(&local_24);
return local_24;
}
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.