CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short,bool(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&,CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&),CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>>::NewNode
0x00620130 · 299 bytes · __thiscall
_ZN10CUtlRBTreeIN18CUtlCachedFileDataI17CModelSoundsCacheE13ElementType_tEtPFbRKS3_S5_E10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE7NewNodeEv
Decompiled
undefined (1 param)
/* CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t, unsigned short, bool
(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t const&,
CUtlCachedFileData<CModelSoundsCache>::ElementType_t const&),
CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t, unsigned short>,
unsigned short> >::NewNode() */
void __thiscall
CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short,bool(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&,CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&),CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>>
::NewNode(CUtlRBTree<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short,bool(*)(CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&,CUtlCachedFileData<CModelSoundsCache>::ElementType_t_const&),CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>>
*this)
{
uint uVar1;
undefined2 uVar2;
int iVar3;
uint uVar4;
int iVar5;
if (*(ushort *)(this + 0x14) != 0xffff) {
iVar3 = *(int *)(this + 4);
iVar5 = iVar3 + (uint)*(ushort *)(this + 0x14) * 0x18;
*(undefined2 *)(this + 0x14) = *(undefined2 *)(iVar5 + 2);
goto LAB_0062015a;
}
iVar5 = *(int *)(this + 8);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar5) {
uVar4 = *(ushort *)(this + 0x16) + 1;
uVar1 = uVar4 & 0xffff;
if (iVar5 <= (int)uVar1) {
uVar1 = 0xffff;
uVar4 = 0xffff;
}
if (iVar5 <= (int)uVar1) goto LAB_006201e7;
LAB_006201b9:
uVar2 = (undefined2)uVar4;
iVar5 = (uVar4 & 0xffff) * 0x18;
}
else {
iVar3 = 0xffff;
if (0 < iVar5) {
iVar3 = 0;
}
uVar4 = (0 < iVar5) - 1;
if (iVar3 < iVar5) goto LAB_006201b9;
LAB_006201e7:
CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>
::Grow((CUtlMemory<UtlRBTreeNode_t<CUtlCachedFileData<CModelSoundsCache>::ElementType_t,unsigned_short>,unsigned_short>
*)(this + 4),1);
iVar3 = *(int *)(this + 8);
uVar2 = 0xffff;
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
uVar1 = *(ushort *)(this + 0x16) + 1;
uVar2 = (undefined2)uVar1;
uVar1 = uVar1 & 0xffff;
if ((int)uVar1 < iVar3) {
iVar5 = uVar1 * 0x18;
}
else {
iVar5 = 0x17ffe8;
uVar1 = 0xffff;
uVar2 = 0xffff;
}
}
else {
uVar1 = 0;
iVar5 = 0x17ffe8;
if (iVar3 < 1) {
uVar1 = 0xffff;
}
else {
iVar5 = 0;
uVar2 = 0;
}
}
if (iVar3 <= (int)uVar1) {
Error("CUtlRBTree overflow!\n");
}
}
iVar3 = *(int *)(this + 4);
*(undefined2 *)(this + 0x16) = uVar2;
iVar5 = iVar3 + iVar5;
LAB_0062015a:
if (iVar5 != -8) {
*(undefined4 *)(iVar5 + 8) = 0;
*(undefined4 *)(iVar5 + 0xc) = 0;
*(undefined4 *)(iVar5 + 0x10) = 0xfffffffe;
*(undefined4 *)(iVar5 + 0x14) = 0xffffffff;
iVar3 = *(int *)(this + 4);
}
*(int *)(this + 0x18) = iVar3;
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.