CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>::AllocInternal
0x001d58a0 · 398 bytes · __thiscall
_ZN14CUtlLinkedListI18moverlayfragment_ttLb1Et10CUtlMemoryI19UtlLinkedListElem_tIS0_tEtEE13AllocInternalEb
Decompiled
undefined (2 params)
/* CUtlLinkedList<moverlayfragment_t, unsigned short, true, unsigned short,
CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t, unsigned short>, unsigned short>
>::AllocInternal(bool) */
uint __thiscall
CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>
::AllocInternal(CUtlLinkedList<moverlayfragment_t,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>>
*this,bool param_1)
{
ushort uVar1;
uint uVar2;
int iVar3;
int iVar4;
uint uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
uVar1 = *(ushort *)(this + 0x10);
uVar6 = (uint)uVar1;
uVar2 = uVar6;
if (uVar1 == 0xffff) {
iVar3 = *(int *)(this + 4);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
uVar5 = *(ushort *)(this + 0x16) + 1;
uVar8 = uVar5 & 0xffff;
uVar7 = 0xffff;
if ((int)uVar8 < iVar3) {
uVar2 = uVar5;
uVar7 = uVar8;
}
}
else {
uVar7 = 0;
if (iVar3 < 1) {
uVar7 = 0xffff;
}
uVar2 = (0 < iVar3) - 1;
}
if ((int)uVar7 < iVar3) {
LAB_001d5987:
if ((short)uVar2 != -1) {
*(short *)(this + 0x14) = *(short *)(this + 0x14) + 1;
iVar3 = (uVar2 & 0xffff) * 0x2c;
*(short *)(this + 0x16) = (short)uVar2;
iVar4 = *(int *)this + iVar3;
goto LAB_001d58d2;
}
if (AllocInternal(bool)::__executeCount < 10) {
AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
}
else {
CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>::Grow
((CUtlMemory<UtlLinkedListElem_t<moverlayfragment_t,unsigned_short>,unsigned_short>
*)this,1);
iVar3 = *(int *)(this + 4);
*(undefined4 *)(this + 0x18) = *(undefined4 *)this;
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
uVar1 = *(ushort *)(this + 0x16) + 1;
uVar5 = (uint)uVar1;
uVar7 = 0xffff;
if ((int)uVar5 < iVar3) {
uVar7 = uVar5;
}
uVar2 = (uint)uVar1;
if (iVar3 <= (int)uVar5) {
uVar2 = uVar6;
}
}
else {
uVar7 = 0;
if (iVar3 < 1) {
uVar7 = 0xffff;
}
uVar2 = (0 < iVar3) - 1;
}
if ((int)uVar7 < iVar3) goto LAB_001d5987;
if (AllocInternal(bool)::__executeCount < 10) {
AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
return 0xffffffff;
}
}
uVar2 = 0xffffffff;
}
else {
iVar3 = (uint)uVar1 * 0x2c;
iVar4 = *(int *)this + iVar3;
*(undefined2 *)(this + 0x10) = *(undefined2 *)(iVar4 + 0x2a);
LAB_001d58d2:
if (!param_1) {
*(short *)(iVar4 + 0x2a) = (short)uVar2;
*(short *)(*(int *)this + 0x28 + iVar3) = (short)uVar2;
return uVar2;
}
*(undefined2 *)(iVar4 + 0x2a) = 0xffff;
*(undefined2 *)(*(int *)this + 0x28 + iVar3) = 0xffff;
}
return uVar2;
}
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.