L L4D2node

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

0x0017ff40 · 358 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKc12CMapListItemiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE7NewNodeEv

Decompiled

undefined (1 param)

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

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

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar5 = *(int *)(this + 0x18);
  if (iVar5 != -1) {
    iVar6 = *(int *)(this + 4);
    iVar4 = iVar5 * 0x1c + iVar6;
    *(undefined4 *)(this + 0x18) = *(undefined4 *)(iVar4 + 4);
    goto LAB_0017ff69;
  }
  iVar6 = *(int *)(this + 0x1c);
  iVar4 = *(int *)(this + 8);
  if ((iVar6 < 0) || (iVar4 <= iVar6)) {
    if (iVar4 < 1) goto LAB_0017ffd8;
LAB_0017ffc4:
    iVar4 = 0;
    iVar5 = 0;
  }
  else {
    iVar3 = iVar6 + 1;
    if ((iVar3 < 0) || (iVar4 <= iVar3)) {
LAB_0017ffd8:
      iVar3 = *(int *)(this + 0xc);
      if (-1 < iVar3) {
        iVar1 = iVar4 + 1;
        if (iVar3 == 0) {
          iVar3 = 2;
          if (iVar4 != 0) {
            iVar3 = iVar4;
          }
          while (iVar4 = iVar3, iVar4 < iVar1) {
            iVar3 = iVar4 * 2;
          }
        }
        else {
          for (iVar4 = iVar3 * (iVar4 / iVar3 + 1); iVar4 < iVar1; iVar4 = (iVar4 + iVar1) / 2) {
          }
        }
        *(int *)(this + 8) = iVar4;
        if (*(void **)(this + 4) == (void *)0x0) {
          pvVar2 = malloc(iVar4 * 0x1c);
          *(void **)(this + 4) = pvVar2;
        }
        else {
          pvVar2 = realloc(*(void **)(this + 4),iVar4 * 0x1c);
          iVar6 = *(int *)(this + 0x1c);
          *(void **)(this + 4) = pvVar2;
          iVar4 = *(int *)(this + 8);
        }
      }
      if ((iVar6 < 0) || (iVar4 <= iVar6)) {
        if (0 < iVar4) goto LAB_0017ffc4;
      }
      else {
        iVar6 = iVar6 + 1;
        if (iVar6 < iVar4) {
          iVar4 = iVar6 * 0x1c;
          iVar5 = iVar6;
          goto LAB_0017ffc8;
        }
      }
      Error("CUtlRBTree overflow!\n");
      iVar4 = -0x1c;
    }
    else {
      iVar4 = iVar3 * 0x1c;
      iVar5 = iVar3;
    }
  }
LAB_0017ffc8:
  iVar6 = *(int *)(this + 4);
  *(int *)(this + 0x1c) = iVar5;
  iVar4 = iVar4 + iVar6;
LAB_0017ff69:
  if (iVar4 != -0x10) {
    *(undefined4 *)(iVar4 + 0x14) = 1;
    *(undefined4 *)(iVar4 + 0x18) = 0;
    iVar6 = *(int *)(this + 4);
  }
  *(int *)(this + 0x20) = iVar6;
  return iVar5;
}

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)