L L4D2node

CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>::InsertRebalance

0x00bb9390 · 2562 bytes · __thiscall

_ZN10CUtlRBTreeIN12CChoreoScene10ActiveListEiPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_iEiEE15InsertRebalanceEi

Decompiled

undefined (2 params)

/* CUtlRBTree<CChoreoScene::ActiveList, int, bool (*)(CChoreoScene::ActiveList const&,
   CChoreoScene::ActiveList const&), CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList, int>, int>
   >::InsertRebalance(int) */

void __thiscall
CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::InsertRebalance(CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
                  *this,int param_1)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  
  do {
    iVar1 = *(int *)(this + 0x10);
    if (param_1 == iVar1) {
LAB_00bb93f4:
      *(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18 + 0xc) = 1;
      return;
    }
    if (Links(int)::s_Sentinel == '\0') {
      iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar1 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (param_1 == -1) goto LAB_00bb9725;
LAB_00bb93c1:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x18);
    }
    else {
      if (param_1 != -1) goto LAB_00bb93c1;
LAB_00bb9725:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar1 = puVar6[2];
    if ((Links(int)::s_Sentinel == '\0') &&
       (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_00f6d2d0 = -1;
      DAT_00f6d2d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
      if (iVar1 == -1) goto LAB_00bb96f0;
LAB_00bb93e1:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
    }
    else {
      if (iVar1 != -1) goto LAB_00bb93e1;
LAB_00bb96f0:
      puVar6 = &Links(int)::s_Sentinel;
    }
    if (puVar6[3] != 0) {
      iVar1 = *(int *)(this + 0x10);
      goto LAB_00bb93f4;
    }
    if (Links(int)::s_Sentinel == '\0') {
      iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar1 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (param_1 == -1) goto LAB_00bb9695;
LAB_00bb9429:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x18);
    }
    else {
      if (param_1 != -1) goto LAB_00bb9429;
LAB_00bb9695:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar1 = puVar6[2];
    if (Links(int)::s_Sentinel == '\0') {
      iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar5 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (iVar1 == -1) goto LAB_00bb9664;
LAB_00bb9449:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
    }
    else {
      if (iVar1 != -1) goto LAB_00bb9449;
LAB_00bb9664:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar5 = puVar6[2];
    if (Links(int)::s_Sentinel == '\0') {
      iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar4 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (iVar1 == -1) goto LAB_00bb962c;
LAB_00bb9466:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
    }
    else {
      if (iVar1 != -1) goto LAB_00bb9466;
LAB_00bb962c:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar4 = puVar6[2];
    if (Links(int)::s_Sentinel == '\0') {
      iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar3 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        goto LAB_00bb947a;
      }
      if (iVar4 == -1) goto LAB_00bb95fa;
LAB_00bb9483:
      piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x18);
    }
    else {
LAB_00bb947a:
      if (iVar4 != -1) goto LAB_00bb9483;
LAB_00bb95fa:
      piVar2 = &Links(int)::s_Sentinel;
    }
    if (iVar1 == *piVar2) {
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = -1;
          DAT_00f6d2d4 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) goto LAB_00bb9834;
LAB_00bb94a5:
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
      }
      else {
        if (iVar5 != -1) goto LAB_00bb94a5;
LAB_00bb9834:
        puVar6 = &Links(int)::s_Sentinel;
      }
      iVar4 = puVar6[1];
      if ((Links(int)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      iVar3 = DAT_00f6d2d8;
      if (iVar4 != -1) {
        iVar3 = *(int *)(*(int *)(this + 4) + iVar4 * 0x18 + 0xc);
      }
      if (iVar3 == 0) {
LAB_00bb94d6:
        *(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18 + 0xc) = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar4 * 0x18 + 0xc) = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
        param_1 = iVar5;
      }
      else {
        if (Links(int)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
          if (iVar4 != 0) {
            Links(int)::s_Sentinel = 0xffffffff;
            DAT_00f6d2d0 = -1;
            DAT_00f6d2d4 = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (param_1 == -1) goto LAB_00bb9b25;
LAB_00bb97a9:
          iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x18 + 8);
          if (Links(int)::s_Sentinel != '\0') goto LAB_00bb97c0;
LAB_00bb9b38:
          iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
          if (iVar3 == 0) goto LAB_00bb97c0;
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = -1;
          DAT_00f6d2d4 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
          if (iVar4 == -1) goto LAB_00bb9b90;
LAB_00bb97c9:
          if (param_1 != *(int *)(*(int *)(this + 4) + iVar4 * 0x18 + 4)) goto LAB_00bb97de;
LAB_00bb9ba8:
          RotateLeft(this,iVar1);
          if ((Links(int)::s_Sentinel == '\0') &&
             (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
            Links(int)::s_Sentinel = 0xffffffff;
            DAT_00f6d2d0 = -1;
            DAT_00f6d2d4 = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (iVar1 == -1) {
            puVar6 = &Links(int)::s_Sentinel;
          }
          else {
            puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
          }
          iVar5 = puVar6[2];
          if ((Links(int)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
            Links(int)::s_Sentinel = 0xffffffff;
            DAT_00f6d2d0 = -1;
            DAT_00f6d2d4 = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (iVar5 == -1) {
            puVar7 = &Links(int)::s_Sentinel;
            puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x18);
          }
          else {
            puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
            puVar7 = puVar6;
          }
          iVar5 = puVar7[2];
          param_1 = iVar1;
        }
        else {
          if (param_1 != -1) goto LAB_00bb97a9;
LAB_00bb9b25:
          iVar4 = DAT_00f6d2d4;
          if (Links(int)::s_Sentinel == '\0') goto LAB_00bb9b38;
LAB_00bb97c0:
          if (iVar4 != -1) goto LAB_00bb97c9;
LAB_00bb9b90:
          if (param_1 == DAT_00f6d2d0) goto LAB_00bb9ba8;
LAB_00bb97de:
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
        }
        puVar6[3] = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
        RotateRight(this,iVar5);
      }
    }
    else {
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = -1;
          DAT_00f6d2d4 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) goto LAB_00bb98c4;
LAB_00bb9521:
        piVar2 = (int *)(*(int *)(this + 4) + iVar5 * 0x18);
      }
      else {
        if (iVar5 != -1) goto LAB_00bb9521;
LAB_00bb98c4:
        piVar2 = &Links(int)::s_Sentinel;
      }
      iVar4 = *piVar2;
      if ((Links(int)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        if (iVar4 == -1) goto LAB_00bb9890;
LAB_00bb953d:
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar4 * 0x18);
      }
      else {
        if (iVar4 != -1) goto LAB_00bb953d;
LAB_00bb9890:
        puVar6 = &Links(int)::s_Sentinel;
      }
      if (puVar6[3] == 0) goto LAB_00bb94d6;
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = -1;
          DAT_00f6d2d4 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (param_1 == -1) goto LAB_00bb9a85;
LAB_00bb9566:
        iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x18 + 8);
        if (Links(int)::s_Sentinel != '\0') goto LAB_00bb957d;
LAB_00bb9a98:
        iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar3 == 0) goto LAB_00bb957d;
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f6d2d0 = -1;
        DAT_00f6d2d4 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        if (iVar4 == -1) goto LAB_00bb9af0;
LAB_00bb9586:
        piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x18);
      }
      else {
        if (param_1 != -1) goto LAB_00bb9566;
LAB_00bb9a85:
        iVar4 = DAT_00f6d2d4;
        if (Links(int)::s_Sentinel == '\0') goto LAB_00bb9a98;
LAB_00bb957d:
        if (iVar4 != -1) goto LAB_00bb9586;
LAB_00bb9af0:
        piVar2 = &Links(int)::s_Sentinel;
      }
      if (param_1 == *piVar2) {
        RotateRight(this,iVar1);
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = -1;
          DAT_00f6d2d4 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar1 == -1) {
          puVar6 = &Links(int)::s_Sentinel;
        }
        else {
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
        }
        iVar5 = puVar6[2];
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = -1;
          DAT_00f6d2d4 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) {
          puVar7 = &Links(int)::s_Sentinel;
          puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x18);
        }
        else {
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
          puVar7 = puVar6;
        }
        iVar5 = puVar7[2];
        param_1 = iVar1;
      }
      else {
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
      }
      puVar6[3] = 1;
      *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
      RotateLeft(this,iVar5);
    }
  } 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)