CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>::InsertBefore
0x00b5bbf0 · 482 bytes · __thiscall
_ZN14CUtlLinkedListIN23CScrollingScreenOverlay10TextLine_tEtLb0Et10CUtlMemoryI19UtlLinkedListElem_tIS1_tEtEE12InsertBeforeEt
Decompiled
undefined (2 params)
/* CUtlLinkedList<CScrollingScreenOverlay::TextLine_t, unsigned short, false, unsigned short,
CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t, unsigned short>, unsigned
short> >::InsertBefore(unsigned short) */
uint __thiscall
CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>
::InsertBefore(CUtlLinkedList<CScrollingScreenOverlay::TextLine_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
int iVar1;
ushort uVar2;
int iVar3;
uint uVar4;
uint uVar5;
uint uVar6;
undefined2 uVar7;
uint uVar8;
int iVar9;
uint uVar10;
uVar2 = *(ushort *)(this + 0x10);
uVar8 = (uint)uVar2;
uVar6 = uVar8;
if (uVar2 == 0xffff) {
iVar3 = *(int *)(this + 4);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
uVar5 = *(ushort *)(this + 0x16) + 1;
uVar4 = 0xffff;
uVar10 = uVar5 & 0xffff;
if ((int)uVar10 < iVar3) {
uVar4 = uVar10;
uVar6 = uVar5;
}
}
else {
uVar4 = 0;
if (iVar3 < 1) {
uVar4 = 0xffff;
}
uVar6 = (0 < iVar3) - 1;
}
if (iVar3 <= (int)uVar4) {
CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>
::Grow((CUtlMemory<UtlLinkedListElem_t<CScrollingScreenOverlay::TextLine_t,unsigned_short>,unsigned_short>
*)this,1);
*(undefined4 *)(this + 0x18) = *(undefined4 *)this;
iVar3 = *(int *)(this + 4);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
uVar10 = *(ushort *)(this + 0x16) + 1;
uVar5 = uVar10 & 0xffff;
uVar4 = 0xffff;
uVar6 = uVar8;
if ((int)uVar5 < iVar3) {
uVar4 = uVar5;
uVar6 = uVar10;
}
}
else {
uVar4 = 0;
if (iVar3 < 1) {
uVar4 = 0xffff;
}
uVar6 = (0 < iVar3) - 1;
}
if (iVar3 <= (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)uVar6 == -1) {
if (AllocInternal(bool)::__executeCount < 10) {
AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
return 0xffffffff;
}
uVar8 = uVar6 & 0xffff;
*(short *)(this + 0x16) = (short)uVar6;
*(short *)(this + 0x14) = *(short *)(this + 0x14) + 1;
iVar9 = uVar8 * 0x24;
iVar3 = *(int *)this + iVar9;
}
else {
uVar8 = (uint)uVar2;
iVar9 = uVar8 * 0x24;
iVar3 = *(int *)this + iVar9;
*(undefined2 *)(this + 0x10) = *(undefined2 *)(iVar3 + 0x22);
}
uVar7 = (undefined2)uVar6;
*(undefined2 *)(iVar3 + 0x22) = uVar7;
*(undefined2 *)(*(int *)this + 0x20 + iVar9) = uVar7;
Unlink(this,(ushort)uVar8);
iVar3 = *(int *)this + iVar9;
*(ushort *)(iVar3 + 0x22) = param_1;
if (param_1 == 0xffff) {
uVar2 = *(ushort *)(this + 0xe);
*(ushort *)(iVar3 + 0x20) = uVar2;
*(undefined2 *)(this + 0xe) = uVar7;
}
else {
iVar1 = *(int *)this + (uint)param_1 * 0x24;
uVar2 = *(ushort *)(iVar1 + 0x20);
*(ushort *)(iVar3 + 0x20) = uVar2;
*(undefined2 *)(iVar1 + 0x20) = uVar7;
}
if (uVar2 == 0xffff) {
*(undefined2 *)(this + 0xc) = uVar7;
}
else {
*(undefined2 *)(*(int *)this + (uint)uVar2 * 0x24 + 0x22) = uVar7;
}
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
if ((CUtlString *)(iVar9 + *(int *)this) != (CUtlString *)0x0) {
CUtlString::CUtlString((CUtlString *)(iVar9 + *(int *)this));
}
return uVar6;
}
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.