//
// sub_10065702C from 0x10065702c to 0x1006570d8 (172 bytes)
//
// 2 xrefs:
// > sub_100645938 @ 0x1006459c8
// > sub_10064E6AC @ 0x10064e6f0
//
// 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:10:53 +0000
//
__int64 __fastcall sub_10065702C(__int64 a1, _QWORD *a2)
{
__int64 v2; // x8
int v3; // w9
void *v4; // x8
__int64 v6; // x9
__int64 v7; // x8
v2 = *(_QWORD *)(a1 + 256);
v3 = *(_DWORD *)(v2 + 108) & 0x30000;
switch ( v3 )
{
case 65536:
v4 = &unk_1009E3A00;
goto LABEL_5;
case 131072:
v4 = &unk_1009E3A02;
LABEL_5:
*a2 = v4;
return 2;
case 196608:
*a2 = &unk_1009E3A00;
return 4;
default:
if ( *(_DWORD *)(a1 + 56) && (v6 = *(_QWORD *)(v2 + 608)) != 0 )
{
*a2 = v6;
return *(_QWORD *)(*(_QWORD *)(a1 + 256) + 616LL);
}
else
{
v7 = *(_QWORD *)(v2 + 592);
if ( v7 )
{
*a2 = v7;
return *(_QWORD *)(*(_QWORD *)(a1 + 256) + 600LL);
}
else
{
*a2 = &unk_1009E3A1C;
return 30;
}
}
}
}