//
// sub_10020EBBC from 0x10020ebbc to 0x10020ec7c (192 bytes)
//
// 2 xrefs:
// > sub_10020E640 @ 0x10020eb04
// > sub_10020E640 @ 0x10020e8e4
//
// 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:01:01 +0000
//
__int64 __fastcall sub_10020EBBC(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v4; // x20
__int64 v5; // x0
_WORD v6[2]; // [xsp+Ch] [xbp-34h] BYREF
if ( a2 )
*(_DWORD *)(a1 + 672) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
result = sub_1002E757C(*(_QWORD *)(a1 + 664));
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 664), v4);
if ( (_DWORD)v4 != *(_DWORD *)(a1 + 672) )
memset(v6, 125, 3);
(*(void (**)(void))(*(_QWORD *)v5 + 960LL))();
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 664));
}
while ( (unsigned int)v4 < (unsigned int)result );
}
return result;
}