L L4D2node

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

0x00ba1830 · 400 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKc10EventGroupiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE7NewNodeEv

Decompiled

undefined (1 param)

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

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

{
  int iVar1;
  int iVar2;
  void *pvVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar5 = *(int *)(this + 0x18);
  if (iVar5 != -1) {
    iVar6 = *(int *)(this + 4);
    iVar2 = iVar5 * 0x30 + iVar6;
    *(undefined4 *)(this + 0x18) = *(undefined4 *)(iVar2 + 4);
    goto LAB_00ba1855;
  }
  iVar6 = *(int *)(this + 0x1c);
  iVar2 = *(int *)(this + 8);
  if ((iVar6 < 0) || (iVar2 <= iVar6)) {
    if (iVar2 < 1) goto LAB_00ba18f0;
LAB_00ba18dc:
    iVar2 = 0;
    iVar5 = 0;
  }
  else {
    iVar4 = iVar6 + 1;
    if ((iVar4 < 0) || (iVar2 <= iVar4)) {
LAB_00ba18f0:
      iVar4 = *(int *)(this + 0xc);
      if (-1 < iVar4) {
        iVar1 = iVar2 + 1;
        if (iVar4 == 0) {
          iVar4 = 1;
          if (iVar2 != 0) {
            iVar4 = iVar2;
          }
          while (iVar2 = iVar4, iVar2 < iVar1) {
            iVar4 = iVar2 * 2;
          }
        }
        else {
          for (iVar2 = iVar4 * (iVar2 / iVar4 + 1); iVar2 < iVar1; iVar2 = (iVar2 + iVar1) / 2) {
          }
        }
        *(int *)(this + 8) = iVar2;
        if (*(void **)(this + 4) == (void *)0x0) {
          pvVar3 = malloc(iVar2 * 0x30);
          *(void **)(this + 4) = pvVar3;
        }
        else {
          pvVar3 = realloc(*(void **)(this + 4),iVar2 * 0x30);
          iVar6 = *(int *)(this + 0x1c);
          *(void **)(this + 4) = pvVar3;
          iVar2 = *(int *)(this + 8);
        }
      }
      if ((iVar6 < 0) || (iVar2 <= iVar6)) {
        if (0 < iVar2) goto LAB_00ba18dc;
      }
      else {
        iVar6 = iVar6 + 1;
        if ((-1 < iVar6) && (iVar6 < iVar2)) {
          iVar2 = iVar6 * 0x30;
          iVar5 = iVar6;
          goto LAB_00ba18e0;
        }
      }
      Error("CUtlRBTree overflow!\n");
      iVar2 = -0x30;
    }
    else {
      iVar2 = iVar4 * 0x30;
      iVar5 = iVar4;
    }
  }
LAB_00ba18e0:
  iVar6 = *(int *)(this + 4);
  *(int *)(this + 0x1c) = iVar5;
  iVar2 = iVar2 + iVar6;
LAB_00ba1855:
  if (iVar2 != -0x10) {
    *(undefined2 *)(iVar2 + 0x24) = 0xffff;
    *(code **)(iVar2 + 0x14) = ChoreEventStartTimeLessFunc;
    *(undefined4 *)(iVar2 + 0x18) = 0;
    *(undefined4 *)(iVar2 + 0x1c) = 0;
    *(undefined4 *)(iVar2 + 0x20) = 0;
    *(undefined2 *)(iVar2 + 0x26) = 0;
    *(undefined2 *)(iVar2 + 0x28) = 0xffff;
    *(undefined2 *)(iVar2 + 0x2a) = 0xffff;
    *(undefined4 *)(iVar2 + 0x2c) = 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)