CRegistry::WriteString
0x00592fc0 · 154 bytes · __thiscall
_ZN9CRegistry11WriteStringEPKcS1_S1_
Decompiled
undefined (4 params)
/* CRegistry::WriteString(char const*, char const*, char const*) */
void __thiscall CRegistry::WriteString(CRegistry *this,char *param_1,char *param_2,char *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_34;
char *local_30 [4];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_34 = param_3;
local_30[0] = param_1;
iStack_50 = 0x592fee;
sVar5 = strlen(param_1);
iStack_50 = 0x592ff8;
sVar6 = strlen(param_2);
iVar3 = -((sVar6 + sVar5 + 0x11 & 0xfffffff0) + 0x10);
*(char **)(&stack0xffffffc0 + iVar3) = local_30[0];
*(char **)(&stack0xffffffc4 + iVar3) = param_2;
*(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) = 0x59302e;
V_snprintf(*(char **)((int)local_30 + iVar3 + -0x1c),*(int *)(&stack0xffffffb8 + iVar3),
*(char **)(&stack0xffffffbc + iVar3));
pcVar4 = local_34;
iVar1 = *(int *)this;
*(int *)(&stack0xffffffb8 + iVar3) = (int)local_30 + iVar3;
*(CRegistry **)((int)local_30 + iVar3 + -0x1c) = this;
*(char **)(&stack0xffffffbc + iVar3) = pcVar4;
pcVar2 = *(code **)(iVar1 + 0x1c);
*(undefined4 *)((int)&iStack_50 + iVar3) = 0x593041;
(*pcVar2)();
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)((int)&iStack_50 + iVar3) = &UNK_0059305a;
__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.