FileSystem_GetExecutableDir
0x000d73b0 · 229 bytes · __regparm3
_Z27FileSystem_GetExecutableDirPci.part.5
Decompiled
undefined (2 params)
/* FileSystem_GetExecutableDir(char*, int) [clone .part.5] */
undefined4 __regparm3 FileSystem_GetExecutableDir(char *param_1,int param_2)
{
int iVar1;
int in_GS_OFFSET;
char local_114;
char local_113 [259];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
V_StripFilename(param_1);
V_FixSlashes(param_1,'/');
V_StrRight(param_1,4,&local_114,0x104);
if ((local_114 != '/') || (iVar1 = _V_stricmp(local_113,"bin"), iVar1 != 0)) {
V_strncat(param_1,"/",param_2,-1);
V_strncat(param_1,"bin",param_2,-1);
V_FixSlashes(param_1,'/');
}
if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 1;
}
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.