L L4D2node

VOX_LookupRndVirtual

0x000f1b80 · 176 bytes · __cdecl

_Z20VOX_LookupRndVirtualPc

Decompiled

undefined (1 param)

/* VOX_LookupRndVirtual(char*) */

char * VOX_LookupRndVirtual(char *param_1)

{
  int iVar1;
  char *pcVar2;
  undefined1 *puVar3;
  int in_GS_OFFSET;
  char local_30;
  char local_2f [31];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = VOX_GroupIndexFromName(param_1);
  if (-1 < iVar1) {
    iVar1 = VOX_GroupPick(iVar1,&local_30,0x1f);
    if (-1 < iVar1) {
      pcVar2 = local_2f;
      if (local_30 != '!') {
        pcVar2 = &local_30;
      }
      pcVar2 = (char *)VOX_LookupString(pcVar2,0,0,0,0);
      if (pcVar2 != (char *)0x0) {
        puVar3 = (undefined1 *)_V_strstr(pcVar2," ");
        if (puVar3 != (undefined1 *)0x0) {
          *puVar3 = 0;
        }
        goto LAB_000f1c0d;
      }
    }
  }
  pcVar2 = (char *)0x0;
LAB_000f1c0d:
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return pcVar2;
}

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)