CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>::Insert
0x0062bf70 · 570 bytes · __thiscall
_ZN10CUtlRBTreeIN9CBaseFlex18FS_LocalToGlobal_tEtPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE6InsertES3_
Decompiled
undefined (2 params)
/* CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t, unsigned short, bool (*)(CBaseFlex::FS_LocalToGlobal_t
const&, CBaseFlex::FS_LocalToGlobal_t const&),
CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t, unsigned short>, unsigned short>
>::Insert(CBaseFlex::FS_LocalToGlobal_t const&) */
uint __thiscall
CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CBaseFlex::FS_LocalToGlobal_t,unsigned_short,bool(*)(CBaseFlex::FS_LocalToGlobal_t_const&,CBaseFlex::FS_LocalToGlobal_t_const&),CUtlMemory<UtlRBTreeNode_t<CBaseFlex::FS_LocalToGlobal_t,unsigned_short>,unsigned_short>>
*this,FS_LocalToGlobal_t *param_1)
{
int iVar1;
ushort uVar2;
ushort uVar3;
bool bVar4;
char cVar5;
void *pvVar6;
int iVar7;
uint uVar8;
undefined2 *puVar9;
uint uVar10;
int local_24;
uVar2 = *(ushort *)(this + 0x10);
if (*(ushort *)(this + 0x10) == 0xffff) {
uVar8 = NewNode(this);
uVar10 = uVar8 & 0xffff;
local_24 = uVar10 * 0x14;
puVar9 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar9[2] = 0xffff;
puVar9[1] = 0xffff;
*puVar9 = 0xffff;
puVar9[3] = 0;
}
else {
do {
uVar3 = uVar2;
iVar1 = (uint)uVar3 * 0x14;
cVar5 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar1 + 8);
if (cVar5 == '\0') {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar7 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar7 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f27a72 = 0xffff;
DAT_00f27a74 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar4 = false;
uVar2 = *(ushort *)(*(int *)(this + 4) + 2 + iVar1);
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar7 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar7 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f27a72 = 0xffff;
DAT_00f27a74 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar4 = true;
uVar2 = *(ushort *)(*(int *)(this + 4) + (uint)uVar3 * 0x14);
}
} while (uVar2 != 0xffff);
uVar8 = NewNode(this);
uVar10 = uVar8 & 0xffff;
local_24 = uVar10 * 0x14;
puVar9 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar9[2] = uVar3;
puVar9[1] = 0xffff;
*puVar9 = 0xffff;
puVar9[3] = 0;
if (uVar3 != 0xffff) {
if (bVar4) {
*(short *)(*(int *)(this + 4) + iVar1) = (short)uVar8;
}
else {
*(short *)(*(int *)(this + 4) + 2 + iVar1) = (short)uVar8;
}
goto LAB_0062c048;
}
}
*(short *)(this + 0x10) = (short)uVar8;
LAB_0062c048:
InsertRebalance(this,(ushort)uVar10);
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -8) {
*(undefined4 *)(local_24 + 8) = *(undefined4 *)param_1;
operator_delete(*(void **)(local_24 + 0x10));
uVar10 = 0xffffffff;
if (*(uint *)(param_1 + 4) < 0x1fc00001) {
uVar10 = *(uint *)(param_1 + 4) * 4;
}
pvVar6 = operator_new__(uVar10);
*(void **)(local_24 + 0x10) = pvVar6;
_V_memcpy(pvVar6,*(void **)(param_1 + 8),*(int *)(param_1 + 4) << 2);
*(undefined4 *)(local_24 + 0xc) = *(undefined4 *)(param_1 + 4);
}
return uVar8;
}
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.