L L4D2node

CUtlRBTree<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,CPhysSaveRestoreBlockHandler::CEntityRestoreSet*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::InsertRebalance

0x00486eb0 · 2800 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIP11CBaseEntityPN28CPhysSaveRestoreBlockHandler17CEntityRestoreSetEtE6Node_tEtNS6_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS7_tEtEE15InsertRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<CBaseEntity*, CPhysSaveRestoreBlockHandler::CEntityRestoreSet*, unsigned
   short>::Node_t, unsigned short, CUtlMap<CBaseEntity*,
   CPhysSaveRestoreBlockHandler::CEntityRestoreSet*, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<CBaseEntity*,
   CPhysSaveRestoreBlockHandler::CEntityRestoreSet*, unsigned short>::Node_t, unsigned short>,
   unsigned short> >::InsertRebalance(unsigned short) */

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

{
  ushort uVar1;
  ushort uVar2;
  short sVar3;
  undefined2 *puVar4;
  undefined2 *puVar5;
  int iVar6;
  ushort uVar7;
  ushort *puVar8;
  uint uVar9;
  uint uVar10;
  uint uVar11;
  ushort uVar12;
  uint uVar13;
  
  uVar13 = (uint)param_1;
  do {
    uVar1 = *(ushort *)(this + 0x10);
    uVar12 = (ushort)uVar13;
    if (uVar12 == uVar1) {
LAB_00486f15:
      *(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_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar12 == 0xffff) goto LAB_00487265;
LAB_00486ee2:
      puVar4 = (undefined2 *)(uVar13 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (uVar12 != 0xffff) goto LAB_00486ee2;
LAB_00487265:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    uVar1 = puVar4[2];
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
      DAT_00f165f0 = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f165f2 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar1 == 0xffff) goto LAB_00487230;
LAB_00486f01:
      puVar4 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (uVar1 != 0xffff) goto LAB_00486f01;
LAB_00487230:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    if (puVar4[3] != 0) {
      uVar1 = *(ushort *)(this + 0x10);
      goto LAB_00486f15;
    }
    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_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar12 == 0xffff) goto LAB_004871d5;
LAB_00486f49:
      puVar4 = (undefined2 *)(uVar13 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (uVar12 != 0xffff) goto LAB_00486f49;
LAB_004871d5:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    uVar1 = puVar4[2];
    uVar11 = (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_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 == 0xffff) goto LAB_004871a5;
LAB_00486f6e:
      puVar4 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
    }
    else {
      if (uVar1 != 0xffff) goto LAB_00486f6e;
LAB_004871a5:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    uVar7 = puVar4[2];
    uVar10 = (uint)uVar7;
    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_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        goto LAB_00486f83;
      }
      if (uVar1 == 0xffff) goto LAB_00487173;
LAB_00486f8d:
      puVar4 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
    }
    else {
LAB_00486f83:
      if (uVar1 != 0xffff) goto LAB_00486f8d;
LAB_00487173:
      puVar4 = &Links(unsigned_short)::s_Sentinel;
    }
    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_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        goto LAB_00486fa2;
      }
      if (uVar2 == 0xffff) goto LAB_00487139;
LAB_00486fac:
      puVar8 = (ushort *)((uint)uVar2 * 0x10 + *(int *)(this + 4));
    }
    else {
LAB_00486fa2:
      if (uVar2 != 0xffff) goto LAB_00486fac;
LAB_00487139:
      puVar8 = &Links(unsigned_short)::s_Sentinel;
    }
    if (uVar1 == *puVar8) {
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar6 != 0) {
          DAT_00f165f0 = 0xffff;
          DAT_00f165f2 = 0xffff;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00486fc6;
        }
        if (uVar7 == 0xffff) goto LAB_0048738b;
LAB_00486fd0:
        puVar4 = (undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4));
      }
      else {
LAB_00486fc6:
        if (uVar7 != 0xffff) goto LAB_00486fd0;
LAB_0048738b:
        puVar4 = &Links(unsigned_short)::s_Sentinel;
      }
      uVar7 = puVar4[1];
      uVar9 = (uint)uVar7;
      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_00f165f2 = 0xffff;
        DAT_00f165f0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      sVar3 = DAT_00f165f4;
      if (uVar7 != 0xffff) {
        sVar3 = *(short *)(uVar9 * 0x10 + *(int *)(this + 4) + 6);
      }
      if (sVar3 == 0) {
LAB_00487003:
        *(undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4) + 6) = 0;
        uVar13 = uVar10;
      }
      else {
        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_00f165f0 = 0xffff;
            DAT_00f165f2 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            goto LAB_004872ef;
          }
          if (uVar12 == 0xffff) goto LAB_004876fb;
