L L4D2node

CUtlMemory<CAppSystemGroup::Module_t,int>::Grow

0x0026c020 · 161 bytes · __thiscall

_ZN10CUtlMemoryIN15CAppSystemGroup8Module_tEiE4GrowEi

Decompiled

undefined (2 params)

/* CUtlMemory<CAppSystemGroup::Module_t, int>::Grow(int) */

void __thiscall
CUtlMemory<CAppSystemGroup::Module_t,int>::Grow
          (CUtlMemory<CAppSystemGroup::Module_t,int> *this,int param_1)

{
  int iVar1;
  size_t __size;
  void *pvVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = *(int *)(this + 8);
  if (iVar3 < 0) {
    return;
  }
  iVar1 = *(int *)(this + 4);
  iVar4 = param_1 + iVar1;
  if (iVar3 == 0) {
    if (iVar1 == 0) {
      iVar1 = 3;
    }
    if (iVar1 < iVar4) {
      do {
        iVar3 = iVar1;
        iVar1 = iVar3 * 2;
      } while (iVar1 < iVar4);
      pvVar2 = *(void **)this;
      *(int *)(this + 4) = iVar1;
      __size = iVar3 * 0x18;
      goto joined_r0x0026c0b3;
    }
  }
  else {
    for (iVar1 = ((iVar4 + -1) / iVar3 + 1) * iVar3; iVar1 < iVar4; iVar1 = (iVar1 + iVar4) / 2) {
    }
  }
  pvVar2 = *(void **)this;
  *(int *)(this + 4) = iVar1;
  __size = iVar1 * 0xc;
joined_r0x0026c0b3:
  if (pvVar2 != (void *)0x0) {
    pvVar2 = realloc(pvVar2,__size);
    *(void **)this = pvVar2;
    return;
  }
  pvVar2 = malloc(__size);
  *(void **)this = pvVar2;
  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)