L L4D2node

Give

0x00995790 · 127 bytes · __cdecl

_Z4GiveRK8CCommand

Decompiled

undefined (1 param)

/* Give(CCommand const&) */

void Give(CCommand *param_1)

{
  undefined4 uVar1;
  int *piVar2;
  char cVar3;
  int *piVar4;
  
  piVar4 = (int *)UTIL_GetCommandClient();
  if (piVar4 != (int *)0x0) {
    cVar3 = (**(code **)(*piVar4 + 0x16c))(piVar4);
    piVar2 = mdlcache;
    if ((cVar3 != '\0') && (1 < *(int *)param_1)) {
      uVar1 = *(undefined4 *)(param_1 + 0x40c);
      (**(code **)(*mdlcache + 0x68))(mdlcache);
                    /* try { // try from 009957f0 to 009957f5 has its CatchHandler @ 00995818 */
      (**(code **)(*piVar4 + 0x6c0))(piVar4,uVar1,0,0,0);
                    /* WARNING: Could not recover jumptable at 0x00995805. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*piVar2 + 0x6c))();
      return;
    }
  }
  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)