CUtlLinkedList<CAbandonmentAwardTemplate::RegretStruct,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CAbandonmentAwardTemplate::RegretStruct,unsigned_short>,unsigned_short>>::InsertBefore
0x0084ae80 · 492 bytes · __thiscall
_ZN14CUtlLinkedListIN25CAbandonmentAwardTemplate12RegretStructEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS1_tEtEE12InsertBeforeEtRKS1_
Decompiled
undefined (3 params)
/* CUtlLinkedList<CAbandonmentAwardTemplate::RegretStruct, unsigned short, false, unsigned short,
CUtlMemory<UtlLinkedListElem_t<CAbandonmentAwardTemplate::RegretStruct, unsigned short>, unsigned
short> >::InsertBefore(unsigned short, CAbandonmentAwardTemplate::RegretStruct const&) */
uint __thiscall
CUtlLinkedList<CAbandonmentAwardTemplate::RegretStruct,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CAbandonmentAwardTemplate::RegretStruct,unsigned_short>,unsigned_short>>
::InsertBefore(CUtlLinkedList<CAbandonmentAwardTemplate::RegretStruct,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CAbandonmentAwardTemplate::RegretStruct,unsigned_short>,unsigned_short>>
*this,ushort param_1,RegretStruct *param_2)
{
int iVar1;
ushort uVar2;
undefined4 uVar3;
int iVar4;
uint uVar5;
uint uVar6;
uint uVar7;
undefined2 uVar8;
uint uVar9;
int iVar10;
undefined4 *puVar11;
uint uVar12;
uVar2 = *(ushort *)(this + 0x10);
uVar9 = (uint)uVar2;
uVar7 = uVar9;
if (uVar2 == 0xffff) {
iVar4 = *(int *)(this + 4);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
uVar6 = *(ushort *)(this + 0x16) + 1;
uVar5 = 0xffff;
uVar12 = uVar6 & 0xffff;
if ((int)uVar12 < iVar4) {
uVar5 = uVar12;
uVar7 = uVar6;
}
}
else {
uVar5 = 0;
if (iVar4 < 1) {
uVar5 = 0xffff;
}
uVar7 = (0 < iVar4) - 1;
}
if (iVar4 <= (int)uVar5) {
CUtlMemory<UtlLinkedListElem_t<CAbandonmentAwardTemplate::RegretStruct,unsigned_short>,unsigned_short>
::Grow((CUtlMemory<UtlLinkedListElem_t<CAbandonmentAwardTemplate::RegretStruct,unsigned_short>,unsigned_short>
*)this,1);
*(undefined4 *)(this + 0x18) = *(undefined4 *)this;
iVar4 = *(int *)(this + 4);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
uVar12 = *(ushort *)(this + 0x16) + 1;
uVar6 = uVar12 & 0xffff;
uVar5 = 0xffff;
uVar7 = uVar9;
if ((int)uVar6 < iVar4) {
uVar5 = uVar6;
uVar7 = uVar12;
}
}
else {
uVar5 = 0;
if (iVar4 < 1) {
uVar5 = 0xffff;
}
uVar7 = (0 < iVar4) - 1;
}
if (iVar4 <= (int)uVar5) {
if (9 < AllocInternal(bool)::__executeCount) {
return 0xffffffff;
}
AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
return 0xffffffff;
}
}
if ((short)uVar7 == -1) {
if (AllocInternal(bool)::__executeCount < 10) {
AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
return 0xffffffff;
}
uVar9 = uVar7 & 0xffff;
*(short *)(this + 0x16) = (short)uVar7;
*(short *)(this + 0x14) = *(short *)(this + 0x14) + 1;
iVar10 = uVar9 * 0xc;
iVar4 = *(int *)this + iVar10;
}
else {
uVar9 = (uint)uVar2;
iVar10 = uVar9 * 0xc;
iVar4 = *(int *)this + iVar10;
*(undefined2 *)(this + 0x10) = *(undefined2 *)(iVar4 + 10);
}
uVar8 = (undefined2)uVar7;
*(undefined2 *)(iVar4 + 10) = uVar8;
*(undefined2 *)(*(int *)this + 8 + iVar10) = uVar8;
Unlink(this,(ushort)uVar9);
iVar4 = *(int *)this + iVar10;
*(ushort *)(iVar4 + 10) = param_1;
if (param_1 == 0xffff) {
uVar2 = *(ushort *)(this + 0xe);
*(ushort *)(iVar4 + 8) = uVar2;
*(undefined2 *)(this + 0xe) = uVar8;
}
else {
iVar1 = *(int *)this + (uint)param_1 * 0xc;
uVar2 = *(ushort *)(iVar1 + 8);
*(ushort *)(iVar4 + 8) = uVar2;
*(undefined2 *)(iVar1 + 8) = uVar8;
}
if (uVar2 == 0xffff) {
*(undefined2 *)(this + 0xc) = uVar8;
}
else {
*(undefined2 *)(*(int *)this + (uint)uVar2 * 0xc + 10) = uVar8;
}
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
puVar11 = (undefined4 *)(iVar10 + *(int *)this);
if (puVar11 != (undefined4 *)0x0) {
uVar3 = *(undefined4 *)param_2;
puVar11[1] = *(undefined4 *)(param_2 + 4);
*puVar11 = uVar3;
}
return uVar7;
}
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.