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>>::Insert
0x0021fd50 · 1057 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIy19PublishedFileInfo_ttE6Node_tEtNS2_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE6InsertERKS3_
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> >::Insert(CUtlMap<unsigned long long,
PublishedFileInfo_t, unsigned short>::Node_t const&) */
ushort __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>>
::Insert(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,Node_t *param_1)
{
Node_t NVar1;
ushort uVar2;
undefined4 uVar3;
bool bVar4;
char cVar5;
int iVar6;
int iVar7;
undefined2 *puVar8;
int iVar9;
ushort uVar10;
Node_t *pNVar11;
Node_t *pNVar12;
undefined4 *puVar13;
byte bVar14;
int local_24;
ushort local_1e;
bVar14 = 0;
uVar2 = *(ushort *)(this + 0x10);
if (*(ushort *)(this + 0x10) == 0xffff) {
local_1e = NewNode(this);
local_24 = (uint)local_1e * 0x2540;
puVar8 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar8[2] = 0xffff;
puVar8[1] = 0xffff;
*puVar8 = 0xffff;
puVar8[3] = 0;
}
else {
do {
uVar10 = uVar2;
iVar9 = (uint)uVar10 * 0x2540;
cVar5 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar9 + 8);
if (cVar5 == '\0') {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
DAT_00341a9a = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00341a9c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar4 = false;
uVar2 = *(ushort *)(*(int *)(this + 4) + 2 + iVar9);
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00341a9a = 0xffff;
DAT_00341a9c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar4 = true;
uVar2 = *(ushort *)(*(int *)(this + 4) + iVar9);
}
} while (uVar2 != 0xffff);
local_1e = NewNode(this);
local_24 = (uint)local_1e * 0x2540;
puVar8 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar8[1] = 0xffff;
*puVar8 = 0xffff;
puVar8[2] = uVar10;
puVar8[3] = 0;
if (uVar10 != 0xffff) {
if (bVar4) {
*(ushort *)(*(int *)(this + 4) + iVar9) = local_1e;
}
else {
*(ushort *)(*(int *)(this + 4) + 2 + iVar9) = local_1e;
}
goto LAB_0021fe29;
}
}
*(ushort *)(this + 0x10) = local_1e;
LAB_0021fe29:
InsertRebalance(this,local_1e);
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -8) {
uVar3 = *(undefined4 *)param_1;
*(undefined4 *)(local_24 + 0xc) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(local_24 + 8) = uVar3;
uVar3 = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(local_24 + 0x14) = *(undefined4 *)(param_1 + 0xc);
*(undefined4 *)(local_24 + 0x10) = uVar3;
pNVar11 = param_1 + 0x10;
pNVar12 = (Node_t *)(local_24 + 0x18);
for (iVar9 = 0x20; iVar9 != 0; iVar9 = iVar9 + -1) {
*(undefined4 *)pNVar12 = *(undefined4 *)pNVar11;
pNVar11 = pNVar11 + (uint)bVar14 * -8 + 4;
pNVar12 = pNVar12 + (uint)bVar14 * -8 + 4;
}
*pNVar12 = *pNVar11;
uVar3 = *(undefined4 *)(param_1 + 0x94);
*(undefined4 *)(local_24 + 0xa0) = *(undefined4 *)(param_1 + 0x98);
*(undefined4 *)(local_24 + 0x9c) = uVar3;
uVar3 = *(undefined4 *)(param_1 + 0x9c);
*(undefined4 *)(local_24 + 0xa8) = *(undefined4 *)(param_1 + 0xa0);
*(undefined4 *)(local_24 + 0xa4) = uVar3;
uVar3 = *(undefined4 *)(param_1 + 0xa4);
*(undefined4 *)(local_24 + 0xb0) = *(undefined4 *)(param_1 + 0xa8);
*(undefined4 *)(local_24 + 0xac) = uVar3;
*(undefined4 *)(local_24 + 0xb4) = *(undefined4 *)(param_1 + 0xac);
*(undefined4 *)(local_24 + 0xb8) = *(undefined4 *)(param_1 + 0xb0);
*(undefined4 *)(local_24 + 0xbc) = *(undefined4 *)(param_1 + 0xb4);
*(undefined4 *)(local_24 + 0xc0) = *(undefined4 *)(param_1 + 0xb8);
*(undefined4 *)(local_24 + 0xc4) = *(undefined4 *)(param_1 + 0xbc);
*(undefined4 *)(local_24 + 200) = *(undefined4 *)(param_1 + 0xc0);
memcpy((void *)(local_24 + 0xcc),param_1 + 0xc4,8000);
pNVar11 = param_1 + 0x2004;
puVar13 = (undefined4 *)(local_24 + 0x200c);
for (iVar9 = 0x41; iVar9 != 0; iVar9 = iVar9 + -1) {
*puVar13 = *(undefined4 *)pNVar11;
pNVar11 = pNVar11 + (uint)bVar14 * -8 + 4;
puVar13 = puVar13 + (uint)bVar14 * -2 + 1;
}
memcpy((void *)(local_24 + 0x2110),param_1 + 0x2108,0x401);
NVar1 = param_1[0x2509];
*(undefined4 *)(local_24 + 0x2518) = 0;
*(undefined4 *)(local_24 + 0x251c) = 0;
*(undefined4 *)(local_24 + 0x2520) = 0;
*(undefined4 *)(local_24 + 0x2524) = 0;
*(Node_t *)(local_24 + 0x2511) = NVar1;
*(undefined4 *)(local_24 + 0x2528) = 0;
*(undefined ***)(local_24 + 0x2514) = &PTR__CCopyableUtlVector_002c8068;
iVar9 = *(int *)(param_1 + 0x251c);
iVar6 = *(int *)(param_1 + 0x2510);
if (iVar9 != 0) {
CUtlVector<char*,CUtlMemory<char*,int>>::GrowVector
((CUtlVector<char*,CUtlMemory<char*,int>> *)(local_24 + 0x2518),iVar9);
/* try { // try from 00220117 to 0022011b has its CatchHandler @ 00220190 */
CUtlVector<char*,CUtlMemory<char*,int>>::ShiftElementsRight
((CUtlVector<char*,CUtlMemory<char*,int>> *)(local_24 + 0x2518),0,iVar9);
if (0 < iVar9) {
iVar7 = 0;
do {
*(undefined4 *)(*(int *)(local_24 + 0x2518) + iVar7) = *(undefined4 *)(iVar6 + iVar7);
iVar7 = iVar7 + 4;
} while (iVar7 != iVar9 << 2);
}
}
*(Node_t *)(local_24 + 0x252c) = param_1[0x2524];
*(undefined4 *)(local_24 + 0x2530) = *(undefined4 *)(param_1 + 0x2528);
*(undefined4 *)(local_24 + 0x2534) = *(undefined4 *)(param_1 + 0x252c);
*(undefined4 *)(local_24 + 0x2538) = *(undefined4 *)(param_1 + 0x2530);
*(undefined4 *)(local_24 + 0x253c) = *(undefined4 *)(param_1 + 0x2534);
}
return local_1e;
}
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.