CUtlRBTree<CUtlMap<IPhysicsObject*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<IPhysicsObject*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<IPhysicsObject*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Unlink
0x0048cbb0 · 3422 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIP14IPhysicsObjectitE6Node_tEtNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_tEtEE6UnlinkEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<IPhysicsObject*, int, unsigned short>::Node_t, unsigned short,
CUtlMap<IPhysicsObject*, int, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<IPhysicsObject*, int, unsigned short>::Node_t, unsigned
short>, unsigned short> >::Unlink(unsigned short) */
void __thiscall
CUtlRBTree<CUtlMap<IPhysicsObject*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<IPhysicsObject*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<IPhysicsObject*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Unlink(CUtlRBTree<CUtlMap<IPhysicsObject*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<IPhysicsObject*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<IPhysicsObject*,int,unsigned_short>::Node_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_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_0048cd9e;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e0 = 0xffff;
DAT_00f165e2 = 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_0048cdb0;
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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_0048cde8;
}
}
LAB_0048cc00:
uVar10 = (uint)param_1;
local_20 = local_24;
cVar2 = Links(unsigned_short)::s_Sentinel;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0048ce35;
LAB_0048cc12:
uVar8 = (ushort)uVar10;
if (uVar8 == 0xffff) goto LAB_0048ce5a;
LAB_0048cc1c:
if (*(short *)(local_20 + *(int *)(this + 4)) == -1) goto LAB_0048ce70;
LAB_0048cc2c:
if ((cVar2 == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel),
cVar2 = Links(unsigned_short)::s_Sentinel, iVar3 != 0)) {
DAT_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_0048cc00;
LAB_0048cd9e:
uVar8 = psVar5[1];
if (uVar8 == 0xffff) goto LAB_0048cc00;
LAB_0048cdb0:
uVar10 = (uint)uVar8;
cVar2 = Links(unsigned_short)::s_Sentinel;
LAB_0048cde8:
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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (sVar9 != -1) goto LAB_0048cddf;
LAB_0048d085:
puVar6 = (ushort *)&Links(unsigned_short)::s_Sentinel;
}
else {
if (sVar9 == -1) goto LAB_0048d085;
LAB_0048cddf:
puVar6 = (ushort *)(uVar10 * 0x10 + *(int *)(this + 4));
}
uVar10 = (uint)*puVar6;
}
local_20 = uVar10 << 4;
if (cVar2 != '\0') goto LAB_0048cc12;
LAB_0048ce35:
uVar8 = (ushort)uVar10;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e0 = 0xffff;
DAT_00f165e2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
cVar2 = Links(unsigned_short)::s_Sentinel;
if (uVar8 != 0xffff) goto LAB_0048cc1c;
LAB_0048ce5a:
if (Links(unsigned_short)::s_Sentinel != -1) goto LAB_0048cc2c;
LAB_0048ce70:
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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar9 = DAT_00f165e4;
if ((uVar8 != 0xffff) && (sVar9 = *(short *)(*(int *)(this + 4) + 6 + local_20), uVar8 == param_1)
) goto LAB_0048cd25;
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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_0048cec2;
iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar3 != 0) {
DAT_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_0048cec2:
*(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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
Links(unsigned_short)::s_Sentinel = -1;
DAT_00f165e2 = 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_00f165e0 = 0xffff;
DAT_00f165e2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
*(undefined2 *)(*(int *)(this + 4) + 6 + local_20) =
*(undefined2 *)(*(int *)(this + 4) + 6 + local_24);
LAB_0048cd25:
if ((local_2a != 0xffff) && (sVar9 == 1)) {
RemoveRebalance(this,local_2a);
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.