L L4D2node

CTraceFilterSimpleClassnameList::AddClassnameToIgnore

0x00580310 · 231 bytes · __thiscall

_ZN31CTraceFilterSimpleClassnameList20AddClassnameToIgnoreEPKc

Decompiled

undefined (2 params)

/* CTraceFilterSimpleClassnameList::AddClassnameToIgnore(char const*) */

void __thiscall
CTraceFilterSimpleClassnameList::AddClassnameToIgnore
          (CTraceFilterSimpleClassnameList *this,char *param_1)

{
  int iVar1;
  int iVar2;
  void *pvVar3;
  int iVar4;
  int iVar5;
  
  iVar1 = *(int *)(this + 0x1c);
  iVar5 = *(int *)(this + 0x14);
  iVar4 = iVar1 + 1;
  if (iVar5 < iVar4) {
    iVar2 = *(int *)(this + 0x18);
    if (-1 < iVar2) {
      if (iVar2 == 0) {
        if (iVar5 == 0) {
          if (iVar4 < 9) {
            iVar2 = 8;
            goto LAB_0058039f;
          }
          iVar5 = 8;
        }
        do {
          iVar2 = iVar5 * 2;
          if (iVar4 <= iVar2) break;
          iVar2 = iVar5 * 4;
          iVar5 = iVar2;
        } while (iVar2 < iVar4);
      }
      else {
        for (iVar2 = (iVar1 / iVar2 + 1) * iVar2; iVar2 < iVar4; iVar2 = (iVar2 + iVar4) / 2) {
        }
      }
LAB_0058039f:
      *(int *)(this + 0x14) = iVar2;
      if (*(void **)(this + 0x10) == (void *)0x0) {
        pvVar3 = malloc(iVar2 << 2);
        *(void **)(this + 0x10) = pvVar3;
      }
      else {
        pvVar3 = realloc(*(void **)(this + 0x10),iVar2 << 2);
        *(void **)(this + 0x10) = pvVar3;
        iVar4 = *(int *)(this + 0x1c) + 1;
      }
      goto LAB_0058032c;
    }
  }
  pvVar3 = *(void **)(this + 0x10);
LAB_0058032c:
  *(int *)(this + 0x1c) = iVar4;
  iVar5 = iVar1 * 4;
  iVar4 = (iVar4 - iVar1) + -1;
  *(void **)(this + 0x20) = pvVar3;
  if (0 < iVar4) {
    _V_memmove((void *)((int)pvVar3 + iVar5 + 4),(void *)((int)pvVar3 + iVar5),iVar4 * 4);
    pvVar3 = *(void **)(this + 0x10);
  }
  if ((undefined4 *)(iVar5 + (int)pvVar3) != (undefined4 *)0x0) {
    *(undefined4 *)(iVar5 + (int)pvVar3) = param_1;
  }
  return;
}

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)