//
// sub_100167AA0 from 0x100167aa0 to 0x100167b44 (164 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::updateActiveEnterEffect @ 0x10011e505
// > GJBaseGameLayer::updateActiveEnterEffect @ 0x10011e51f
// > GJBaseGameLayer::removeCustomEnterEffects @ 0x10011ecac
//
// 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_100167AA0(__int64 *a1, __int64 *a2)
{
__int64 v2; // rbx
_QWORD *v3; // r14
__int64 v4; // r12
__int64 v5; // r15
void *v6; // rdi
_QWORD *v7; // rsi
void *v8; // rdi
void *__p; // [rsp+8h] [rbp-38h] BYREF
char v11; // [rsp+18h] [rbp-28h]
v2 = *a2;
sub_100056B40((__int64)&__p, a1, a2);
v3 = __p;
__p = nullptr;
if ( v3 )
{
if ( v11 == 1 )
{
v4 = v3[3];
if ( v4 )
{
v5 = v3[4];
v6 = (void *)v3[3];
if ( v5 != v4 )
{
do
{
v8 = *(void **)(v5 - 32);
if ( v8 )
{
*(_QWORD *)(v5 - 24) = v8;
operator delete(v8);
}
v7 = *(_QWORD **)(v5 - 232);
v5 -= 240;
sub_100054D90(v5, v7);
}
while ( v5 != v4 );
v6 = (void *)v3[3];
}
v3[4] = v4;
operator delete(v6);
}
}
operator delete(v3);
}
return v2;
}