L L4D2node

NET_AllocPayload

0x001c5550 · 92 bytes · unknown

_Z16NET_AllocPayloadv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* NET_AllocPayload() */

undefined4 * NET_AllocPayload(void)

{
  char cVar1;
  undefined4 *puVar2;
  
  do {
    puVar2 = g_NetScratchBuffers;
    if (g_NetScratchBuffers == (undefined4 *)0x0) {
      puVar2 = operator_new(0x37ab8);
      break;
    }
    cVar1 = ThreadInterlockedAssignIf64
                      (&g_NetScratchBuffers,*g_NetScratchBuffers,DAT_003ac0e4 + -1,
                       g_NetScratchBuffers,DAT_003ac0e4);
  } while (cVar1 == '\0');
  return puVar2 + 2;
}

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)