L L4D2node

CUtlRBTree<CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Unlink

0x002218b0 · 3451 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIy19PublishedFileInfo_ttE6Node_tEtNS2_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE6UnlinkEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned long long, PublishedFileInfo_t, unsigned short>::Node_t, unsigned
   short, CUtlMap<unsigned long long, PublishedFileInfo_t, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned long long, PublishedFileInfo_t, unsigned
   short>::Node_t, unsigned short>, unsigned short> >::Unlink(unsigned short) */

void __thiscall
CUtlRBTree<CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,PublishedFileInfo_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         *this,ushort param_1)

{
  short sVar1;
  char cVar2;
  int iVar3;
  short *psVar4;
  undefined2 *puVar5;
  ushort uVar6;
  ushort *puVar7;
  ushort uVar8;
  short sVar9;
  uint uVar10;
  bool bVar11;
  int local_2c;
  ushort local_26;
  int local_20;
  
  if (param_1 == 0xffff) {
    return;
  }
  if (Links(unsigned_short)::s_Sentinel == '\0') {
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    local_2c = (uint)param_1 * 0x2540;
    psVar4 = (short *)(*(int *)(this + 4) + local_2c);
    if (*psVar4 != -1) {
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00221a9f;
      iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar3 != 0) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      uVar8 = *(ushort *)(local_2c + *(int *)(this + 4) + 2);
      uVar10 = (uint)uVar8;
      if (uVar8 != 0xffff) {
        cVar2 = Links(unsigned_short)::s_Sentinel;
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar3 == 0) {
            uVar10 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_2c);
            cVar2 = Links(unsigned_short)::s_Sentinel;
          }
          else {
            Links(unsigned_short)::s_Sentinel = -1;
            DAT_00341a9a = 0xffff;
            DAT_00341a9c = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
            uVar10 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_2c);
            cVar2 = Links(unsigned_short)::s_Sentinel;
          }
        }
        goto LAB_00221b01;
      }
    }
LAB_00221900:
    uVar10 = (uint)param_1;
    local_20 = local_2c;
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00221b34;
LAB_00221912:
    uVar8 = (ushort)uVar10;
    if (uVar8 == 0xffff) goto LAB_00221b59;
LAB_0022191c:
    if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_00221b70;
