//
// sub_1005209D8 from 0x1005209d8 to 0x100520a38 (96 bytes)
//
// 8 xrefs:
// > sub_1005209BC @ 0x1005209cc
// > sub_100520C0C @ 0x100520c20
// > sub_100520DF8 @ 0x100520e0c
// > sub_100520FD4 @ 0x100520fe8
// > sub_100521248 @ 0x100521274
// > sub_1005214AC @ 0x1005214c8
// > sub_100521734 @ 0x100521760
// > sub_1005218FC @ 0x100521908
//
// 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:07:12 +0000
//
__int64 __fastcall sub_1005209D8(__int64 a1)
{
void *v2; // x0
v2 = *(void **)(a1 + 96);
if ( v2 )
{
*(_QWORD *)(a1 + 104) = v2;
operator delete(v2);
}
if ( *(char *)(a1 + 95) < 0 )
operator delete(*(void **)(a1 + 72));
if ( *(char *)(a1 + 63) < 0 )
operator delete(*(void **)(a1 + 40));
if ( *(char *)(a1 + 39) < 0 )
operator delete(*(void **)(a1 + 16));
return a1;
}