//
// sub_140358980 from 0x140358980 to 0x1403589f1 (113 bytes)
//
// 28 xrefs:
// > sub_14030A3B0 @ 0x14030a3b3
// > sub_14030A3C0 @ 0x14030a3e0
// > GJBaseGameLayer::addCustomEnterEffect @ 0x140314606
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x140314973
// > GJBaseGameLayer::addAreaEffect @ 0x140330269
// > GJBaseGameLayer::controlAreaEffectWithID @ 0x1403305b3
// > GJBaseGameLayer::controlAreaEffect @ 0x140330743
// > GJBaseGameLayer::resetLevelVariables @ 0x140345572
// > sub_140354D80 @ 0x140354db2
// > sub_140356160 @ 0x140356349
// > sub_140356160 @ 0x1403563ed
// > sub_140356160 @ 0x140356468
// > sub_1403598D0 @ 0x140359912
// > sub_14035B080 @ 0x14035b247
// > sub_14035B080 @ 0x14035b28f
// > sub_14035B080 @ 0x14035b30d
// > sub_14035B080 @ 0x14035b353
// > sub_14035CCF0 @ 0x14035cd51
// > sub_14035D500 @ 0x14035d542
// > sub_14035D5C0 @ 0x14035d612
// > sub_14035E230 @ 0x14035e262
// > sub_14035E5D0 @ 0x14035e5df
// > sub_14051C550 @ 0x14051c602
// > sub_14051C550 @ 0x14051c7d2
// > sub_14054E6E0 @ 0x14054e762
// > EffectGameObject::triggerObject @ 0x140649414
// > ??> @ 0x140920ad4
// > ??> @ 0x140920ae0
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:30:50 +0000
//
void __fastcall sub_140358980(void **a1, __int64 a2)
{
_QWORD *v4; // rbx
void *v5; // rcx
v4 = *((_QWORD **)*a1 + 1);
while ( !*((_BYTE *)v4 + 25) )
{
sub_140068DC0((__int64)a1, a2, v4[2]);
v5 = v4;
v4 = (_QWORD *)*v4;
j_j_free(v5);
}
j_j_free(*a1);
}