//
// sub_10011ECC0 from 0x10011ecc0 to 0x10011ee55 (405 bytes)
//
// 9 xrefs:
// > GJBaseGameLayer::addCustomEnterEffect @ 0x10011e6d1
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x10011efb7
// > GJBaseGameLayer::controlTriggersInGroup @ 0x10013616b
// > GJBaseGameLayer::controlTriggersInGroup @ 0x100136201
// > GJBaseGameLayer::controlTriggersInGroup @ 0x100136297
// > GJBaseGameLayer::controlTriggersInGroup @ 0x1001363bd
// > GJBaseGameLayer::controlTriggersInGroup @ 0x100136453
// > GJBaseGameLayer::controlAreaEffect @ 0x100136822
// > GJBaseGameLayer::addAreaEffect @ 0x10013fdc5
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_10011ECC0(__int64 a1, __int64 a2)
{
__int64 v4; // r15
__int64 v5; // r12
__int64 v6; // r13
bool v7; // zf
__int64 v8; // r13
__int64 v9; // rax
__int64 v10; // rcx
void *v11; // rdi
__int128 v12; // xmm1
_QWORD *v13; // rsi
void *v14; // rdi
v4 = *(_QWORD *)(a1 + 8);
if ( a2 + 240 == v4 )
{
v6 = a2;
}
else
{
v5 = a2;
do
{
v8 = v5 + 8;
sub_100054D90(v5, *(_QWORD **)(v5 + 8));
v9 = *(_QWORD *)(v5 + 248);
*(_QWORD *)v5 = *(_QWORD *)(v5 + 240);
*(_QWORD *)(v5 + 8) = v9;
v10 = *(_QWORD *)(v5 + 256);
*(_QWORD *)(v5 + 16) = v10;
if ( v10 )
{
*(_QWORD *)(v9 + 16) = v8;
*(_QWORD *)(v5 + 240) = v5 + 248;
*(_OWORD *)(v5 + 248) = 0;
}
else
{
*(_QWORD *)v5 = v8;
}
memcpy((void *)(v5 + 24), (const void *)(v5 + 264), 0xB4u);
v11 = *(void **)(v5 + 208);
v12 = 0;
if ( v11 )
{
*(_QWORD *)(v5 + 216) = v11;
operator delete(v11);
v12 = 0;
*(_OWORD *)(v5 + 216) = 0;
}
*(_OWORD *)(v5 + 208) = *(_OWORD *)(v5 + 448);
*(_QWORD *)(v5 + 224) = *(_QWORD *)(v5 + 464);
*(_OWORD *)(v5 + 448) = v12;
*(_QWORD *)(v5 + 464) = 0;
*(_DWORD *)(v5 + 232) = *(_DWORD *)(v5 + 472);
v6 = v5 + 240;
v7 = v5 + 480 == v4;
v5 += 240;
}
while ( !v7 );
v4 = *(_QWORD *)(a1 + 8);
}
while ( v4 != v6 )
{
v14 = *(void **)(v4 - 32);
if ( v14 )
{
*(_QWORD *)(v4 - 24) = v14;
operator delete(v14);
}
v13 = *(_QWORD **)(v4 - 232);
v4 -= 240;
sub_100054D90(v4, v13);
}
*(_QWORD *)(a1 + 8) = v6;
return a2;
}