//
// sub_100402F68 from 0x100402f68 to 0x100403054 (236 bytes)
//
// 1 xrefs:
// > sub_100402770 @ 0x100402968
//
// 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:04:39 +0000
//
__int64 __fastcall sub_100402F68(__int64 a1, __int64 a2, int a3)
{
__int64 result; // x0
__int64 v7; // x0
unsigned int *v8; // x9
__int64 v9; // x8
__int64 *v10; // x22
unsigned __int64 v11; // x23
unsigned int *v12; // x9
__int64 v13; // x8
__int64 *v14; // x22
unsigned __int64 v15; // x23
result = sub_1000150C8(*(_QWORD *)(a1 + 2152), a2);
if ( (_DWORD)result != a3 )
{
*(_BYTE *)(*(_QWORD *)(a1 + 14640) + (int)a2) = 2;
v7 = sub_100403388(a1, a2);
if ( a3 )
{
if ( v7 )
{
v8 = *(unsigned int **)(v7 + 56);
v9 = *v8;
if ( (_DWORD)v9 )
{
v10 = *((__int64 **)v8 + 2);
v11 = (unsigned __int64)&v10[v9 - 1];
do
{
if ( !*v10 )
break;
sub_1002FA8F4(*v10++);
}
while ( (unsigned __int64)v10 <= v11 );
}
}
}
else if ( v7 )
{
v12 = *(unsigned int **)(v7 + 56);
v13 = *v12;
if ( (_DWORD)v13 )
{
v14 = *((__int64 **)v12 + 2);
v15 = (unsigned __int64)&v14[v13 - 1];
do
{
if ( !*v14 )
break;
sub_1002FA910(*v14++);
}
while ( (unsigned __int64)v14 <= v15 );
}
}
return sub_1000109D4(*(_QWORD *)(a1 + 2152), a2, a3);
}
return result;
}