CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>::InsertBefore
0x00a04330 · 494 bytes · __thiscall
_ZN14CUtlLinkedListI6VectortLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS0_tEtEE12InsertBeforeEtRKS0_
Decompiled
undefined (3 params)
/* CUtlLinkedList<Vector, unsigned short, false, unsigned short,
CUtlMemory<UtlLinkedListElem_t<Vector, unsigned short>, unsigned short> >::InsertBefore(unsigned
short, Vector const&) */
uint __thiscall
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::InsertBefore(CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
*this,ushort param_1,Vector *param_2)
{
ushort uVar1;
int iVar2;
int iVar3;
uint uVar4;
uint uVar5;
uint uVar6;
undefined2 uVar7;
uint uVar8;
int iVar9;
undefined4 *puVar10;
uint uVar11;
uVar1 = *(ushort *)(this + 0x10);
uVar8 = (uint)uVar1;
uVar5 = uVar8;
if (uVar1 == 0xffff) {
iVar2 = *(int *)(this + 4);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar2) {
uVar6 = *(ushort *)(this + 0x16) + 1;
uVar4 = 0xffff;
uVar11 = uVar6 & 0xffff;
if ((int)uVar11 < iVar2) {
uVar4 = uVar11;
uVar5 = uVar6;
}
}
else {
uVar4 = 0;
if (iVar2 < 1) {
uVar4 = 0xffff;
}
uVar5 = (0 < iVar2) - 1;
}
if (iVar2 <= (int)uVar4) {
CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>::Grow
((CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short> *)this,1);
iVar2 = *(int *)(this + 4);
*(undefined4 *)(this + 0x18) = *(undefined4 *)this;
if ((int)(uint)*(ushort *)(this + 0x16) < iVar2) {
uVar5 = *(ushort *)(this + 0x16) + 1;
uVar4 = uVar5 & 0xffff;
if (iVar2 <= (int)uVar4) {
uVar5 = uVar8;
uVar4 = 0xffff;
}
}
else {
uVar4 = 0;
if (iVar2 < 1) {
uVar4 = 0xffff;
}
uVar5 = (0 < iVar2) - 1;
}
if (iVar2 <= (int)uVar4) {
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)uVar5 == -1) {
if (AllocInternal(bool)::__executeCount < 10) {
AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
return 0xffffffff;
}
uVar8 = uVar5 & 0xffff;
*(short *)(this + 0x16) = (short)uVar5;
*(short *)(this + 0x14) = *(short *)(this + 0x14) + 1;
iVar9 = uVar8 * 0x10;
iVar2 = *(int *)this + iVar9;
}
else {
uVar8 = (uint)uVar1;
iVar9 = uVar8 * 0x10;
iVar2 = *(int *)this + iVar9;
*(undefined2 *)(this + 0x10) = *(undefined2 *)(iVar2 + 0xe);
}
uVar7 = (undefined2)uVar5;
*(undefined2 *)(iVar2 + 0xe) = uVar7;
*(undefined2 *)(*(int *)this + 0xc + iVar9) = uVar7;
Unlink(this,(ushort)uVar8);
iVar2 = *(int *)this + iVar9;
*(ushort *)(iVar2 + 0xe) = param_1;
if (param_1 == 0xffff) {
uVar1 = *(ushort *)(this + 0xe);
*(ushort *)(iVar2 + 0xc) = uVar1;
*(undefined2 *)(this + 0xe) = uVar7;
}
else {
iVar3 = (uint)param_1 * 0x10 + *(int *)this;
uVar1 = *(ushort *)(iVar3 + 0xc);
*(ushort *)(iVar2 + 0xc) = uVar1;
*(undefined2 *)(iVar3 + 0xc) = uVar7;
}
if (uVar1 == 0xffff) {
*(undefined2 *)(this + 0xc) = uVar7;
}
else {
*(undefined2 *)((uint)uVar1 * 0x10 + *(int *)this + 0xe) = uVar7;
}
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
puVar10 = (undefined4 *)(iVar9 + *(int *)this);
if (puVar10 != (undefined4 *)0x0) {
*puVar10 = *(undefined4 *)param_2;
puVar10[1] = *(undefined4 *)(param_2 + 4);
puVar10[2] = *(undefined4 *)(param_2 + 8);
}
return uVar5;
}
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.