LAB_0022192c:
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00341a9a = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar8 == 0xffff) {
      puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar7 = (ushort *)(local_20 + *(int *)(this + 4));
    }
    local_26 = *puVar7;
  }
  else {
    local_2c = (uint)param_1 * 0x2540;
    psVar4 = (short *)(local_2c + *(int *)(this + 4));
    if (*psVar4 == -1) goto LAB_00221900;
LAB_00221a9f:
    uVar10 = (uint)(ushort)psVar4[1];
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (psVar4[1] == 0xffff) goto LAB_00221900;
LAB_00221b01:
    while( true ) {
      sVar9 = (short)uVar10;
      if ((cVar2 == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
         cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        cVar2 = Links(unsigned_short)::s_Sentinel;
      }
      sVar1 = Links(unsigned_short)::s_Sentinel;
      if (sVar9 != -1) {
        sVar1 = *(short *)(uVar10 * 0x2540 + *(int *)(this + 4));
      }
      if (sVar1 == -1) break;
      if (cVar2 == '\0') {
        iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar3 != 0) {
          DAT_00341a9a = 0xffff;
          Links(unsigned_short)::s_Sentinel = -1;
          DAT_00341a9c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        cVar2 = Links(unsigned_short)::s_Sentinel;
        if (sVar9 != -1) goto LAB_00221af5;
LAB_00221bbd:
        puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (sVar9 == -1) goto LAB_00221bbd;
LAB_00221af5:
        puVar7 = (ushort *)(uVar10 * 0x2540 + *(int *)(this + 4));
      }
      uVar10 = (uint)*puVar7;
    }
    local_20 = uVar10 * 0x2540;
    if (cVar2 != '\0') goto LAB_00221912;
LAB_00221b34:
    uVar8 = (ushort)uVar10;
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) goto LAB_0022191c;
LAB_00221b59:
    if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_0022192c;
LAB_00221b70:
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar8 == 0xffff) {
      puVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar5 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    local_26 = puVar5[1];
  }
  if (local_26 != 0xffff) {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar5 = &Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) {
      puVar5 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + (uint)local_26 * 0x2540) = puVar5[2];
  }
  if (uVar8 == *(ushort *)(this + 0x10)) {
    *(ushort *)(this + 0x10) = local_26;
  }
  else {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00341a9a = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar8 == 0xffff) {
      puVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar5 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    uVar6 = puVar5[2];
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar6 == 0xffff) {
      puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar7 = (ushort *)((uint)uVar6 * 0x2540 + *(int *)(this + 4));
    }
    if (uVar8 == *puVar7) {
      if ((cVar2 == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      puVar5 = &Links(unsigned_short)::s_Sentinel;
      if (uVar8 != 0xffff) {
        puVar5 = (undefined2 *)(*(int *)(this + 4) + local_20);
      }
      *(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar5[2] * 0x2540) = local_26;
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    else {
      if ((cVar2 == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
         cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
        DAT_00341a9a = 0xffff;
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        cVar2 = Links(unsigned_short)::s_Sentinel;
      }
      puVar5 = &Links(unsigned_short)::s_Sentinel;
      if (uVar8 != 0xffff) {
        puVar5 = (undefined2 *)(*(int *)(this + 4) + local_20);
      }
      *(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar5[2] * 0x2540) = local_26;
    }
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341a9a = 0xffff;
    DAT_00341a9c = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  sVar9 = DAT_00341a9e;
  if ((uVar8 != 0xffff) && (sVar9 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar8 == param_1)
     ) goto LAB_00221a2f;
  if (Links(unsigned_short)::s_Sentinel == '\0') {
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    bVar11 = Links(unsigned_short)::s_Sentinel != '\0';
    *(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
         *(undefined2 *)(*(int *)(this + 4) + 4 + local_2c);
    if (bVar11) goto LAB_00221bfa;
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      DAT_00341a9a = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    bVar11 = Links(unsigned_short)::s_Sentinel == '\0';
    *(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
         *(undefined2 *)(*(int *)(this + 4) + 2 + local_2c);
    if ((bVar11) && (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
  }
  else {
    *(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
         *(undefined2 *)(*(int *)(this + 4) + 4 + local_2c);
LAB_00221bfa:
    *(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
         *(undefined2 *)(*(int *)(this + 4) + 2 + local_2c);
  }
  *(undefined2 *)(*(int *)(this + 4) + local_20) = *(undefined2 *)(*(int *)(this + 4) + local_2c);
  if (param_1 == *(ushort *)(this + 0x10)) {
    *(ushort *)(this + 0x10) = uVar8;
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  else {
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar3 != 0) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      uVar6 = *(ushort *)(*(int *)(this + 4) + 4 + local_2c);
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        Links(unsigned_short)::s_Sentinel = -1;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
    }
    else {
      uVar6 = *(ushort *)(*(int *)(this + 4) + 4 + local_2c);
    }
    if (uVar6 == 0xffff) {
      puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar7 = (ushort *)((uint)uVar6 * 0x2540 + *(int *)(this + 4));
    }
    if (param_1 == *puVar7) {
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      *(ushort *)
       (*(int *)(this + 4) + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_2c) * 0x2540) = uVar8;
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    else {
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341a9a = 0xffff;
        DAT_00341a9c = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      cVar2 = Links(unsigned_short)::s_Sentinel;
      *(ushort *)
       (*(int *)(this + 4) + 2 + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_2c) * 0x2540) =
           uVar8;
    }
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
     cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
    DAT_00341a9a = 0xffff;
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341a9c = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  if (uVar8 == 0xffff) {
    psVar4 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    psVar4 = (short *)(local_20 + *(int *)(this + 4));
  }
  if (*psVar4 != -1) {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9a = 0xffff;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) {
      puVar7 = (ushort *)(local_20 + *(int *)(this + 4));
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar7 * 0x2540) = uVar8;
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
     cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341a9a = 0xffff;
    DAT_00341a9c = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  if (uVar8 == 0xffff) {
    puVar5 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    puVar5 = (undefined2 *)(local_20 + *(int *)(this + 4));
  }
  if (puVar5[1] != -1) {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00341a9a = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341a9c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar5 = &Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) {
      puVar5 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)(ushort)puVar5[1] * 0x2540) = uVar8;
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341a9a = 0xffff;
    DAT_00341a9c = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
       *(undefined2 *)(*(int *)(this + 4) + 6 + local_2c);
LAB_00221a2f:
  if ((local_26 != 0xffff) && (sVar9 == 1)) {
    RemoveRebalance(this,local_26);
    return;
  }
  return;
}

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)