L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)