//
// sub_10060E3C8 from 0x10060e3c8 to 0x10060e4c0 (248 bytes)
//
// 1 xrefs:
// > sub_10060DD64 @ 0x10060decc
//
// 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:08 +0000
//
__int64 __fastcall sub_10060E3C8(__int64 a1)
{
__int64 v2; // x8
__int64 result; // x0
int *v4; // x9
int v5; // w8
__int64 v6; // x8
void *v7; // x0
__int64 v8; // x8
unsigned int (__fastcall *v9)(__int64, _QWORD, _QWORD); // x10
v2 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v2 + 464) = 0;
*(_DWORD *)(v2 + 4104) = 0;
result = sub_100550B70(*(_QWORD *)(v2 + 120));
v4 = *(int **)a1;
if ( (_DWORD)result )
v5 = 2;
else
v5 = 8;
*v4 = v5;
if ( !(_DWORD)result )
return result;
v6 = *(_QWORD *)(a1 + 8);
if ( !*(_DWORD *)(v6 + 4108) )
{
if ( *(FILE **)(v6 + 112) != __stdinp )
{
v9 = *(unsigned int (__fastcall **)(__int64, _QWORD, _QWORD))(v6 + 8);
if ( !v9 )
goto LABEL_7;
if ( v9(a1, 0, *(_QWORD *)(v6 + 104)) != 1 )
{
v4 = *(int **)a1;
v6 = *(_QWORD *)(a1 + 8);
goto LABEL_7;
}
}
return 0;
}
*(_DWORD *)(v6 + 4108) = 0;
LABEL_7:
*v4 = 0;
*(_DWORD *)(v6 + 472) = 0;
if ( *(_DWORD *)(v6 + 476) )
{
v7 = *(void **)(v6 + 680);
if ( v7 )
{
free(v7);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 680LL) = 0;
v4 = *(int **)a1;
v6 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(v6 + 476) = 0;
}
}
*(_DWORD *)(v6 + 4104) = v4[6];
*(_QWORD *)(v6 + 456) = 0;
sub_100608F8C(v6 + 4120);
v8 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(v8 + 6848) = 0;
*(_DWORD *)(v8 + 6864) = 0;
return 1;
}