//
// sub_1006AFA30 from 0x1006afa30 to 0x1006afbc8 (408 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009e6060
//
// 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:11:49 +0000
//
__int64 __fastcall sub_1006AFA30(__int64 a1, __int64 a2, _QWORD *a3)
{
__int64 v5; // x23
int v6; // w0
int v7; // w22
_BYTE *v8; // x21
__int64 v9; // x24
__int64 v11; // x23
__int64 v12; // x8
__int64 v13; // x1
v5 = sub_1006AFFC0();
if ( !v5 )
return 0;
*a3 = 0;
sub_1006AE2F8(5, 2, (__int64)"ex_data.c", 426);
v6 = sub_100704BB4(*(_QWORD *)(v5 + 8));
v7 = v6;
v8 = nullptr;
if ( v6 >= 1 )
{
v8 = sub_1006AE878((unsigned int)(8 * v6), (__int64)"ex_data.c", 429);
if ( v8 )
{
v9 = 0;
do
{
*(_QWORD *)&v8[8 * v9] = sub_100704BC8(*(_QWORD *)(v5 + 8), v9);
++v9;
}
while ( v7 != (_DWORD)v9 );
}
}
sub_1006AE2F8(6, 2, (__int64)"ex_data.c", 436);
if ( v7 < 1 || v8 )
{
if ( v7 >= 1 )
{
v11 = 0;
do
{
v12 = *(_QWORD *)&v8[8 * v11];
if ( v12 && *(_QWORD *)(v12 + 16) )
{
if ( *a3 )
{
if ( (int)sub_100704BB4(*a3) <= v11 )
v13 = 0;
else
v13 = sub_100704BC8(*a3, v11);
}
else
{
v13 = 0;
}
(*(void (__fastcall **)(__int64, __int64, _QWORD *, __int64, _QWORD, _QWORD))(*(_QWORD *)&v8[8 * v11] + 16LL))(
a2,
v13,
a3,
v11,
**(_QWORD **)&v8[8 * v11],
*(_QWORD *)(*(_QWORD *)&v8[8 * v11] + 8LL));
}
++v11;
}
while ( v7 != (_DWORD)v11 );
}
if ( v8 )
sub_1006AEDAC(v8);
return 1;
}
else
{
sub_100706FB0(15, 108, 65, "ex_data.c", 438);
return 0;
}
}