IsProtectedBySvPure2
0x001d6cd0 · 186 bytes · __regparm3
_ZL20IsProtectedBySvPure2PKc
Decompiled
undefined (1 param)
/* IsProtectedBySvPure2(char const*) */
undefined1 __regparm3 IsProtectedBySvPure2(char *param_1)
{
char *pcVar1;
undefined1 uVar2;
size_t __n;
int iVar3;
int iVar4;
int in_GS_OFFSET;
char local_220 [512];
int local_20;
iVar4 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
do {
pcVar1 = (&g_SvPure2_ProtectedDirs)[iVar4];
__n = _V_strlen(pcVar1);
iVar3 = _V_strlen(param_1);
if (iVar3 <= (int)__n) break;
memcpy(local_220,param_1,__n);
local_220[__n] = '\0';
iVar3 = _V_stricmp(local_220,pcVar1);
if ((iVar3 == 0) && (uVar2 = 1, param_1[__n] == '/' || param_1[__n] == '\\')) goto LAB_001d6d6e;
iVar4 = iVar4 + 1;
} while (iVar4 != 3);
uVar2 = 0;
LAB_001d6d6e:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__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.