L L4D2node

NBDebugAutocomplete

0x00757c80 · 261 bytes · __cdecl

_Z19NBDebugAutocompletePKcPA64_c

Decompiled

undefined (2 params)

/* NBDebugAutocomplete(char const*, char (*) [64]) */

int NBDebugAutocomplete(char *param_1,char *param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  int in_GS_OFFSET;
  int local_74;
  char local_60 [64];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = _V_strstr(param_1," ");
  local_74 = 0;
  if (iVar1 != 0) {
    pcVar5 = "BEHAVIOR";
    iVar4 = 0;
    V_StrSlice(param_1,0,iVar1 - (int)param_1,local_60,0x40);
    iVar2 = _V_strlen(param_1 + (iVar1 - (int)param_1) + 1);
    local_74 = 0;
    do {
      iVar3 = V_strnicmp(pcVar5,param_1 + (iVar1 - (int)param_1) + 1,iVar2);
      if (iVar3 == 0) {
        iVar3 = local_74 + 1;
        V_snprintf(param_2 + local_74 * 0x40,0x40,"%s %s",local_60,pcVar5);
        local_74 = iVar3;
        if (iVar3 == 0x40) {
          local_74 = 0x40;
          break;
        }
      }
      iVar4 = iVar4 + 1;
      pcVar5 = *(char **)(debugTypeName + iVar4 * 4);
    } while (pcVar5 != (char *)0x0);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return local_74;
}

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)