LAB_004872f9:
          uVar7 = *(ushort *)(uVar13 * 0x10 + *(int *)(this + 4) + 4);
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0048730e;
LAB_00487710:
          iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar6 == 0) goto LAB_0048730e;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f165f0 = 0xffff;
          DAT_00f165f2 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar7 == 0xffff) goto LAB_00487770;
LAB_00487318:
          if (uVar12 != *(ushort *)((uint)uVar7 * 0x10 + *(int *)(this + 4) + 2)) goto LAB_0048732e;
LAB_00487788:
          RotateLeft(this,uVar1);
          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_00f165f0 = 0xffff;
            DAT_00f165f2 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar1 == 0xffff) {
            puVar4 = &Links(unsigned_short)::s_Sentinel;
          }
          else {
            puVar4 = (undefined2 *)(uVar11 * 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_00f165f0 = 0xffff;
            DAT_00f165f2 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar1 == 0xffff) {
            puVar4 = &Links(unsigned_short)::s_Sentinel;
            puVar5 = (undefined2 *)(*(int *)(this + 4) + 0xffff0);
          }
          else {
            puVar5 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
            puVar4 = puVar5;
          }
          uVar10 = (uint)(ushort)puVar4[2];
        }
        else {
LAB_004872ef:
          if (uVar12 != 0xffff) goto LAB_004872f9;
LAB_004876fb:
          uVar7 = DAT_00f165f2;
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00487710;
LAB_0048730e:
          if (uVar7 != 0xffff) goto LAB_00487318;
LAB_00487770:
          if (uVar12 == DAT_00f165f0) goto LAB_00487788;
LAB_0048732e:
          puVar5 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
          uVar11 = uVar13;
        }
        puVar5[3] = 1;
        *(undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4) + 6) = 0;
        RotateRight(this,(ushort)uVar10);
        uVar13 = uVar11;
      }
    }
    else {
      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_00f165f0 = 0xffff;
          DAT_00f165f2 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00487048;
        }
        if (uVar7 == 0xffff) goto LAB_00487433;
LAB_00487052:
        puVar8 = (ushort *)(uVar10 * 0x10 + *(int *)(this + 4));
      }
      else {
LAB_00487048:
        if (uVar7 != 0xffff) goto LAB_00487052;
LAB_00487433:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      uVar7 = *puVar8;
      uVar9 = (uint)uVar7;
      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_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar7 == 0xffff) goto LAB_004873f8;
LAB_00487070:
        puVar4 = (undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4));
      }
      else {
        if (uVar7 != 0xffff) goto LAB_00487070;
LAB_004873f8:
        puVar4 = &Links(unsigned_short)::s_Sentinel;
      }
      if (puVar4[3] == 0) goto LAB_00487003;
      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_00f165f0 = 0xffff;
          DAT_00f165f2 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          goto LAB_00487093;
        }
        if (uVar12 == 0xffff) goto LAB_0048764b;
LAB_0048709d:
        uVar7 = *(ushort *)(uVar13 * 0x10 + *(int *)(this + 4) + 4);
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004870b2;
LAB_00487660:
        iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar6 == 0) goto LAB_004870b2;
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f165f0 = 0xffff;
        DAT_00f165f2 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar7 == 0xffff) goto LAB_004876c0;
LAB_004870bc:
        puVar8 = (ushort *)((uint)uVar7 * 0x10 + *(int *)(this + 4));
      }
      else {
LAB_00487093:
        if (uVar12 != 0xffff) goto LAB_0048709d;
LAB_0048764b:
        uVar7 = DAT_00f165f2;
        if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00487660;
LAB_004870b2:
        if (uVar7 != 0xffff) goto LAB_004870bc;
LAB_004876c0:
        puVar8 = &Links(unsigned_short)::s_Sentinel;
      }
      if (uVar12 == *puVar8) {
        RotateRight(this,uVar1);
        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_00f165f0 = 0xffff;
          DAT_00f165f2 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar1 == 0xffff) {
          puVar4 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          puVar4 = (undefined2 *)(uVar11 * 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_00f165f0 = 0xffff;
          DAT_00f165f2 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (uVar1 == 0xffff) {
          puVar4 = &Links(unsigned_short)::s_Sentinel;
          puVar5 = (undefined2 *)(*(int *)(this + 4) + 0xffff0);
        }
        else {
          puVar5 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
          puVar4 = puVar5;
        }
        uVar10 = (uint)(ushort)puVar4[2];
      }
      else {
        puVar5 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
        uVar11 = uVar13;
      }
      puVar5[3] = 1;
      *(undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4) + 6) = 0;
      RotateLeft(this,(ushort)uVar10);
      uVar13 = uVar11;
    }
  } 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)