L L4D2node

CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>::Unlink

0x001bda30 · 3422 bytes · __thiscall

_ZN10CUtlRBTreeIN8CNetChan13SplitPlayer_tEtPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE6UnlinkEt

Decompiled

undefined (2 params)

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

void __thiscall
CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CNetChan::SplitPlayer_t,unsigned_short,bool(*)(CNetChan::SplitPlayer_t_const&,CNetChan::SplitPlayer_t_const&),CUtlMemory<UtlRBTreeNode_t<CNetChan::SplitPlayer_t,unsigned_short>,unsigned_short>>
         *this,ushort param_1)

{
  short sVar1;
  char cVar2;
  int iVar3;
  ushort uVar4;
  short *psVar5;
  ushort *puVar6;
  undefined2 *puVar7;
  ushort uVar8;
  short sVar9;
  uint uVar10;
  bool bVar11;
  ushort local_2a;
  int local_24;
  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) {
      DAT_00341692 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    local_24 = (uint)param_1 * 0x10;
    psVar5 = (short *)(local_24 + *(int *)(this + 4));
    if (*psVar5 != -1) {
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_001bdc1e;
      iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar3 != 0) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341692 = 0xffff;
        DAT_00341694 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      uVar8 = *(ushort *)(local_24 + *(int *)(this + 4) + 2);
      if (uVar8 != 0xffff) {
        if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_001bdc30;
        iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar3 == 0) {
          uVar10 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_24);
          cVar2 = Links(unsigned_short)::s_Sentinel;
        }
        else {
          Links(unsigned_short)::s_Sentinel = -1;
          DAT_00341692 = 0xffff;
          DAT_00341694 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          uVar10 = (uint)*(ushort *)(*(int *)(this + 4) + 2 + local_24);
          cVar2 = Links(unsigned_short)::s_Sentinel;
        }
        goto LAB_001bdc68;
      }
    }
LAB_001bda80:
    uVar10 = (uint)param_1;
    local_20 = local_24;
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_001bdcb5;
LAB_001bda92:
    uVar8 = (ushort)uVar10;
    if (uVar8 == 0xffff) goto LAB_001bdcda;
LAB_001bda9c:
    if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_001bdcf0;
LAB_001bdaac:
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00341692 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar8 == 0xffff) {
      puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar6 = (ushort *)(local_20 + *(int *)(this + 4));
    }
    local_2a = *puVar6;
  }
  else {
    local_24 = (uint)param_1 * 0x10;
    psVar5 = (short *)(local_24 + *(int *)(this + 4));
    if (*psVar5 == -1) goto LAB_001bda80;
LAB_001bdc1e:
    uVar8 = psVar5[1];
    if (uVar8 == 0xffff) goto LAB_001bda80;
LAB_001bdc30:
    uVar10 = (uint)uVar8;
    cVar2 = Links(unsigned_short)::s_Sentinel;
LAB_001bdc68:
    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_00341692 = 0xffff;
        DAT_00341694 = 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 * 0x10 + *(int *)(this + 4));
      }
      if (sVar1 == -1) break;
      if (cVar2 == '\0') {
        iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar3 != 0) {
          Links(unsigned_short)::s_Sentinel = -1;
          DAT_00341692 = 0xffff;
          DAT_00341694 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        cVar2 = Links(unsigned_short)::s_Sentinel;
        if (sVar9 != -1) goto LAB_001bdc5f;
LAB_001bdf05:
        puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (sVar9 == -1) goto LAB_001bdf05;
LAB_001bdc5f:
        puVar6 = (ushort *)(uVar10 * 0x10 + *(int *)(this + 4));
      }
      uVar10 = (uint)*puVar6;
    }
    local_20 = uVar10 << 4;
    if (cVar2 != '\0') goto LAB_001bda92;
LAB_001bdcb5:
    uVar8 = (ushort)uVar10;
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341692 = 0xffff;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    cVar2 = Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) goto LAB_001bda9c;
LAB_001bdcda:
    if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_001bdaac;
