//
// sub_1005DF520 from 0x1005df520 to 0x1005df5ac (140 bytes)
//
// 1 xrefs:
// > sub_1005DF3B8 @ 0x1005df3dc
//
// 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_1005DF520(__int64 *a1)
{
__int64 v1; // x20
int *v3; // x1
v1 = *a1;
if ( *a1 )
{
v3 = *(int **)(v1 + 8);
if ( !v3 || (sub_1005D7AD8(*((_QWORD *)off_1009DA5E8 + 54), v3), *(_QWORD *)(v1 + 8) = 0, (v1 = *a1) != 0) )
{
sub_1005D7AD8(*((_QWORD *)off_1009DA5E8 + 54), (int *)v1);
*a1 = 0;
}
}
return 0;
}