//
// sub_10071C1E0 from 0x10071c1e0 to 0x10071c2d8 (248 bytes)
//
// 3 xrefs:
// > sub_1007164B8 @ 0x1007164e4
// > sub_10071BD24 @ 0x10071bf5c
// > sub_10071C1E0 @ 0x10071c26c
//
// 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:02 +0000
//
void __fastcall sub_10071C1E0(void **a1, __int64 a2)
{
void **v2; // x19
__int64 v3; // x8
void (__fastcall *v4)(void **); // x2
int v5; // w8
v2 = a1;
if ( a2 )
{
v3 = *(_QWORD *)(a2 + 32);
if ( v3 )
{
v4 = *(void (__fastcall **)(void **))(v3 + 24);
if ( v4 )
{
v4(a1);
return;
}
}
if ( *(_BYTE *)a2 == 5 )
{
if ( !*a1 )
return;
goto LABEL_21;
}
v5 = *(_DWORD *)(a2 + 8);
if ( v5 == 1 )
goto LABEL_19;
if ( !*a1 )
return;
}
else
{
v5 = *(_DWORD *)*a1;
v2 = (void **)((char *)*a1 + 8);
if ( !*v2 )
return;
}
if ( v5 > 4 )
{
if ( v5 == 5 )
goto LABEL_22;
if ( v5 == 6 )
{
sub_100714840(*v2);
goto LABEL_22;
}
goto LABEL_21;
}
if ( v5 == -4 )
{
sub_10071C1E0(v2, 0);
sub_1006AEDAC(*v2);
LABEL_22:
*v2 = nullptr;
return;
}
if ( v5 != 1 )
{
LABEL_21:
sub_100721BE0(*v2);
*v2 = nullptr;
goto LABEL_22;
}
LABEL_19:
if ( a2 )
*(_DWORD *)v2 = *(_QWORD *)(a2 + 40);
else
*(_DWORD *)v2 = -1;
}