L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>::Insert

0x0006ae20 · 459 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIjN5GCSDK16JobStatsBucket_tEiE6Node_tEiNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_iEiEE6InsertERKS4_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned int, GCSDK::JobStatsBucket_t, int>::Node_t, int, CUtlMap<unsigned
   int, GCSDK::JobStatsBucket_t, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int,
   GCSDK::JobStatsBucket_t, int>::Node_t, int>, int> >::Insert(CUtlMap<unsigned int,
   GCSDK::JobStatsBucket_t, int>::Node_t const&) */

int __thiscall
CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
::Insert(CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
         *this,Node_t *param_1)

{
  bool bVar1;
  char cVar2;
  int iVar3;
  undefined4 *puVar4;
  int iVar5;
  Node_t *pNVar6;
  int iVar7;
  byte bVar8;
  int local_24;
  
  bVar8 = 0;
  iVar3 = *(int *)(this + 0x10);
  if (*(int *)(this + 0x10) == -1) {
    iVar3 = NewNode(this);
    local_24 = iVar3 * 0xec;
    puVar4 = (undefined4 *)(local_24 + *(int *)(this + 4));
    puVar4[2] = 0xffffffff;
    puVar4[1] = 0xffffffff;
    *puVar4 = 0xffffffff;
    puVar4[3] = 0;
  }
  else {
    do {
      iVar7 = iVar3;
      iVar5 = iVar7 * 0xec;
      cVar2 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar5 + 0x10);
      if (cVar2 == '\0') {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_000d2844 = 0xffffffff;
          DAT_000d2848 = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        bVar1 = false;
        iVar3 = *(int *)(*(int *)(this + 4) + 4 + iVar5);
      }
      else {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_000d2844 = 0xffffffff;
          DAT_000d2848 = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        bVar1 = true;
        iVar3 = *(int *)(*(int *)(this + 4) + iVar5);
      }
    } while (iVar3 != -1);
    iVar3 = NewNode(this);
    local_24 = iVar3 * 0xec;
    puVar4 = (undefined4 *)(local_24 + *(int *)(this + 4));
    puVar4[2] = iVar7;
    puVar4[1] = 0xffffffff;
    *puVar4 = 0xffffffff;
    puVar4[3] = 0;
    if (iVar7 != -1) {
      if (bVar1) {
        *(int *)(*(int *)(this + 4) + iVar5) = iVar3;
      }
      else {
        *(int *)(*(int *)(this + 4) + 4 + iVar5) = iVar3;
      }
      goto LAB_0006aee3;
    }
  }
  *(int *)(this + 0x10) = iVar3;
LAB_0006aee3:
  InsertRebalance(this,iVar3);
  *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -0x10) {
    *(undefined4 *)(local_24 + 0x10) = *(undefined4 *)param_1;
    pNVar6 = param_1 + 4;
    puVar4 = (undefined4 *)(local_24 + 0x14);
    for (iVar5 = 0x36; iVar5 != 0; iVar5 = iVar5 + -1) {
      *puVar4 = *(undefined4 *)pNVar6;
      pNVar6 = pNVar6 + (uint)bVar8 * -8 + 4;
      puVar4 = puVar4 + (uint)bVar8 * -2 + 1;
    }
  }
  return iVar3;
}

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)