L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::InsertRebalance

0x005cfe30 · 1305 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIjP4RuletE6Node_tEtNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_tEtEE15InsertRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned int, Rule*, unsigned short>::Node_t, unsigned short, CUtlMap<unsigned
   int, Rule*, unsigned short>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int, Rule*,
   unsigned short>::Node_t, unsigned short>, unsigned short> >::InsertRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *this,ushort param_1)

{
  ushort uVar1;
  ushort uVar2;
  ushort uVar3;
  undefined2 *puVar4;
  ushort *puVar5;
  int iVar6;
  uint uVar7;
  uint uVar8;
  uint local_2c;
  ushort local_1e;
  
  local_1e = param_1;
  do {
    uVar1 = *(ushort *)(this + 0x10);
    if (local_1e == uVar1) {
LAB_005cfe9f:
      *(undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4) + 6) = 1;
      return;
    }
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar6 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f21cea = 0xffff;
        DAT_00f21cec = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_005cfe6f;
LAB_005d01d1:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_005d01d1;
LAB_005cfe6f:
      puVar4 = (undefined2 *)((uint)local_1e * 0x10 + *(int *)(this + 4));
    }
    uVar1 = puVar4[2];
    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_00f21cea = 0xffff;
      DAT_00f21cec = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar1 != 0xffff) goto LAB_005cfe8b;
LAB_005d0198:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_005d0198;
LAB_005cfe8b:
      puVar4 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
    }
    if (puVar4[3] != 0) {
      uVar1 = *(ushort *)(this + 0x10);
      goto LAB_005cfe9f;
    }
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar6 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f21cea = 0xffff;
        DAT_00f21cec = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_005cfedd;
LAB_005d0139:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_005d0139;
LAB_005cfedd:
      puVar4 = (undefined2 *)((uint)local_1e * 0x10 + *(int *)(this + 4));
    }
    uVar1 = puVar4[2];
    uVar8 = (uint)uVar1;
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar6 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f21cea = 0xffff;
        DAT_00f21cec = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_005cfeff;
LAB_005d0105:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_005d0105;
LAB_005cfeff:
      puVar4 = (undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4));
    }
    uVar2 = puVar4[2];
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar6 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f21cea = 0xffff;
        DAT_00f21cec = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_005cff21;
LAB_005d00d5:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_005d00d5;
LAB_005cff21:
      puVar4 = (undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4));
    }
    uVar3 = puVar4[2];
    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_00f21cea = 0xffff;
      DAT_00f21cec = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar3 != 0xffff) goto LAB_005cff3f;
LAB_005d00a0:
      puVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar3 == 0xffff) goto LAB_005d00a0;
LAB_005cff3f:
      puVar5 = (ushort *)((uint)uVar3 * 0x10 + *(int *)(this + 4));
    }
    uVar7 = (uint)uVar2;
    if (uVar1 == *puVar5) {
      iVar6 = Links(this,uVar2);
      uVar3 = *(ushort *)(iVar6 + 2);
      iVar6 = Links(this,uVar3);
      if (*(short *)(iVar6 + 6) == 0) {
LAB_005cff81:
        local_2c = (uint)uVar3;
        *(undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(local_2c * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar7 * 0x10 + *(int *)(this + 4) + 6) = 0;
        local_1e = uVar2;
      }
      else {
        iVar6 = Links(this,local_1e);
        iVar6 = Links(this,*(ushort *)(iVar6 + 4));
        if (local_1e == *(ushort *)(iVar6 + 2)) {
          RotateLeft(this,uVar1);
          iVar6 = Links(this,uVar1);
          uVar8 = (uint)*(ushort *)(iVar6 + 4);
          iVar6 = Links(this,*(ushort *)(iVar6 + 4));
          uVar7 = (uint)*(ushort *)(iVar6 + 4);
          local_1e = uVar1;
        }
        *(undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar7 * 0x10 + *(int *)(this + 4) + 6) = 0;
        RotateRight(this,(ushort)uVar7);
      }
    }
    else {
      puVar5 = (ushort *)Links(this,uVar2);
      uVar3 = *puVar5;
      iVar6 = Links(this,uVar3);
      if (*(short *)(iVar6 + 6) == 0) goto LAB_005cff81;
      iVar6 = Links(this,local_1e);
      puVar5 = (ushort *)Links(this,*(ushort *)(iVar6 + 4));
      if (local_1e == *puVar5) {
        RotateRight(this,uVar1);
        iVar6 = Links(this,uVar1);
        uVar8 = (uint)*(ushort *)(iVar6 + 4);
        iVar6 = Links(this,*(ushort *)(iVar6 + 4));
        uVar7 = (uint)*(ushort *)(iVar6 + 4);
        local_1e = uVar1;
      }
      *(undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4) + 6) = 1;
      *(undefined2 *)(uVar7 * 0x10 + *(int *)(this + 4) + 6) = 0;
      RotateLeft(this,(ushort)uVar7);
    }
  } while( true );
}

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)