L L4D2node

CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>::NewNode

0x000f54d0 · 301 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKciiE6Node_tEiNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_iEiEE7NewNodeEv

Decompiled

undefined (1 param)

/* CUtlRBTree<CUtlMap<char const*, int, int>::Node_t, int, CUtlMap<char const*, int, int>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*, int, int>::Node_t, int>, int> >::NewNode() */

int __thiscall
CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
::NewNode(CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
          *this)

{
  int iVar1;
  undefined4 uVar2;
  void *pvVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar6 = *(int *)(this + 0x18);
  if (iVar6 != -1) {
    uVar2 = *(undefined4 *)(*(int *)(this + 4) + 4 + iVar6 * 0x18);
    *(int *)(this + 0x20) = *(int *)(this + 4);
    *(undefined4 *)(this + 0x18) = uVar2;
    return iVar6;
  }
  iVar6 = *(int *)(this + 0x1c);
  iVar5 = *(int *)(this + 8);
  if ((iVar6 < 0) || (iVar5 <= iVar6)) {
    if (iVar5 < 1) goto LAB_000f5540;
LAB_000f5524:
    iVar4 = 0;
  }
  else {
    iVar4 = iVar6 + 1;
    if ((-1 < iVar4) && (iVar4 < iVar5)) goto LAB_000f5526;
LAB_000f5540:
    iVar4 = *(int *)(this + 0xc);
    if (-1 < iVar4) {
      iVar1 = iVar5 + 1;
      if (iVar4 == 0) {
        iVar4 = 2;
        if (iVar5 != 0) {
          iVar4 = iVar5;
        }
        while (iVar5 = iVar4, iVar5 < iVar1) {
          iVar4 = iVar5 * 2;
        }
      }
      else {
        for (iVar5 = iVar4 * (iVar5 / iVar4 + 1); iVar5 < iVar1; iVar5 = (iVar5 + iVar1) / 2) {
        }
      }
      *(int *)(this + 8) = iVar5;
      if (*(void **)(this + 4) == (void *)0x0) {
        pvVar3 = malloc(iVar5 * 0x18);
        *(void **)(this + 4) = pvVar3;
      }
      else {
        pvVar3 = realloc(*(void **)(this + 4),iVar5 * 0x18);
        iVar6 = *(int *)(this + 0x1c);
        *(void **)(this + 4) = pvVar3;
        iVar5 = *(int *)(this + 8);
      }
    }
    if ((iVar6 < 0) || (iVar5 <= iVar6)) {
      if (0 < iVar5) goto LAB_000f5524;
    }
    else {
      iVar4 = iVar6 + 1;
      if (iVar4 < iVar5) goto LAB_000f5526;
    }
    Error("CUtlRBTree overflow!\n");
    iVar4 = -1;
  }
LAB_000f5526:
  *(int *)(this + 0x1c) = iVar4;
  *(undefined4 *)(this + 0x20) = *(undefined4 *)(this + 4);
  return iVar4;
}

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)