//
// sub_1005DFC88 from 0x1005dfc88 to 0x1005dfd40 (184 bytes)
//
// 1 xrefs:
// > sub_1005DFA08 @ 0x1005dfa2c
//
// 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:09:39 +0000
//
__int64 __fastcall sub_1005DFC88(int **a1)
{
int *v1; // x20
FILE *v3; // x0
__int64 result; // x0
int *v5; // x1
v1 = *a1;
if ( !*a1 )
return 0;
v3 = *((FILE **)v1 + 6);
if ( !v3
|| (result = sub_1005A62A0(v3, v1[5], v1[1], *v1, v1[9]), !(_DWORD)result)
&& (result = sub_1005DB80C(*((FILE **)v1 + 6)), !(_DWORD)result) )
{
v5 = *((int **)v1 + 5);
if ( v5 )
{
sub_1005D7AD8(*((_QWORD *)off_1009DA5E8 + 54), v5);
*((_QWORD *)v1 + 5) = 0;
}
if ( *a1 )
{
sub_1005D7AD8(*((_QWORD *)off_1009DA5E8 + 54), *a1);
*a1 = nullptr;
return 0;
}
return 0;
}
return result;
}