CUtlRBTree<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Unlink
0x000e8530 · 3451 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIPK11studiohdr_t29StudioHdrToActivityMapEntry_ttE6Node_tEtNS5_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS6_tEtEE6UnlinkEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<studiohdr_t const*, StudioHdrToActivityMapEntry_t, unsigned short>::Node_t,
unsigned short, CUtlMap<studiohdr_t const*, StudioHdrToActivityMapEntry_t, unsigned
short>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<studiohdr_t const*,
StudioHdrToActivityMapEntry_t, unsigned short>::Node_t, unsigned short>, unsigned short>
>::Unlink(unsigned short) */
void __thiscall
CUtlRBTree<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<studiohdr_t_const*,StudioHdrToActivityMapEntry_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_00340726 = 0xffff;
DAT_00340728 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
local_2c = (uint)param_1 * 0x58;
psVar4 = (short *)(*(int *)(this + 4) + local_2c);
if (*psVar4 != -1) {
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_000e8723;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 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_00340726 = 0xffff;
DAT_00340728 = 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_000e878d;
}
}
LAB_000e8578:
uVar10 = (uint)param_1;
local_20 = local_2c;
cVar2 = Links(unsigned_short)::s_Sentinel;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_000e87c0;
LAB_000e858a:
uVar8 = (ushort)uVar10;
if (uVar8 == 0xffff) goto LAB_000e87e5;
LAB_000e8594:
if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_000e87f8;
LAB_000e85a4:
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_00340726 = 0xffff;
DAT_00340728 = 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 * 0x58;
psVar4 = (short *)(local_2c + *(int *)(this + 4));
if (*psVar4 == -1) goto LAB_000e8578;
LAB_000e8723:
uVar10 = (uint)(ushort)psVar4[1];
cVar2 = Links(unsigned_short)::s_Sentinel;
if (psVar4[1] == 0xffff) goto LAB_000e8578;
LAB_000e878d:
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)) {
DAT_00340726 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340728 = 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 * 0x58 + *(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_00340726 = 0xffff;
DAT_00340728 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (sVar9 != -1) goto LAB_000e877f;
LAB_000e8845:
puVar7 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
if (sVar9 == -1) goto LAB_000e8845;
LAB_000e877f:
puVar7 = (ushort *)(uVar10 * 0x58 + *(int *)(this + 4));
}
uVar10 = (uint)*puVar7;
}
local_20 = uVar10 * 0x58;
if (cVar2 != '\0') goto LAB_000e858a;
LAB_000e87c0:
uVar8 = (ushort)uVar10;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) goto LAB_000e8594;
LAB_000e87e5:
if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_000e85a4;
LAB_000e87f8:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00340726 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340728 = 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_00340726 = 0xffff;
DAT_00340728 = 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 * 0x58) = 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)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 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)) {
DAT_00340726 = 0xffff;
DAT_00340728 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
__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 * 0x58 + *(int *)(this + 4));
}
if (uVar8 == *puVar7) {
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
DAT_00340726 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340728 = 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] * 0x58) = 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)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 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] * 0x58) = local_26;
}
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar9 = DAT_0034072a;
if ((uVar8 != 0xffff) && (sVar9 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar8 == param_1)
) goto LAB_000e86a8;
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_00340726 = 0xffff;
DAT_00340728 = 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_000e887a;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00340726 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340728 = 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_00340726 = 0xffff;
DAT_00340728 = 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_000e887a:
*(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_00340726 = 0xffff;
DAT_00340728 = 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_00340726 = 0xffff;
DAT_00340728 = 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 * 0x58 + *(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)) {
DAT_00340726 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340728 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(ushort *)(*(int *)(this + 4) + (uint)*(ushort *)(*(int *)(this + 4) + 4 + local_2c) * 0x58)
= 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_00340726 = 0xffff;
DAT_00340728 = 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) * 0x58) =
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_00340726 = 0xffff;
DAT_00340728 = 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_00340726 = 0xffff;
DAT_00340728 = 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 * 0x58) = 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_00340726 = 0xffff;
DAT_00340728 = 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)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 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] * 0x58) = uVar8;
}
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00340726 = 0xffff;
DAT_00340728 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 6 + local_2c);
LAB_000e86a8:
if ((local_26 != 0xffff) && (sVar9 == 1)) {
RemoveRebalance(this,local_26);
return;
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.