//
// sub_10071F124 from 0x10071f124 to 0x10071f218 (244 bytes)
//
// 3 xrefs:
// > sub_10070F848 @ 0x10070f8ec
// > sub_10070FB50 @ 0x10070fb6c
// > sub_10070FBA8 @ 0x10070fbc0
//
// 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:13:04 +0000
//
__int64 __fastcall sub_10071F124(__int64 *a1, int a2)
{
int v4; // w8
__int64 v5; // x23
__int64 *v6; // x0
__int64 v7; // x0
_DWORD *v9; // [xsp+8h] [xbp-118h] BYREF
_DWORD v10[52]; // [xsp+10h] [xbp-110h] BYREF
while ( 1 )
{
v9 = v10;
v10[0] = a2;
if ( !qword_100A0E928 || (v4 = sub_100704898((int *)qword_100A0E928, (__int64)v10), v4 < 0) )
{
v6 = (__int64 *)sub_1006B1A8C(
(__int64)&v9,
(__int64)&off_1009EA390,
12,
8,
(__int64 (__fastcall *)(__int64, __int64))sub_10071F520);
if ( !v6 )
break;
v5 = *v6;
}
else
{
v5 = sub_100704BC8(qword_100A0E928, v4);
}
if ( !v5 )
break;
if ( (*(_BYTE *)(v5 + 8) & 1) == 0 )
goto LABEL_12;
a2 = *(_DWORD *)(v5 + 4);
}
v5 = 0;
LABEL_12:
if ( a1 )
{
v7 = sub_1006FEFD8(a2);
if ( v7 )
{
*a1 = v7;
return sub_1006FEFEC(v7);
}
else
{
*a1 = 0;
}
}
return v5;
}