//
// sub_14036F7E0 from 0x14036f7e0 to 0x14036f8a3 (195 bytes)
//
// 8 xrefs:
// > GJEffectManager::resetEffects @ 0x140366543
// > sub_140376B30 @ 0x140376b36
// > sub_140515E30 @ 0x140516457
// > sub_14052EA80 @ 0x14052eb82
// > ??> @ 0x1408bb588
// > ??> @ 0x1408bb59c
// > ??> @ 0x1408bb5d0
// > ??> @ 0x140921adc
//
// 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:59 +0000
//
void __fastcall sub_14036F7E0(_QWORD *a1)
{
unsigned __int64 v2; // rcx
__int64 v3; // rsi
_QWORD *v4; // rsi
_QWORD *v5; // rbx
unsigned __int64 *v6; // rdx
unsigned __int64 *v7; // rcx
unsigned __int64 v8; // [rsp+30h] [rbp+8h] BYREF
v2 = a1[2];
if ( v2 )
{
v3 = a1[1];
if ( a1[7] >> 3 <= v2 )
{
**(_QWORD **)(v3 + 8) = 0;
v4 = *(_QWORD **)v3;
if ( v4 )
{
do
{
v5 = (_QWORD *)*v4;
sub_140373070(v4 + 3);
j_j_free(v4);
v4 = v5;
}
while ( v5 );
}
*(_QWORD *)a1[1] = a1[1];
*(_QWORD *)(a1[1] + 8LL) = a1[1];
a1[2] = 0;
v6 = (unsigned __int64 *)a1[4];
v7 = (unsigned __int64 *)a1[3];
v8 = a1[1];
sub_14003EC90(v7, v6, &v8);
}
else
{
sub_1403725F0(a1, *(_QWORD *)v3, a1[1]);
}
}
}