L L4D2node

CNavVectorNoEditAllocator::Alloc

0x006fa2f0 · 158 bytes · __cdecl

_ZN25CNavVectorNoEditAllocator5AllocEj

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNavVectorNoEditAllocator::Alloc(unsigned int) */

void CNavVectorNoEditAllocator::Alloc(uint param_1)

{
  char cVar1;
  uint uVar2;
  uint uVar3;
  
  if (_DAT_00fe5c7c == 0) {
    CMemoryStack::Init((CMemoryStack *)&m_memory,0x100000,0,0,4);
  }
  uVar2 = m_memory;
  uVar3 = DAT_00fe5c88;
  if (param_1 != 0) {
    uVar3 = -DAT_00fe5c88 & (DAT_00fe5c88 - 1) + param_1;
  }
  uVar3 = m_memory + uVar3;
  if ((DAT_00fe5c74 < uVar3) && (cVar1 = CMemoryStack::CommitTo((uchar *)&m_memory), cVar1 == '\0'))
  {
    uVar2 = 0;
    uVar3 = m_memory;
  }
  m_memory = uVar3;
  m_nBytesCurrent = param_1;
  m_pCurrent = uVar2;
  return;
}

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)