L L4D2node

CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>::Unlink

0x006dfee0 · 3397 bytes · __thiscall

_ZN10CUtlRBTreeI10CGameEventtPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE6UnlinkEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CGameEvent, unsigned short, bool (*)(CGameEvent const&, CGameEvent const&),
   CUtlMemory<UtlRBTreeNode_t<CGameEvent, unsigned short>, unsigned short> >::Unlink(unsigned short)
    */

void __thiscall
CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
         *this,ushort param_1)

{
  short sVar1;
  char cVar2;
  int iVar3;
  ushort uVar4;
  ushort *puVar5;
  undefined2 *puVar6;
  ushort uVar7;
  short sVar8;
  uint uVar9;
  short *psVar10;
  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_00f3c852 = 0xffff;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    local_2c = (uint)param_1 * 0x14;
    psVar10 = (short *)(*(int *)(this + 4) + local_2c);
    if (*psVar10 != -1) {
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_006e00bf;
      iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar3 != 0) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00f3c852 = 0xffff;
        DAT_00f3c854 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      uVar7 = *(ushort *)(*(int *)(this + 4) + local_2c + 2);
      uVar9 = (uint)uVar7;
      if (uVar7 != 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) {
            Links(unsigned_short)::s_Sentinel = -1;
            DAT_00f3c852 = 0xffff;
            DAT_00f3c854 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          uVar9 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_2c);
          cVar2 = Links(unsigned_short)::s_Sentinel;
        }
        goto LAB_006e0121;
      }
    }
LAB_006dff28:
    uVar9 = (uint)param_1;
    local_20 = local_2c;
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_006e0158;
LAB_006dff3a:
    uVar7 = (ushort)uVar9;
    if (uVar7 == 0xffff) goto LAB_006e017d;
LAB_006dff44:
    if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_006e0190;
LAB_006dff54:
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00f3c852 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar7 == 0xffff) {
      puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar5 = (ushort *)(local_20 + *(int *)(this + 4));
    }
    local_26 = *puVar5;
  }
  else {
    local_2c = (uint)param_1 * 0x14;
    psVar10 = (short *)(local_2c + *(int *)(this + 4));
    if (*psVar10 == -1) goto LAB_006dff28;
LAB_006e00bf:
    uVar9 = (uint)(ushort)psVar10[1];
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (psVar10[1] == 0xffff) goto LAB_006dff28;
LAB_006e0121:
    while( true ) {
      sVar8 = (short)uVar9;
      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_00f3c852 = 0xffff;
        DAT_00f3c854 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        cVar2 = Links(unsigned_short)::s_Sentinel;
      }
      sVar1 = Links(unsigned_short)::s_Sentinel;
      if (sVar8 != -1) {
        sVar1 = *(short *)(*(int *)(this + 4) + uVar9 * 0x14);
      }
      if (sVar1 == -1) break;
      if (cVar2 == '\0') {
        iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar3 != 0) {
          DAT_00f3c852 = 0xffff;
          Links(unsigned_short)::s_Sentinel = -1;
          DAT_00f3c854 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        cVar2 = Links(unsigned_short)::s_Sentinel;
        if (sVar8 != -1) goto LAB_006e0115;
LAB_006e01dd:
        puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (sVar8 == -1) goto LAB_006e01dd;
LAB_006e0115:
        puVar5 = (ushort *)(*(int *)(this + 4) + uVar9 * 0x14);
      }
      uVar9 = (uint)*puVar5;
    }
    local_20 = uVar9 * 0x14;
    if (cVar2 != '\0') goto LAB_006dff3a;
LAB_006e0158:
    uVar7 = (ushort)uVar9;
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f3c852 = 0xffff;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (uVar7 != 0xffff) goto LAB_006dff44;
LAB_006e017d:
    if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_006dff54;
LAB_006e0190:
    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_00f3c852 = 0xffff;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar7 == 0xffff) {
      puVar6 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    local_26 = puVar6[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_00f3c852 = 0xffff;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar6 = &Links(unsigned_short)::s_Sentinel;
    if (uVar7 != 0xffff) {
      puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + (uint)local_26 * 0x14) = puVar6[2];
  }
  if (uVar7 == *(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_00f3c852 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar7 == 0xffff) {
      puVar6 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    uVar4 = puVar6[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_00f3c852 = 0xffff;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar4 == 0xffff) {
      puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
    }
    if (uVar7 == *puVar5) {
      if ((cVar2 == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00f3c852 = 0xffff;
        DAT_00f3c854 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      puVar6 = &Links(unsigned_short)::s_Sentinel;
      if (uVar7 != 0xffff) {
        puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
      }
      *(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar6[2] * 0x14) = 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_00f3c852 = 0xffff;
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00f3c854 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        cVar2 = Links(unsigned_short)::s_Sentinel;
      }
      puVar6 = &Links(unsigned_short)::s_Sentinel;
      if (uVar7 != 0xffff) {
        puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
      }
      *(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar6[2] * 0x14) = local_26;
    }
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00f3c852 = 0xffff;
    DAT_00f3c854 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  sVar8 = DAT_00f3c856;
  if ((uVar7 != 0xffff) && (sVar8 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar7 == param_1)
     ) goto LAB_006e0050;
  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_00f3c852 = 0xffff;
      DAT_00f3c854 = 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_006e021a;
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      DAT_00f3c852 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f3c854 = 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_00f3c852 = 0xffff;
      DAT_00f3c854 = 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_006e021a:
    *(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) = uVar7;
    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_00f3c852 = 0xffff;
        DAT_00f3c854 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      uVar4 = *(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_00f3c852 = 0xffff;
        DAT_00f3c854 = 0xffff;
        Links(unsigned_short)::s_Sentinel = -1;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
    }
    else {
      uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_2c);
    }
    if (uVar4 == 0xffff) {
      puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
    }
    if (param_1 == *puVar5) {
      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_00f3c852 = 0xffff;
        DAT_00f3c854 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      *(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_2c) * 0x14)
           = uVar7;
      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_00f3c852 = 0xffff;
        DAT_00f3c854 = 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) * 0x14) =
           uVar7;
    }
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
     cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
    DAT_00f3c852 = 0xffff;
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00f3c854 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  if (uVar7 == 0xffff) {
    psVar10 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    psVar10 = (short *)(local_20 + *(int *)(this + 4));
  }
  if (*psVar10 != -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_00f3c852 = 0xffff;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar5 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    if (uVar7 != 0xffff) {
      puVar5 = (ushort *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar5 * 0x14) = uVar7;
  }
  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_00f3c852 = 0xffff;
    DAT_00f3c854 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  if (uVar7 == 0xffff) {
    puVar6 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    puVar6 = (undefined2 *)(local_20 + *(int *)(this + 4));
  }
  if (puVar6[1] != -1) {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00f3c852 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00f3c854 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar6 = &Links(unsigned_short)::s_Sentinel;
    if (uVar7 != 0xffff) {
      puVar6 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)(ushort)puVar6[1] * 0x14) = uVar7;
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00f3c852 = 0xffff;
    DAT_00f3c854 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
       *(undefined2 *)(*(int *)(this + 4) + 6 + local_2c);
LAB_006e0050:
  if ((local_26 != 0xffff) && (sVar8 == 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)