CFuncAreaPortalBase::CFuncAreaPortalBase
0x006b0b20 · 504 bytes · __thiscall
_ZN19CFuncAreaPortalBaseC2Ev
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CFuncAreaPortalBase::CFuncAreaPortalBase() */
void __thiscall CFuncAreaPortalBase::CFuncAreaPortalBase(CFuncAreaPortalBase *this)
{
undefined4 *puVar1;
ushort uVar2;
int iVar3;
ushort uVar4;
uint uVar5;
uint uVar6;
int iVar7;
bool bVar8;
CBaseEntity::CBaseEntity((CBaseEntity *)this,false);
*(undefined ***)this = &PTR__CFuncAreaPortalBase_00c89508;
uVar4 = DAT_00fe019c;
uVar6 = (uint)DAT_00fe019c;
*(undefined4 *)(this + 0x440) = 0xffffffff;
if (uVar4 == 0xffff) {
if ((int)(uint)DAT_00fe01a2 < DAT_00fe0190) {
uVar6 = DAT_00fe01a2 + 1;
uVar5 = uVar6 & 0xffff;
if (DAT_00fe0190 <= (int)uVar5) {
uVar6 = 0xffff;
uVar5 = 0xffff;
}
}
else {
uVar5 = 0;
if (DAT_00fe0190 < 1) {
uVar5 = 0xffff;
}
uVar6 = (0 < DAT_00fe0190) - 1;
}
if ((int)uVar5 < DAT_00fe0190) {
LAB_006b0c6c:
uVar4 = (ushort)uVar6;
if (uVar4 != 0xffff) {
uVar6 = uVar6 & 0xffff;
iVar7 = uVar6 * 8;
_DAT_00fe01a0 = _DAT_00fe01a0 + 1;
iVar3 = g_AreaPortals + iVar7;
DAT_00fe01a2 = uVar4;
goto LAB_006b0b79;
}
if (CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
Warning("CUtlLinkedList overflow! (exhausted index range)\n");
}
}
else {
CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>::Grow
((CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>
*)&g_AreaPortals,1);
_DAT_00fe01a4 = g_AreaPortals;
if ((int)(uint)DAT_00fe01a2 < DAT_00fe0190) {
uVar6 = DAT_00fe01a2 + 1;
uVar5 = uVar6 & 0xffff;
if (DAT_00fe0190 <= (int)uVar5) {
uVar6 = 0xffff;
uVar5 = 0xffff;
}
}
else {
uVar5 = 0;
if (DAT_00fe0190 < 1) {
uVar5 = 0xffff;
}
uVar6 = (0 < DAT_00fe0190) - 1;
}
if ((int)uVar5 < DAT_00fe0190) goto LAB_006b0c6c;
if (CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
/* try { // try from 006b0d01 to 006b0d23 has its CatchHandler @ 006b0d4a */
Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
}
}
uVar4 = 0xffff;
}
else {
iVar7 = uVar6 * 8;
iVar3 = g_AreaPortals + iVar7;
DAT_00fe019c = *(ushort *)(iVar3 + 6);
LAB_006b0b79:
*(ushort *)(iVar3 + 6) = uVar4;
*(ushort *)(iVar3 + 4) = uVar4;
CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
::Unlink((CUtlLinkedList<CFuncAreaPortalBase*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CFuncAreaPortalBase*,unsigned_short>,unsigned_short>>
*)&g_AreaPortals,(ushort)uVar6);
iVar3 = g_AreaPortals;
puVar1 = (undefined4 *)(g_AreaPortals + iVar7);
*(undefined2 *)((int)puVar1 + 6) = 0xffff;
uVar6 = (uint)DAT_00fe019a;
bVar8 = DAT_00fe019a != 0xffff;
*(ushort *)(puVar1 + 1) = DAT_00fe019a;
uVar2 = uVar4;
DAT_00fe019a = uVar4;
if (bVar8) {
*(ushort *)(iVar3 + 6 + uVar6 * 8) = uVar4;
uVar2 = DAT_00fe0198;
}
DAT_00fe0198 = uVar2;
_DAT_00fe019e = _DAT_00fe019e + 1;
*puVar1 = this;
}
*(ushort *)(this + 0x448) = uVar4;
*(undefined4 *)(this + 0x444) = 0;
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.