L L4D2node

NavAttributeAutocomplete

0x0073adf0 · 262 bytes · __cdecl

_ZL24NavAttributeAutocompletePKcPA64_c

Decompiled

undefined (2 params)

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

int NavAttributeAutocomplete(char *param_1,char *param_2)

{
  int iVar1;
  undefined1 *puVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  int in_GS_OFFSET;
  char local_61 [65];
  int local_20;
  
  iVar5 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = _V_strlen(param_1);
  if (iVar1 < 0x40) {
    iVar5 = 0;
    V_strncpy(local_61,param_1,0x41);
    puVar2 = (undefined1 *)_V_strrchr(local_61,' ');
    if (puVar2 != (undefined1 *)0x0) {
      *puVar2 = 0;
      iVar1 = _V_strlen(puVar2 + 1);
      if (TheNavAttributeTable != (undefined *)0x0) {
        iVar7 = 0;
        pcVar3 = TheNavAttributeTable;
        iVar6 = iVar5;
        do {
          iVar4 = V_strnicmp(pcVar3,puVar2 + 1,iVar1);
          iVar5 = iVar6;
          if (iVar4 == 0) {
            iVar5 = iVar6 + 1;
            V_snprintf(param_2 + iVar6 * 0x40,0x40,"%s %s",local_61,
                       (&TheNavAttributeTable)[iVar7 * 2]);
          }
          iVar7 = iVar7 + 1;
          pcVar3 = (&TheNavAttributeTable)[iVar7 * 2];
        } while ((pcVar3 != (char *)0x0) && (iVar6 = iVar5, iVar5 < 0x40));
      }
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar5;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)