L L4D2node

CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>::Grow

0x003eb4c0 · 193 bytes · __thiscall

_ZN10CUtlMemoryI15UtlRBTreeNode_tIN7CUtlMapIiP16CBaseAchievementtE6Node_tEtEtE4GrowEi

Decompiled

undefined (2 params)

/* CUtlMemory<UtlRBTreeNode_t<CUtlMap<int, CBaseAchievement*, unsigned short>::Node_t, unsigned
   short>, unsigned short>::Grow(int) */

void __thiscall
CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
::Grow(CUtlMemory<UtlRBTreeNode_t<CUtlMap<int,CBaseAchievement*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
       *this,int param_1)

{
  int iVar1;
  uint uVar2;
  void *pvVar3;
  uint uVar4;
  uint uVar5;
  
  iVar1 = *(int *)(this + 8);
  if (iVar1 < 0) {
    return;
  }
  uVar2 = *(uint *)(this + 4);
  uVar4 = param_1 + uVar2;
  if (iVar1 == 0) {
    if (uVar2 == 0) {
      uVar2 = 2;
    }
    for (; (int)uVar2 < (int)uVar4; uVar2 = uVar2 * 2) {
    }
  }
  else {
    uVar2 = ((int)(uVar4 - 1) / iVar1 + 1) * iVar1;
  }
  if ((int)(uVar2 & 0xffff) < (int)uVar4) {
    if ((short)uVar2 == 0) {
      uVar2 = uVar2 - 1;
      if (0xffff < (int)uVar4) {
        return;
      }
    }
    else {
      uVar5 = uVar4 & 0xffff;
      if (uVar5 != uVar4) {
        return;
      }
      if ((int)(uVar2 & 0xffff) < (int)uVar4) {
        do {
          uVar2 = (int)(uVar2 + uVar5) / 2;
        } while ((uVar2 & 0xffff) < uVar5);
      }
    }
  }
  *(uint *)(this + 4) = uVar2;
  if (*(void **)this != (void *)0x0) {
    pvVar3 = realloc(*(void **)this,uVar2 << 4);
    *(void **)this = pvVar3;
    return;
  }
  pvVar3 = malloc(uVar2 << 4);
  *(void **)this = pvVar3;
  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)