CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::CreateList
0x0024ac60 · 599 bytes · __thiscall
_ZN13CUtlMultiListIN16CDataManagerBase22resource_lru_element_tEtE10CreateListEv
Decompiled
undefined (1 param)
/* CUtlMultiList<CDataManagerBase::resource_lru_element_t, unsigned short>::CreateList() */
uint __thiscall
CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::CreateList
(CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short> *this)
{
ushort uVar1;
int iVar2;
uint uVar3;
uint uVar4;
int iVar5;
ushort uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint local_20;
uVar6 = *(ushort *)(this + 0x1c);
uVar7 = (uint)uVar6;
if (uVar6 == 0xffff) {
iVar5 = *(int *)(this + 0x10);
if ((int)(uint)*(ushort *)(this + 0x22) < iVar5) {
uVar8 = *(ushort *)(this + 0x22) + 1;
uVar3 = 0xffff;
uVar4 = uVar8 & 0xffff;
uVar9 = uVar7;
if ((int)uVar4 < iVar5) {
uVar3 = uVar4;
uVar9 = uVar8;
}
}
else {
uVar3 = 0;
if (iVar5 < 1) {
uVar3 = 0xffff;
}
uVar9 = (0 < iVar5) - 1;
}
if ((int)uVar3 < iVar5) {
LAB_0024ade5:
uVar7 = uVar9;
if ((short)uVar7 != -1) {
uVar3 = uVar7 & 0xffff;
*(short *)(this + 0x22) = (short)uVar7;
*(short *)(this + 0x20) = *(short *)(this + 0x20) + 1;
local_20 = uVar3 * 10;
iVar5 = *(int *)(this + 0xc) + local_20;
goto LAB_0024ac93;
}
if (CUtlLinkedList<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
iVar5 = *(int *)(this + 0xc);
}
else {
CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>
::Grow((CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>
*)(this + 0xc),1);
iVar2 = *(int *)(this + 0x10);
iVar5 = *(int *)(this + 0xc);
*(int *)(this + 0x24) = iVar5;
if ((int)(uint)*(ushort *)(this + 0x22) < iVar2) {
uVar6 = *(ushort *)(this + 0x22) + 1;
uVar3 = (uint)uVar6;
local_20 = 0xffff;
if ((int)uVar3 < iVar2) {
local_20 = uVar3;
}
uVar9 = (uint)uVar6;
if (iVar2 <= (int)uVar3) {
uVar9 = uVar7;
}
}
else {
local_20 = 0xffff;
if (0 < iVar2) {
local_20 = 0;
}
uVar9 = (0 < iVar2) - 1;
}
if ((int)local_20 < iVar2) goto LAB_0024ade5;
if (CUtlLinkedList<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CUtlMultiList<CDataManagerBase::resource_lru_element_t,unsigned_short>::List_t,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
iVar5 = *(int *)(this + 0xc);
}
}
local_20 = 0x9fff6;
uVar7 = 0xffffffff;
}
else {
uVar3 = (uint)uVar6;
local_20 = uVar3 * 10;
iVar5 = *(int *)(this + 0xc) + local_20;
*(undefined2 *)(this + 0x1c) = *(undefined2 *)(iVar5 + 8);
LAB_0024ac93:
uVar6 = (ushort)uVar7;
*(ushort *)(iVar5 + 8) = uVar6;
*(ushort *)(*(int *)(this + 0xc) + 6 + local_20) = uVar6;
if (((int)uVar3 < *(int *)(this + 0x10)) && (uVar6 <= *(ushort *)(this + 0x22))) {
iVar5 = local_20 + *(int *)(this + 0xc);
uVar1 = *(ushort *)(iVar5 + 6);
if (uVar6 != uVar1) {
if (uVar1 == 0xffff) {
*(undefined2 *)(this + 0x18) = *(undefined2 *)(iVar5 + 8);
}
else {
*(undefined2 *)(*(int *)(this + 0xc) + 8 + (uint)uVar1 * 10) = *(undefined2 *)(iVar5 + 8);
}
if (*(ushort *)(iVar5 + 8) == 0xffff) {
*(undefined2 *)(this + 0x1a) = *(undefined2 *)(iVar5 + 6);
}
else {
*(undefined2 *)(*(int *)(this + 0xc) + (uint)*(ushort *)(iVar5 + 8) * 10 + 6) =
*(undefined2 *)(iVar5 + 6);
}
*(ushort *)(iVar5 + 8) = uVar6;
*(ushort *)(iVar5 + 6) = uVar6;
*(short *)(this + 0x1e) = *(short *)(this + 0x1e) + -1;
}
}
iVar5 = *(int *)(this + 0xc);
*(undefined2 *)(local_20 + iVar5 + 8) = 0xffff;
uVar1 = *(ushort *)(this + 0x1a);
*(ushort *)(local_20 + iVar5 + 6) = uVar1;
*(ushort *)(this + 0x1a) = uVar6;
if (uVar1 == 0xffff) {
*(ushort *)(this + 0x18) = uVar6;
}
else {
*(ushort *)(*(int *)(this + 0xc) + (uint)uVar1 * 10 + 8) = uVar6;
}
*(short *)(this + 0x1e) = *(short *)(this + 0x1e) + 1;
iVar5 = *(int *)(this + 0xc);
}
((undefined2 *)(iVar5 + local_20))[1] = 0xffff;
*(undefined2 *)(iVar5 + local_20) = 0xffff;
*(undefined2 *)(*(int *)(this + 0xc) + 4 + local_20) = 0;
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.