//
// sub_1005EC42C from 0x1005ec42c to 0x1005ec4b8 (140 bytes)
//
// 5 xrefs:
// > sub_100595448 @ 0x1005954c8
// > sub_100596734 @ 0x1005967b4
// > sub_1005A5258 @ 0x1005a52e0
// > sub_1005A6044 @ 0x1005a60cc
// > sub_100621BA0 @ 0x100621c2c
//
// This function is hookable on this platform (idp: arm, 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:09:46 +0000
//
__int64 __fastcall sub_1005EC42C(__int64 a1)
{
bool v2; // cc
__int64 v4; // x20
__int64 v5; // [xsp+0h] [xbp-20h] BYREF
int v6; // [xsp+Ch] [xbp-14h] BYREF
v6 = 0;
if ( (*(unsigned int (__fastcall **)(__int64, int *))(*(_QWORD *)a1 + 232LL))(a1, &v6) )
v2 = 1;
else
v2 = v6 < 1;
if ( !v2 )
{
v4 = 0;
do
{
if ( !(*(unsigned int (__fastcall **)(__int64, __int64, __int64 *))(*(_QWORD *)a1 + 240LL))(a1, v4, &v5) )
*(_WORD *)(v5 + 50) = v4;
v4 = (unsigned int)(v4 + 1);
}
while ( (int)v4 < v6 );
}
return 0;
}