GetBspFilename
0x0071a300 · 151 bytes · unknown
_Z14GetBspFilenamev
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* GetBspFilename() */
ulonglong GetBspFilename(void)
{
int iVar1;
undefined1 *puVar2;
uint *puVar3;
uint *puVar4;
uint uVar5;
uint uVar6;
puVar2 = &DAT_00d539c2;
if (*(undefined1 **)(gpGlobals + 0x3c) != (undefined1 *)0x0) {
puVar2 = *(undefined1 **)(gpGlobals + 0x3c);
}
V_snprintf((char *)&GetBspFilename()::bspFilename,0x100,"maps\\%s.bsp",puVar2);
puVar4 = &GetBspFilename()::bspFilename;
do {
puVar3 = puVar4;
uVar5 = *puVar3 + 0xfefefeff & ~*puVar3;
uVar6 = uVar5 & 0x80808080;
puVar4 = puVar3 + 1;
} while (uVar6 == 0);
if ((uVar5 & 0x8080) == 0) {
puVar4 = (uint *)((int)puVar3 + 6);
uVar6 = uVar6 >> 0x10;
}
iVar1 = -(uint)CARRY1((byte)uVar6,(byte)uVar6);
if ((int)puVar4 + iVar1 + -0xfe6a23 < 3) {
return (ulonglong)(uVar6 & 0xffffff00) << 0x20;
}
*(undefined1 *)((int)puVar4 + iVar1 + -6) = 0x62;
*(undefined1 *)((int)puVar4 + iVar1 + -5) = 0x73;
*(undefined1 *)((int)puVar4 + iVar1 + -4) = 0x70;
return CONCAT44(uVar6,&GetBspFilename()::bspFilename) & 0xffffff00ffffffff;
}
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.