LAB_001bdcf0:
    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_00341692 = 0xffff;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar8 == 0xffff) {
      puVar7 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    local_2a = puVar7[1];
  }
  if (local_2a != 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_00341692 = 0xffff;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar7 = &Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) {
      puVar7 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + (uint)local_2a * 0x10) = puVar7[2];
  }
  if (uVar8 == *(ushort *)(this + 0x10)) {
    *(ushort *)(this + 0x10) = local_2a;
  }
  else {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00341692 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar8 == 0xffff) {
      puVar7 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    uVar4 = puVar7[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_00341692 = 0xffff;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    if (uVar4 == 0xffff) {
      puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar6 = (ushort *)((uint)uVar4 * 0x10 + *(int *)(this + 4));
    }
    if (uVar8 == *puVar6) {
      if ((cVar2 == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341692 = 0xffff;
        DAT_00341694 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      puVar7 = &Links(unsigned_short)::s_Sentinel;
      if (uVar8 != 0xffff) {
        puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
      }
      *(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar7[2] * 0x10) = local_2a;
      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_00341692 = 0xffff;
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341694 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        cVar2 = Links(unsigned_short)::s_Sentinel;
      }
      puVar7 = &Links(unsigned_short)::s_Sentinel;
      if (uVar8 != 0xffff) {
        puVar7 = (undefined2 *)(*(int *)(this + 4) + local_20);
      }
      *(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar7[2] * 0x10) = local_2a;
    }
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341692 = 0xffff;
    DAT_00341694 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  sVar9 = DAT_00341696;
  if ((uVar8 != 0xffff) && (sVar9 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar8 == param_1)
     ) goto LAB_001bdba5;
  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_00341692 = 0xffff;
      DAT_00341694 = 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_24);
    if (bVar11) goto LAB_001bdd42;
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      DAT_00341692 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341694 = 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_24);
    if ((bVar11) && (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341692 = 0xffff;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
  }
  else {
    *(undefined2 *)(*(int *)(this + 4) + 4 + local_20) =
         *(undefined2 *)(*(int *)(this + 4) + 4 + local_24);
LAB_001bdd42:
    *(undefined2 *)(*(int *)(this + 4) + 2 + local_20) =
         *(undefined2 *)(*(int *)(this + 4) + 2 + local_24);
  }
  *(undefined2 *)(*(int *)(this + 4) + local_20) = *(undefined2 *)(*(int *)(this + 4) + local_24);
  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_00341692 = 0xffff;
        DAT_00341694 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_24);
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
        DAT_00341692 = 0xffff;
        DAT_00341694 = 0xffff;
        Links(unsigned_short)::s_Sentinel = -1;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
    }
    else {
      uVar4 = *(ushort *)(*(int *)(this + 4) + 4 + local_24);
    }
    if (uVar4 == 0xffff) {
      puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    }
    else {
      puVar6 = (ushort *)((uint)uVar4 * 0x10 + *(int *)(this + 4));
    }
    if (param_1 == *puVar6) {
      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_00341692 = 0xffff;
        DAT_00341694 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      *(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_24) * 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), iVar3 != 0)) {
        Links(unsigned_short)::s_Sentinel = -1;
        DAT_00341692 = 0xffff;
        DAT_00341694 = 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_24) * 0x10) =
           uVar8;
    }
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
     cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
    DAT_00341692 = 0xffff;
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341694 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  if (uVar8 == 0xffff) {
    psVar5 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    psVar5 = (short *)(local_20 + *(int *)(this + 4));
  }
  if (*psVar5 != -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_00341692 = 0xffff;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) {
      puVar6 = (ushort *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar6 * 0x10) = 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_00341692 = 0xffff;
    DAT_00341694 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    cVar2 = Links(unsigned_short)::s_Sentinel;
  }
  if (uVar8 == 0xffff) {
    puVar7 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    puVar7 = (undefined2 *)(local_20 + *(int *)(this + 4));
  }
  if (puVar7[1] != -1) {
    if ((cVar2 == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
       cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
      DAT_00341692 = 0xffff;
      Links(unsigned_short)::s_Sentinel = -1;
      DAT_00341694 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      cVar2 = Links(unsigned_short)::s_Sentinel;
    }
    puVar7 = &Links(unsigned_short)::s_Sentinel;
    if (uVar8 != 0xffff) {
      puVar7 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)(ushort)puVar7[1] * 0x10) = uVar8;
  }
  if ((cVar2 == '\0') &&
     (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    Links(unsigned_short)::s_Sentinel = -1;
    DAT_00341692 = 0xffff;
    DAT_00341694 = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  *(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
       *(undefined2 *)(*(int *)(this + 4) + 6 + local_24);
LAB_001bdba5:
  if ((local_2a != 0xffff) && (sVar9 == 1)) {
    RemoveRebalance(this,local_2a);
    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)