L L4D2node

ConCommand::AutoCompleteSuggest

0x00248f80 · 230 bytes · __thiscall

_ZN10ConCommand19AutoCompleteSuggestEPKcR10CUtlVectorI10CUtlString10CUtlMemoryIS3_iEE

Decompiled

undefined (3 params)

/* ConCommand::AutoCompleteSuggest(char const*, CUtlVector<CUtlString, CUtlMemory<CUtlString, int>
   >&) */

int __thiscall ConCommand::AutoCompleteSuggest(ConCommand *this,char *param_1,CUtlVector *param_2)

{
  undefined4 *puVar1;
  int iVar2;
  char *pcVar3;
  int local_1030;
  CUtlString local_102c [16];
  char local_101c [4108];
  
  if (((byte)this[0x20] & 4) == 0) {
    if (*(code **)(this + 0x1c) == (code *)0x0) {
      return 0;
    }
    pcVar3 = local_101c;
    iVar2 = (**(code **)(this + 0x1c))(param_1,pcVar3);
    if (0 < iVar2) {
      local_1030 = 0;
      do {
        CUtlString::CUtlString(local_102c,pcVar3);
                    /* try { // try from 0024901a to 0024901e has its CatchHandler @ 00249068 */
        CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::InsertBefore
                  ((CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> *)param_2,
                   *(int *)(param_2 + 0xc),local_102c);
        pcVar3 = pcVar3 + 0x40;
        CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_102c);
        local_1030 = local_1030 + 1;
      } while (local_1030 != iVar2);
      return local_1030;
    }
  }
  else {
    puVar1 = *(undefined4 **)(this + 0x1c);
    iVar2 = 0;
    if (puVar1 != (undefined4 *)0x0) {
      iVar2 = (**(code **)*puVar1)(puVar1,param_1,param_2);
    }
  }
  return iVar2;
}

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)