Info_RemoveKey
0x002017a0 · 270 bytes · __regparm3
_Z14Info_RemoveKeyPcPKc.part.19
Decompiled
undefined (2 params)
/* Info_RemoveKey(char*, char const*) [clone .part.19] */
void __regparm3 Info_RemoveKey(char *param_1,char *param_2)
{
int iVar1;
size_t sVar2;
char cVar3;
char *pcVar4;
char *pcVar5;
char *pcVar6;
int in_GS_OFFSET;
char local_1020 [2048];
char local_820 [2048];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar3 = *param_1;
pcVar6 = param_1;
if (cVar3 == '\\') goto LAB_00201865;
LAB_002017c7:
if (cVar3 == '\0') {
LAB_002018a0:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
pcVar4 = local_1020;
while( true ) {
pcVar5 = pcVar4 + 1;
param_1 = param_1 + 1;
*pcVar4 = cVar3;
cVar3 = *param_1;
if (cVar3 == '\\') break;
pcVar4 = pcVar5;
if (cVar3 == '\0') goto LAB_002018a0;
}
do {
cVar3 = param_1[1];
*pcVar5 = '\0';
pcVar4 = local_820;
param_1 = param_1 + 1;
if ((cVar3 != '\\') && (pcVar5 = pcVar4, cVar3 != '\0')) {
do {
pcVar4 = pcVar5 + 1;
param_1 = param_1 + 1;
*pcVar5 = cVar3;
cVar3 = *param_1;
if (cVar3 == '\0') break;
pcVar5 = pcVar4;
} while (cVar3 != '\\');
}
*pcVar4 = '\0';
iVar1 = _V_strcmp(param_2,local_1020);
if (iVar1 == 0) {
sVar2 = strlen(param_1);
_V_memmove(pcVar6,param_1,sVar2 + 1);
goto LAB_002018a0;
}
cVar3 = *param_1;
if (cVar3 == '\0') goto LAB_002018a0;
pcVar6 = param_1;
if (cVar3 != '\\') goto LAB_002017c7;
LAB_00201865:
cVar3 = pcVar6[1];
param_1 = pcVar6 + 1;
if (cVar3 != '\\') goto LAB_002017c7;
pcVar5 = local_1020;
} while( true );
}
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.