DoesPathExistAlready
0x000d8120 · 348 bytes · __cdecl
_Z20DoesPathExistAlreadyPKcS0_
Decompiled
undefined (2 params)
/* DoesPathExistAlready(char const*, char const*) */
undefined1 DoesPathExistAlready(char *param_1,char *param_2)
{
char cVar1;
undefined1 uVar2;
uint *puVar3;
uint *puVar4;
int iVar5;
char *pcVar6;
uint uVar7;
uint uVar8;
int in_GS_OFFSET;
char acStack_2118 [4];
uint local_2114 [65];
char local_2010 [8192];
int local_10;
pcVar6 = local_2010;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy(pcVar6,param_1,0x2000);
V_FixSlashes(pcVar6,'/');
V_strncpy((char *)local_2114,param_2,0x104);
V_FixSlashes((char *)local_2114,'/');
puVar4 = local_2114;
if ((char)local_2114[0] != '\0') {
do {
puVar3 = puVar4;
uVar7 = *puVar3 + 0xfefefeff & ~*puVar3;
uVar8 = uVar7 & 0x80808080;
puVar4 = puVar3 + 1;
} while (uVar8 == 0);
if ((uVar7 & 0x8080) == 0) {
puVar4 = (uint *)((int)puVar3 + 6);
uVar8 = uVar8 >> 0x10;
}
iVar5 = -(int)local_2114 - (uint)CARRY1((byte)uVar8,(byte)uVar8);
if (*(char *)((int)puVar4 + (int)(acStack_2118 + iVar5)) == '/') {
*(char *)((int)puVar4 + (int)(acStack_2118 + iVar5)) = '\0';
}
}
do {
iVar5 = V_stristr(pcVar6,(char *)local_2114);
puVar4 = local_2114;
if (iVar5 == 0) {
uVar2 = 0;
goto LAB_000d8250;
}
do {
puVar3 = puVar4;
uVar7 = *puVar3 + 0xfefefeff & ~*puVar3;
uVar8 = uVar7 & 0x80808080;
puVar4 = puVar3 + 1;
} while (uVar8 == 0);
if ((uVar7 & 0x8080) == 0) {
puVar4 = (uint *)((int)puVar3 + 6);
uVar8 = uVar8 >> 0x10;
}
pcVar6 = (char *)((int)puVar4 +
iVar5 + ((-3 - (uint)CARRY1((byte)uVar8,(byte)uVar8)) - (int)local_2114));
cVar1 = *pcVar6;
uVar2 = 1;
if (cVar1 == '\0' || cVar1 == ';') goto LAB_000d8250;
} while ((cVar1 != '/') || (pcVar6[1] != ';'));
uVar2 = 1;
LAB_000d8250:
if (local_10 == *(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.