L L4D2node

GCSDK::CSchemaFull::AddDeleteTable

0x000891c0 · 250 bytes · __thiscall

_ZN5GCSDK11CSchemaFull14AddDeleteTableEPKc

Decompiled

undefined (2 params)

/* GCSDK::CSchemaFull::AddDeleteTable(char const*) */

void __thiscall GCSDK::CSchemaFull::AddDeleteTable(CSchemaFull *this,char *param_1)

{
  int iVar1;
  int iVar2;
  void *pvVar3;
  int iVar4;
  int iVar5;
  
  iVar1 = *(int *)(this + 0x68);
  iVar5 = *(int *)(this + 0x60);
  iVar4 = iVar1 + 1;
  if (iVar5 < iVar4) {
    iVar2 = *(int *)(this + 100);
    if (-1 < iVar2) {
      if (iVar2 == 0) {
        if (iVar5 == 0) {
          if (iVar4 < 2) {
            iVar2 = 1;
            goto LAB_0008925f;
          }
          iVar5 = 1;
        }
        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_0008925f:
      *(int *)(this + 0x60) = iVar2;
      if (*(void **)(this + 0x5c) == (void *)0x0) {
        pvVar3 = malloc(iVar2 << 7);
        *(void **)(this + 0x5c) = pvVar3;
      }
      else {
        pvVar3 = realloc(*(void **)(this + 0x5c),iVar2 << 7);
        *(void **)(this + 0x5c) = pvVar3;
        iVar4 = *(int *)(this + 0x68) + 1;
      }
      goto LAB_000891dc;
    }
  }
  pvVar3 = *(void **)(this + 0x5c);
LAB_000891dc:
  *(int *)(this + 0x68) = iVar4;
  iVar5 = iVar1 * 0x80;
  iVar4 = (iVar4 - iVar1) + -1;
  *(void **)(this + 0x6c) = pvVar3;
  if (0 < iVar4) {
    _V_memmove((void *)((int)pvVar3 + iVar5 + 0x80),(void *)((int)pvVar3 + iVar5),iVar4 * 0x80);
    pvVar3 = *(void **)(this + 0x5c);
  }
  V_strncpy((char *)(iVar5 + (int)pvVar3),param_1,0x80);
  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)