//
// sub_10039B3E0 from 0x10039b3e0 to 0x10039b46c (140 bytes)
//
// 4 xrefs:
// > sub_10039C044 @ 0x10039c128
// > sub_10039C044 @ 0x10039c3e4
// > sub_10039CAAC @ 0x10039cb7c
// > sub_10039CED8 @ 0x10039cfcc
//
// 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:03:43 +0000
//
__int64 __fastcall sub_10039B3E0(__int64 a1, __int64 a2)
{
__int64 result; // x0
unsigned int v5; // w21
result = *(_QWORD *)(a1 + 592);
if ( result )
{
if ( (unsigned int)sub_1002E757C(result) && (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 592)) )
{
v5 = 0;
while ( 1 )
{
result = sub_1002E75A0(*(_QWORD *)(a1 + 592), v5);
if ( *(_DWORD *)(result + 484) == *(_DWORD *)(a2 + 60) && *(_DWORD *)(result + 480) == *(_DWORD *)(a2 + 56) )
break;
if ( ++v5 >= (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 592)) )
return 0;
}
}
else
{
return 0;
}
}
return result;
}