CUtlMultiList<watcher_t,unsigned_short>::CreateList
0x0047d540 · 472 bytes · __thiscall
_ZN13CUtlMultiListI9watcher_ttE10CreateListEv
Decompiled
undefined (1 param)
/* CUtlMultiList<watcher_t, unsigned short>::CreateList() */
uint __thiscall
CUtlMultiList<watcher_t,unsigned_short>::CreateList(CUtlMultiList<watcher_t,unsigned_short> *this)
{
ushort uVar1;
int iVar2;
uint uVar3;
uint uVar4;
uint uVar5;
undefined2 uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uVar1 = *(ushort *)(this + 0x1c);
uVar7 = (uint)uVar1;
uVar3 = uVar7;
if (uVar1 == 0xffff) {
iVar2 = *(int *)(this + 0x10);
if ((int)(uint)*(ushort *)(this + 0x22) < iVar2) {
uVar5 = *(ushort *)(this + 0x22) + 1;
uVar4 = 0xffff;
uVar8 = uVar5 & 0xffff;
if ((int)uVar8 < iVar2) {
uVar4 = uVar8;
uVar3 = uVar5;
}
}
else {
uVar4 = 0;
if (iVar2 < 1) {
uVar4 = 0xffff;
}
uVar3 = (0 < iVar2) - 1;
}
if ((int)uVar4 < iVar2) {
LAB_0047d665:
if ((short)uVar3 != -1) {
uVar7 = uVar3 & 0xffff;
*(short *)(this + 0x22) = (short)uVar3;
*(short *)(this + 0x20) = *(short *)(this + 0x20) + 1;
iVar9 = uVar7 * 10;
iVar2 = *(int *)(this + 0xc) + iVar9;
goto LAB_0047d575;
}
if (CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
iVar2 = *(int *)(this + 0xc);
}
else {
CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>
::Grow((CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>
*)(this + 0xc),1);
iVar9 = *(int *)(this + 0x10);
iVar2 = *(int *)(this + 0xc);
*(int *)(this + 0x24) = iVar2;
if ((int)(uint)*(ushort *)(this + 0x22) < iVar9) {
uVar1 = *(ushort *)(this + 0x22) + 1;
uVar5 = (uint)uVar1;
uVar4 = 0xffff;
if ((int)uVar5 < iVar9) {
uVar4 = uVar5;
}
uVar3 = (uint)uVar1;
if (iVar9 <= (int)uVar5) {
uVar3 = uVar7;
}
}
else {
uVar4 = 0;
if (iVar9 < 1) {
uVar4 = 0xffff;
}
uVar3 = (0 < iVar9) - 1;
}
if ((int)uVar4 < iVar9) goto LAB_0047d665;
if (CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
iVar2 = *(int *)(this + 0xc);
}
}
iVar9 = 0x9fff6;
uVar3 = 0xffffffff;
}
else {
uVar7 = (uint)uVar1;
iVar9 = uVar7 * 10;
iVar2 = *(int *)(this + 0xc) + iVar9;
*(undefined2 *)(this + 0x1c) = *(undefined2 *)(iVar2 + 8);
LAB_0047d575:
uVar6 = (undefined2)uVar3;
*(undefined2 *)(iVar2 + 8) = uVar6;
*(undefined2 *)(*(int *)(this + 0xc) + 6 + iVar9) = uVar6;
CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::Unlink((CUtlLinkedList<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<watcher_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
*)(this + 0xc),(ushort)uVar7);
iVar2 = *(int *)(this + 0xc);
*(undefined2 *)(iVar2 + iVar9 + 8) = 0xffff;
uVar1 = *(ushort *)(this + 0x1a);
*(ushort *)(iVar2 + iVar9 + 6) = uVar1;
*(undefined2 *)(this + 0x1a) = uVar6;
if (uVar1 == 0xffff) {
*(undefined2 *)(this + 0x18) = uVar6;
}
else {
*(undefined2 *)(*(int *)(this + 0xc) + (uint)uVar1 * 10 + 8) = uVar6;
}
*(short *)(this + 0x1e) = *(short *)(this + 0x1e) + 1;
iVar2 = *(int *)(this + 0xc);
}
((undefined2 *)(iVar2 + iVar9))[1] = 0xffff;
*(undefined2 *)(iVar2 + iVar9) = 0xffff;
*(undefined2 *)(*(int *)(this + 0xc) + 4 + iVar9) = 0;
return uVar3;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.