L L4D2node

CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short,bool(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&,CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&),CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>>::InsertRebalance

0x00620d40 · 2918 bytes · __thiscall

_ZN10CUtlRBTreeIN18CUtlCachedFileDataI17CModelSoundsCacheE13ElementType_tEtPFbRKS3_S5_E10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE15InsertRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t, unsigned short, bool
   (*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t const&,
   CUtlCachedFileData<CModelSoundsCache>::ElementType_t const&),
   CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t, unsigned short>,
   unsigned short> >::InsertRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short,bool(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&,CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&),CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short,bool(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&,CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&),CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>>
                  *this,ushort param_1)

{
  ushort uVar1;
  int iVar2;
  undefined2 *puVar3;
  ushort uVar4;
  ushort *puVar5;
  undefined2 *puVar6;
  uint uVar7;
  ushort local_20;
  ushort local_1e;
  
  local_1e = param_1;
  do {
    uVar1 = *(ushort *)(this + 0x10);
    if (local_1e == uVar1) {
LAB_00620db5:
      *(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x18 + 6) = 1;
      return;
    }
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26b9e = 0xffff;
        DAT_00f26ba0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_00620d7f;
LAB_00621101:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_00621101;
LAB_00620d7f:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
    }
    uVar1 = puVar3[2];
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
      DAT_00f26b9e = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f26ba0 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar1 != 0xffff) goto LAB_00620da1;
LAB_006210c8:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_006210c8;
LAB_00620da1:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x18);
    }
    if (puVar3[3] != 0) {
      uVar1 = *(ushort *)(this + 0x10);
      goto LAB_00620db5;
    }
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26b9e = 0xffff;
        DAT_00f26ba0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_00620ded;
LAB_00621069:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_00621069;
LAB_00620ded:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
    }
    uVar1 = puVar3[2];
    uVar7 = (uint)uVar1;
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26b9e = 0xffff;
        DAT_00f26ba0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_00620e12;
LAB_00620ff5:
      local_20 = DAT_00f26ba0;
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00620e2b;
LAB_00621010:
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26b9e = 0xffff;
        DAT_00f26ba0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_00620e35;
LAB_00621035:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_00620ff5;
LAB_00620e12:
      local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x18 + 4);
      if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00621010;
LAB_00620e2b:
      if (uVar1 == 0xffff) goto LAB_00621035;
LAB_00620e35:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
    }
    uVar4 = puVar3[2];
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26ba0 = 0xffff;
        DAT_00f26b9e = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        goto LAB_00620e4a;
      }
      if (uVar4 != 0xffff) goto LAB_00620e54;
LAB_00620fc3:
      puVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
LAB_00620e4a:
      if (uVar4 == 0xffff) goto LAB_00620fc3;
LAB_00620e54:
      puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
    }
    if (uVar1 == *puVar5) {
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar2 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f26b9e = 0xffff;
          DAT_00f26ba0 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (local_20 != 0xffff) goto LAB_00620e7f;
LAB_006212c9:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (local_20 == 0xffff) goto LAB_006212c9;
LAB_00620e7f:
        puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18);
      }
      uVar4 = puVar3[1];
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26b9e = 0xffff;
        DAT_00f26ba0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar4 != 0xffff) goto LAB_00620ea1;
LAB_006211f8:
        if (DAT_00f26ba2 == 0) goto LAB_00620eb8;
LAB_00621210:
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f26b9e = 0xffff;
            DAT_00f26ba0 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (local_1e != 0xffff) goto LAB_0062122d;
LAB_006215a9:
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (local_1e == 0xffff) goto LAB_006215a9;
LAB_0062122d:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
        }
        uVar4 = puVar3[2];
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f26b9e = 0xffff;
          DAT_00f26ba0 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar4 != 0xffff) goto LAB_0062124f;
LAB_00621500:
          if (local_1e != DAT_00f26b9e) goto LAB_00621269;
LAB_00621518:
          RotateLeft(this,uVar1);
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f26b9e = 0xffff;
            DAT_00f26ba0 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar1 == 0xffff) {
            puVar3 = &Links(unsigned_short)::s_Sentinel;
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
          }
          uVar4 = puVar3[2];
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f26b9e = 0xffff;
            DAT_00f26ba0 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar4 == 0xffff) {
            puVar6 = &Links(unsigned_short)::s_Sentinel;
            puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x17ffe8);
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
            puVar6 = puVar3;
          }
          local_20 = puVar6[2];
          local_1e = uVar1;
        }
        else {
          if (uVar4 == 0xffff) goto LAB_00621500;
LAB_0062124f:
          if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 2))
          goto LAB_00621518;
LAB_00621269:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
        }
        puVar3[3] = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 6) = 0;
        RotateRight(this,local_20);
      }
      else {
        if (uVar4 == 0xffff) goto LAB_006211f8;
LAB_00620ea1:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) != 0) goto LAB_00621210;
LAB_00620eb8:
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
        local_1e = local_20;
        *(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 6) = 0;
      }
    }
    else {
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar2 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f26b9e = 0xffff;
          DAT_00f26ba0 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (local_20 != 0xffff) goto LAB_00620f16;
LAB_00621369:
        puVar5 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (local_20 == 0xffff) goto LAB_00621369;
LAB_00620f16:
        puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0x18);
      }
      uVar4 = *puVar5;
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f26b9e = 0xffff;
        DAT_00f26ba0 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar4 != 0xffff) goto LAB_00620f37;
LAB_00621330:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar4 == 0xffff) goto LAB_00621330;
LAB_00620f37:
        puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
      }
      if (puVar3[3] == 0) {
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) = 1;
        local_1e = local_20;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 6) = 0;
      }
      else {
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f26b9e = 0xffff;
            DAT_00f26ba0 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (local_1e != 0xffff) goto LAB_0062112d;
LAB_00621619:
          uVar4 = DAT_00f26ba0;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00621145;
LAB_00621630:
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 == 0) goto LAB_00621145;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f26b9e = 0xffff;
          DAT_00f26ba0 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar4 != 0xffff) goto LAB_0062114f;
LAB_00621690:
          if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_00621168;
LAB_006216a8:
          RotateRight(this,uVar1);
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f26b9e = 0xffff;
            DAT_00f26ba0 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar1 == 0xffff) {
            puVar3 = &Links(unsigned_short)::s_Sentinel;
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
          }
          uVar4 = puVar3[2];
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00f26b9e = 0xffff;
            DAT_00f26ba0 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar4 == 0xffff) {
            puVar6 = &Links(unsigned_short)::s_Sentinel;
            puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x17ffe8);
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
            puVar6 = puVar3;
          }
          local_20 = puVar6[2];
          local_1e = uVar1;
        }
        else {
          if (local_1e == 0xffff) goto LAB_00621619;
LAB_0062112d:
          uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x18 + 4);
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00621630;
LAB_00621145:
          if (uVar4 == 0xffff) goto LAB_00621690;
LAB_0062114f:
          if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18)) goto LAB_006216a8;
LAB_00621168:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
        }
        puVar3[3] = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 6) = 0;
        RotateLeft(this,local_20);
      }
    }
  } 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)