CRegistry::ReadInt
0x000dab50 · 148 bytes · __thiscall
_ZN9CRegistry7ReadIntEPKcS1_i
Decompiled
undefined (4 params)
/* CRegistry::ReadInt(char const*, char const*, int) */
void __thiscall CRegistry::ReadInt(CRegistry *this,char *param_1,char *param_2,int param_3)
{
int iVar1;
code *pcVar2;
int iVar3;
char *pcVar4;
size_t sVar5;
size_t sVar6;
int in_GS_OFFSET;
int iStack_50;
char *local_30 [4];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_30[0] = param_1;
iStack_50 = 0xdab78;
sVar5 = strlen(param_1);
iStack_50 = 0xdab82;
sVar6 = strlen(param_2);
pcVar4 = local_30[0];
iVar3 = -((sVar6 + sVar5 + 0x11 & 0xfffffff0) + 0x10);
*(char **)(&stack0xffffffc4 + iVar3) = param_2;
*(char **)(&stack0xffffffc0 + iVar3) = pcVar4;
*(char **)(&stack0xffffffbc + iVar3) = "%s\\%s";
*(size_t *)(&stack0xffffffb8 + iVar3) = sVar6 + sVar5 + 2;
*(int *)((int)local_30 + iVar3 + -0x1c) = (int)local_30 + iVar3;
*(undefined4 *)((int)&iStack_50 + iVar3) = 0xdabb8;
V_snprintf(*(char **)((int)local_30 + iVar3 + -0x1c),*(int *)(&stack0xffffffb8 + iVar3),
*(char **)(&stack0xffffffbc + iVar3));
iVar1 = *(int *)this;
*(int *)(&stack0xffffffb8 + iVar3) = (int)local_30 + iVar3;
*(CRegistry **)((int)local_30 + iVar3 + -0x1c) = this;
*(int *)(&stack0xffffffbc + iVar3) = param_3;
pcVar2 = *(code **)(iVar1 + 0x10);
*(undefined4 *)((int)&iStack_50 + iVar3) = 0xdabcb;
(*pcVar2)();
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)((int)&iStack_50 + iVar3) = &UNK_000dabe4;
__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.