L L4D2node

CC_DisplayStuckDumpAutocomplete

0x00757d90 · 230 bytes · __cdecl

_Z31CC_DisplayStuckDumpAutocompletePKcPA64_c

Decompiled

undefined (2 params)

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

int CC_DisplayStuckDumpAutocomplete(char *param_1,char *param_2)

{
  int iVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  undefined4 local_44;
  char local_40 [32];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = _V_strlen("nb_stuck_dump_display ");
  iVar2 = _V_strlen(param_1 + iVar1);
  _V_strcpy(local_40,"logs/*.stuck");
  pcVar3 = (char *)(**(code **)(*g_pFullFileSystem + 0x70))(g_pFullFileSystem,local_40,&local_44);
  iVar6 = 0;
  do {
    iVar5 = iVar6;
    if (pcVar3 == (char *)0x0) break;
    iVar4 = V_strnicmp(pcVar3,param_1 + iVar1,iVar2);
    if (iVar4 == 0) {
      iVar5 = iVar6 + 1;
      V_snprintf(param_2 + iVar6 * 0x40,0x40,"nb_stuck_dump_display logs/%s",pcVar3);
    }
    pcVar3 = (char *)(**(code **)(*g_pFullFileSystem + 0x74))(g_pFullFileSystem,local_44);
    iVar6 = iVar5;
  } while (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)