L L4D2node

CUtlRBTree<CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::Node_t,int,CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::Node_t,int>,int>>::Insert

0x001c15b0 · 484 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIyN8CNetChan24MessageProcessingStats_tEiE6Node_tEiNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_iEiEE6InsertERKS4_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned long long, CNetChan::MessageProcessingStats_t, int>::Node_t, int,
   CUtlMap<unsigned long long, CNetChan::MessageProcessingStats_t, int>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned long long, CNetChan::MessageProcessingStats_t,
   int>::Node_t, int>, int> >::Insert(CUtlMap<unsigned long long,
   CNetChan::MessageProcessingStats_t, int>::Node_t const&) */

int __thiscall
CUtlRBTree<CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::Node_t,int,CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::Node_t,int>,int>>
::Insert(CUtlRBTree<CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::Node_t,int,CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,CNetChan::MessageProcessingStats_t,int>::Node_t,int>,int>>
         *this,Node_t *param_1)

{
  int iVar1;
  undefined4 uVar2;
  bool bVar3;
  char cVar4;
  int iVar5;
  undefined4 *puVar6;
  int iVar7;
  int local_24;
  
  iVar5 = *(int *)(this + 0x10);
  if (*(int *)(this + 0x10) == -1) {
    iVar5 = NewNode(this);
    local_24 = iVar5 * 0x28;
    puVar6 = (undefined4 *)(local_24 + *(int *)(this + 4));
    puVar6[2] = 0xffffffff;
    puVar6[1] = 0xffffffff;
    *puVar6 = 0xffffffff;
    puVar6[3] = 0;
  }
  else {
    do {
      iVar7 = iVar5;
      iVar1 = iVar7 * 0x28;
      cVar4 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar1 + 0x10);
      if (cVar4 == '\0') {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_0034169c = 0xffffffff;
          DAT_003416a0 = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        bVar3 = false;
        iVar5 = *(int *)(*(int *)(this + 4) + 4 + iVar1);
      }
      else {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_0034169c = 0xffffffff;
          DAT_003416a0 = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        iVar5 = *(int *)(*(int *)(this + 4) + iVar7 * 0x28);
        bVar3 = true;
      }
    } while (iVar5 != -1);
    iVar5 = NewNode(this);
    local_24 = iVar5 * 0x28;
    puVar6 = (undefined4 *)(local_24 + *(int *)(this + 4));
    puVar6[2] = iVar7;
    puVar6[1] = 0xffffffff;
    *puVar6 = 0xffffffff;
    puVar6[3] = 0;
    if (iVar7 != -1) {
      if (bVar3) {
        *(int *)(*(int *)(this + 4) + iVar1) = iVar5;
      }
      else {
        *(int *)(*(int *)(this + 4) + 4 + iVar1) = iVar5;
      }
      goto LAB_001c167d;
    }
  }
  *(int *)(this + 0x10) = iVar5;
LAB_001c167d:
  InsertRebalance(this,iVar5);
  *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -0x10) {
    uVar2 = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(local_24 + 0x10) = *(undefined4 *)param_1;
    *(undefined4 *)(local_24 + 0x14) = uVar2;
    *(undefined4 *)(local_24 + 0x18) = *(undefined4 *)(param_1 + 8);
    *(undefined4 *)(local_24 + 0x1c) = *(undefined4 *)(param_1 + 0xc);
    *(undefined4 *)(local_24 + 0x20) = *(undefined4 *)(param_1 + 0x10);
    *(undefined4 *)(local_24 + 0x24) = *(undefined4 *)(param_1 + 0x14);
  }
  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)