CLocalNetworkBackdoor::AddToPendingDormantEntityList
0x001852a0 · 508 bytes · __thiscall
_ZN21CLocalNetworkBackdoor29AddToPendingDormantEntityListEt
Decompiled
undefined (2 params)
/* CLocalNetworkBackdoor::AddToPendingDormantEntityList(unsigned short) */
void __thiscall
CLocalNetworkBackdoor::AddToPendingDormantEntityList(CLocalNetworkBackdoor *this,ushort param_1)
{
ushort uVar1;
int iVar2;
uint uVar3;
uint *puVar4;
int iVar5;
uint uVar6;
ushort uVar7;
puVar4 = (uint *)((uint)param_1 * 0x10 + DAT_003b8174);
uVar3 = *puVar4;
if ((uVar3 & 0x40) == 0) {
*puVar4 = uVar3 | 0x40;
uVar7 = *(ushort *)(this + 0x2218);
if (uVar7 == 0xffff) {
iVar2 = *(int *)(this + 0x220c);
if ((int)(uint)*(ushort *)(this + 0x221e) < iVar2) {
uVar7 = *(ushort *)(this + 0x221e) + 1;
uVar6 = (uint)uVar7;
if (iVar2 <= (int)uVar6) {
uVar7 = 0xffff;
}
uVar3 = 0xffff;
if ((int)uVar6 < iVar2) {
uVar3 = uVar6;
}
}
else {
uVar3 = 0;
if (iVar2 < 1) {
uVar3 = 0xffff;
}
uVar7 = (0 < iVar2) - 1;
}
if (iVar2 <= (int)uVar3) {
CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>::Grow
((CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short> *)
(this + 0x2208),1);
*(undefined4 *)(this + 0x2220) = *(undefined4 *)(this + 0x2208);
iVar2 = *(int *)(this + 0x220c);
if ((int)(uint)*(ushort *)(this + 0x221e) < iVar2) {
uVar1 = *(ushort *)(this + 0x221e) + 1;
uVar3 = 0xffff;
uVar7 = 0xffff;
if ((int)(uint)uVar1 < iVar2) {
uVar3 = (uint)uVar1;
uVar7 = uVar1;
}
}
else {
uVar3 = 0;
if (iVar2 < 1) {
uVar3 = 0xffff;
}
uVar7 = (0 < iVar2) - 1;
}
if (iVar2 <= (int)uVar3) {
if (9 < CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount) {
return;
}
CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
goto LAB_00185404;
}
}
if (uVar7 == 0xffff) {
if (9 < CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount) {
return;
}
CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
LAB_00185404:
Warning();
return;
}
*(short *)(this + 0x221c) = *(short *)(this + 0x221c) + 1;
*(ushort *)(this + 0x221e) = uVar7;
iVar2 = (uint)uVar7 * 6;
iVar5 = *(int *)(this + 0x2208) + iVar2;
}
else {
iVar2 = (uint)uVar7 * 6;
iVar5 = *(int *)(this + 0x2208) + iVar2;
*(undefined2 *)(this + 0x2218) = *(undefined2 *)(iVar5 + 4);
}
*(ushort *)(iVar5 + 4) = uVar7;
*(ushort *)(*(int *)(this + 0x2208) + 2 + iVar2) = uVar7;
CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
::LinkBefore((CUtlLinkedList<unsigned_short,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<unsigned_short,unsigned_short>,unsigned_short>>
*)(this + 0x2208),0xffff,uVar7);
if ((ushort *)(iVar2 + *(int *)(this + 0x2208)) != (ushort *)0x0) {
*(ushort *)(iVar2 + *(int *)(this + 0x2208)) = param_1;
return;
}
}
return;
}
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.