KeyValues::ProcessResolutionKeys
0x00045c50 · 342 bytes · __thiscall
_ZN9KeyValues21ProcessResolutionKeysEPKc
Decompiled
undefined (2 params)
/* KeyValues::ProcessResolutionKeys(char const*) */
undefined4 __thiscall KeyValues::ProcessResolutionKeys(KeyValues *this,char *param_1)
{
int iVar1;
char *pcVar2;
int iVar3;
undefined4 uVar4;
int iVar5;
KeyValues *this_00;
int in_GS_OFFSET;
char local_a0 [128];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (((param_1 == (char *)0x0) || (this == (KeyValues *)0x0)) ||
(this_00 = *(KeyValues **)(this + 0x20), this_00 == (KeyValues *)0x0)) {
uVar4 = 0;
}
else {
do {
ProcessResolutionKeys(this_00,param_1);
pcVar2 = (char *)GetName(this_00);
iVar3 = V_stristr(pcVar2,param_1);
if (iVar3 != 0) {
pcVar2 = (char *)GetName(this_00);
V_strncpy(local_a0,pcVar2,0x80);
pcVar2 = (char *)V_stristr(local_a0,param_1);
if ((pcVar2 != (char *)0x0) && (iVar3 = _V_stricmp(pcVar2,param_1), iVar3 == 0)) {
*pcVar2 = '\0';
iVar3 = FindKey(this,local_a0,false);
if (iVar3 != 0) {
iVar1 = *(int *)(this + 0x20);
if (iVar3 == *(int *)(this + 0x20)) {
*(undefined4 *)(this + 0x20) = *(undefined4 *)(iVar3 + 0x1c);
}
else {
do {
iVar5 = iVar1;
iVar1 = *(int *)(iVar5 + 0x1c);
if (iVar1 == 0) goto LAB_00045d4d;
} while (iVar3 != iVar1);
*(undefined4 *)(iVar5 + 0x1c) = *(undefined4 *)(iVar3 + 0x1c);
}
LAB_00045d4d:
*(undefined4 *)(iVar3 + 0x1c) = 0;
deleteThis();
}
SetName(this_00,local_a0);
}
}
this_00 = *(KeyValues **)(this_00 + 0x1c);
} while (this_00 != (KeyValues *)0x0);
uVar4 = 1;
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
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.