//
// sub_100682BE4 from 0x100682be4 to 0x100682cac (200 bytes)
//
// 1 xrefs:
// > sub_100693C98 @ 0x100693f58
//
// 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:18 +0000
//
__int64 __fastcall sub_100682BE4(__int64 a1, _BYTE *a2)
{
__int64 result; // x0
__int64 (__fastcall *v5)(__int64, _BYTE *); // x8
*a2 = 0;
if ( *(_BYTE *)(a1 + 746) )
{
if ( *(_BYTE *)(a1 + 748) )
{
if ( !*(_QWORD *)(*(_QWORD *)(a1 + 800) + 48LL) )
*a2 = 1;
return 0;
}
}
else if ( *(_BYTE *)(a1 + 748) )
{
return 0;
}
result = sub_1006A2218(a1);
if ( (_DWORD)result )
return result;
if ( *(_BYTE *)(a1 + 750) && *(_BYTE *)(a1 + 740) && *(_DWORD *)(a1 + 1592) != 2 )
return 0;
v5 = *(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)(a1 + 800) + 40LL);
if ( v5 )
{
result = v5(a1, a2);
if ( (_DWORD)result )
return result;
}
else
{
*a2 = 1;
}
*(_BYTE *)(a1 + 748) = 1;
return 0;
}