CaptionLookup_t::SetHash
0x004b60d0 · 152 bytes · __thiscall
_ZN15CaptionLookup_t7SetHashEPKc
Decompiled
undefined (2 params)
/* CaptionLookup_t::SetHash(char const*) */
void __thiscall CaptionLookup_t::SetHash(CaptionLookup_t *this,char *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int in_GS_OFFSET;
int iStackY_40;
CaptionLookup_t *local_30 [3];
undefined4 local_24;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_30[0] = this;
iStackY_40 = 0x4b60f5;
iVar3 = _V_strlen(param_1);
iVar2 = -((iVar3 + 0x10U & 0xfffffff0) + 0x10);
iVar1 = (int)local_30 + iVar2;
*(char **)(&stack0xffffffc8 + iVar2) = param_1;
*(int *)(&stack0xffffffcc + iVar2) = iVar3 + 1;
*(int *)(&stack0xffffffc4 + iVar2) = iVar1;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0x4b611f;
V_strncpy(*(char **)(&stack0xffffffc4 + iVar2),*(char **)(&stack0xffffffc8 + iVar2),
*(int *)(&stack0xffffffcc + iVar2));
*(int *)(&stack0xffffffc4 + iVar2) = iVar1;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0x4b6127;
_V_strlower(*(char **)(&stack0xffffffc4 + iVar2));
*(undefined4 **)(&stack0xffffffc4 + iVar2) = &local_24;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0x4b612f;
CRC32_Init(*(ulong **)(&stack0xffffffc4 + iVar2));
*(int *)(&stack0xffffffcc + iVar2) = iVar3;
*(int *)(&stack0xffffffc8 + iVar2) = iVar1;
*(undefined4 **)(&stack0xffffffc4 + iVar2) = &local_24;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0x4b613f;
CRC32_ProcessBuffer(*(ulong **)(&stack0xffffffc4 + iVar2),*(void **)(&stack0xffffffc8 + iVar2),
*(int *)(&stack0xffffffcc + iVar2));
*(undefined4 **)(&stack0xffffffc4 + iVar2) = &local_24;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0x4b6147;
CRC32_Final(*(ulong **)(&stack0xffffffc4 + iVar2));
*(undefined4 *)local_30[0] = local_24;
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)((int)&iStackY_40 + iVar2) = &UNK_004b6168;
__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.