L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert

0x005c8b40 · 769 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIjM15CResponseSystemFvR8ResponseR13ResponseGroupP17AI_ResponseParamsEtE6Node_tEtNSA_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tISB_tEtEE6InsertERKSB_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned int, void (CResponseSystem::*)(Response&, ResponseGroup&,
   AI_ResponseParams*), unsigned short>::Node_t, unsigned short, CUtlMap<unsigned int, void
   (CResponseSystem::*)(Response&, ResponseGroup&, AI_ResponseParams*), unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int, void (CResponseSystem::*)(Response&,
   ResponseGroup&, AI_ResponseParams*), unsigned short>::Node_t, unsigned short>, unsigned short>
   >::Insert(CUtlMap<unsigned int, void (CResponseSystem::*)(Response&, ResponseGroup&,
   AI_ResponseParams*), unsigned short>::Node_t const&) */

ushort __thiscall
CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         *this,Node_t *param_1)

{
  undefined4 uVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  undefined2 *puVar8;
  ushort uVar9;
  int local_24;
  ushort local_20;
  ushort local_1e;
  
  local_1e = *(ushort *)(this + 0x10);
  uVar9 = local_1e;
  if (local_1e == 0xffff) {
    bVar2 = false;
  }
  else {
    do {
      local_1e = uVar9;
      iVar4 = (uint)local_1e * 0x14;
      cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar4 + 8);
      if (cVar3 == '\0') {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f21cba = 0xffff;
          DAT_00f21cbc = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar2 = false;
        uVar9 = *(ushort *)(*(int *)(this + 4) + 2 + iVar4);
      }
      else {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f21cba = 0xffff;
          DAT_00f21cbc = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar2 = true;
        uVar9 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
      }
    } while (uVar9 != 0xffff);
  }
  uVar9 = *(ushort *)(this + 0x14);
  if (uVar9 != 0xffff) {
    iVar4 = *(int *)(this + 4);
    local_24 = (uint)uVar9 * 0x14;
    puVar8 = (undefined2 *)(local_24 + iVar4);
    *(undefined2 *)(this + 0x14) = puVar8[1];
    local_20 = uVar9;
    goto LAB_005c8bf4;
  }
  iVar4 = *(int *)(this + 8);
  if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
    uVar7 = *(ushort *)(this + 0x16) + 1;
    uVar6 = uVar7 & 0xffff;
    if (iVar4 <= (int)uVar6) {
      uVar6 = 0xffff;
      uVar7 = 0xffff;
    }
    if (iVar4 <= (int)uVar6) goto LAB_005c8dbb;
LAB_005c8d79:
    local_20 = (ushort)uVar7;
    local_24 = (uVar7 & 0xffff) * 0x14;
  }
  else {
    uVar6 = 0xffff;
    if (0 < iVar4) {
      uVar6 = 0;
    }
    uVar7 = (0 < iVar4) - 1;
    if ((int)uVar6 < iVar4) goto LAB_005c8d79;
LAB_005c8dbb:
    CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short>,unsigned_short>
    ::Grow((CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(Response&,ResponseGroup&,AI_ResponseParams*),unsigned_short>::Node_t,unsigned_short>,unsigned_short>
            *)(this + 4),1);
    iVar4 = *(int *)(this + 8);
    if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
      local_20 = *(ushort *)(this + 0x16) + 1;
      uVar6 = (uint)local_20;
      if ((int)uVar6 < iVar4) {
        local_24 = uVar6 * 0x14;
      }
      else {
        local_24 = 0x13ffec;
        uVar6 = 0xffff;
        local_20 = uVar9;
      }
    }
    else {
      uVar6 = 0;
      local_24 = 0x13ffec;
      if (iVar4 < 1) {
        uVar6 = 0xffff;
      }
      else {
        local_24 = 0;
      }
      local_20 = 0;
      if (iVar4 < 1) {
        local_20 = uVar9;
      }
    }
    if (iVar4 <= (int)uVar6) {
      Error("CUtlRBTree overflow!\n");
    }
  }
  uVar9 = (ushort)uVar6;
  *(ushort *)(this + 0x16) = local_20;
  iVar4 = *(int *)(this + 4);
  puVar8 = (undefined2 *)(local_24 + iVar4);
LAB_005c8bf4:
  *(int *)(this + 0x18) = iVar4;
  puVar8[1] = 0xffff;
  *puVar8 = 0xffff;
  puVar8[3] = 0;
  puVar8[2] = local_1e;
  if (local_1e == 0xffff) {
    *(ushort *)(this + 0x10) = local_20;
  }
  else if (bVar2) {
    *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14) = local_20;
  }
  else {
    *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14 + 2) = local_20;
  }
  InsertRebalance(this,uVar9);
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -8) {
    *(undefined4 *)(local_24 + 8) = *(undefined4 *)param_1;
    uVar1 = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(local_24 + 0x10) = *(undefined4 *)(param_1 + 8);
    *(undefined4 *)(local_24 + 0xc) = uVar1;
  }
  return local_20;
}

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)