L L4D2node

CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert

0x0007e530 · 490 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapI8CSteamIDPN5GCSDK14CGCUserSessionEtE6Node_tEtNS5_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS6_tEtEE6InsertERKS6_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<CSteamID, GCSDK::CGCUserSession*, unsigned short>::Node_t, unsigned short,
   CUtlMap<CSteamID, GCSDK::CGCUserSession*, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID, GCSDK::CGCUserSession*, unsigned short>::Node_t,
   unsigned short>, unsigned short> >::Insert(CUtlMap<CSteamID, GCSDK::CGCUserSession*, unsigned
   short>::Node_t const&) */

uint __thiscall
CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCUserSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         *this,Node_t *param_1)

{
  int iVar1;
  ushort uVar2;
  undefined4 uVar3;
  bool bVar4;
  char cVar5;
  int iVar6;
  uint uVar7;
  undefined2 *puVar8;
  uint uVar9;
  int local_24;
  ushort local_1e;
  
  uVar2 = *(ushort *)(this + 0x10);
  if (*(ushort *)(this + 0x10) == 0xffff) {
    uVar7 = NewNode(this);
    uVar9 = uVar7 & 0xffff;
    local_24 = uVar9 * 0x14;
    puVar8 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar8[2] = 0xffff;
    puVar8[1] = 0xffff;
    *puVar8 = 0xffff;
    puVar8[3] = 0;
  }
  else {
    do {
      local_1e = uVar2;
      iVar1 = (uint)local_1e * 0x14;
      cVar5 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar1 + 8);
      if (cVar5 == '\0') {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d286a = 0xffff;
          DAT_000d286c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar4 = false;
        uVar2 = *(ushort *)(*(int *)(this + 4) + 2 + iVar1);
      }
      else {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_000d286a = 0xffff;
          DAT_000d286c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar4 = true;
        uVar2 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
      }
    } while (uVar2 != 0xffff);
    uVar7 = NewNode(this);
    uVar9 = uVar7 & 0xffff;
    local_24 = uVar9 * 0x14;
    puVar8 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar8[2] = local_1e;
    puVar8[1] = 0xffff;
    *puVar8 = 0xffff;
    puVar8[3] = 0;
    if (local_1e != 0xffff) {
      if (bVar4) {
        *(short *)(*(int *)(this + 4) + iVar1) = (short)uVar7;
      }
      else {
        *(short *)(*(int *)(this + 4) + 2 + iVar1) = (short)uVar7;
      }
      goto LAB_0007e608;
    }
  }
  *(short *)(this + 0x10) = (short)uVar7;
LAB_0007e608:
  InsertRebalance(this,(ushort)uVar9);
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -8) {
    uVar3 = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(local_24 + 8) = *(undefined4 *)param_1;
    *(undefined4 *)(local_24 + 0xc) = uVar3;
    *(undefined4 *)(local_24 + 0x10) = *(undefined4 *)(param_1 + 8);
  }
  return uVar7;
}

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)