CCountedStringPool::DereferenceString
0x00053bc0 · 256 bytes · __thiscall
_ZN18CCountedStringPool17DereferenceStringEPKc
Decompiled
undefined (2 params)
/* CCountedStringPool::DereferenceString(char const*) */
void __thiscall CCountedStringPool::DereferenceString(CCountedStringPool *this,char *param_1)
{
int iVar1;
ushort uVar2;
uint uVar3;
int iVar4;
int iVar5;
undefined4 *puVar6;
int iVar7;
ushort uVar8;
ushort local_1e;
if (param_1 != (char *)0x0) {
uVar3 = Hash(this,param_1);
uVar3 = uVar3 % *(uint *)(this + 0x10) & 0xffff;
uVar2 = *(ushort *)(*(int *)(this + 4) + uVar3 * 2);
if (uVar2 != 0) {
iVar5 = *(int *)(this + 0x18);
local_1e = 0;
do {
uVar8 = uVar2;
iVar1 = (uint)uVar8 * 8;
iVar4 = _V_stricmp(param_1,*(char **)(iVar5 + (uint)uVar8 * 8));
iVar5 = *(int *)(this + 0x18);
iVar7 = iVar5 + iVar1;
if ((iVar4 == 0) && (*(char *)(iVar7 + 6) != -1)) {
*(char *)(iVar7 + 6) = *(char *)(iVar7 + 6) + -1;
iVar5 = *(int *)(this + 0x18);
iVar7 = iVar5 + iVar1;
if (*(char *)(iVar7 + 6) == '\0') {
if (local_1e == 0) {
*(undefined2 *)(*(int *)(this + 4) + uVar3 * 2) = *(undefined2 *)(iVar7 + 4);
}
else {
*(undefined2 *)(iVar5 + 4 + (uint)local_1e * 8) = *(undefined2 *)(iVar7 + 4);
}
puVar6 = (undefined4 *)(*(int *)(this + 0x18) + iVar1);
if ((void *)*puVar6 != (void *)0x0) {
operator_delete__((void *)*puVar6);
puVar6 = (undefined4 *)(*(int *)(this + 0x18) + iVar1);
}
*puVar6 = 0;
*(undefined1 *)(*(int *)(this + 0x18) + 6 + iVar1) = 0;
*(undefined2 *)(*(int *)(this + 0x18) + 4 + iVar1) = *(undefined2 *)(this + 0x2c);
*(ushort *)(this + 0x2c) = uVar8;
return;
}
}
uVar2 = *(ushort *)(iVar7 + 4);
local_1e = uVar8;
} while (*(ushort *)(iVar7 + 4) != 0);
}
}
return;
}
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.