L L4D2node

UTIL_FunctionToName

0x004a7410 · 73 bytes · __cdecl

_Z19UTIL_FunctionToNameP9datamap_tPM11CBaseEntityFvR11inputdata_tE

Decompiled

undefined (2 params)

/* UTIL_FunctionToName(datamap_t*, void (CBaseEntity::**)(inputdata_t&)) */

undefined4 UTIL_FunctionToName(datamap_t *param_1,_func_void_inputdata_t_ptr *param_2)

{
  int iVar1;
  int iVar2;
  
  do {
    if (param_1 == (datamap_t *)0x0) {
      return 0;
    }
    if (0 < *(int *)(param_1 + 4)) {
      iVar1 = *(int *)param_1;
      iVar2 = 0;
      do {
        if (((*(byte *)(iVar1 + 0xe) & 0x20) != 0) &&
           (*(_func_void_inputdata_t_ptr **)(iVar1 + 0x18) == param_2)) {
          return *(undefined4 *)(iVar1 + 4);
        }
        iVar2 = iVar2 + 1;
        iVar1 = iVar1 + 0x40;
      } while (iVar2 != *(int *)(param_1 + 4));
    }
    param_1 = *(datamap_t **)(param_1 + 0xc);
  } while( true );
}

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)