//
// sub_1005DAFFC from 0x1005daffc to 0x1005db02c (48 bytes)
//
// 2 xrefs:
// > sub_1005D5024 @ 0x1005d5178
// > sub_1005D56BC @ 0x1005d59d8
//
// 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:37 +0000
//
__int64 __fastcall sub_1005DAFFC(__int64 result, __int64 a2)
{
int v2; // w8
__int64 v3; // x9
v2 = *(_DWORD *)(a2 + 24);
if ( (v2 & 0x400) == 0 )
{
v3 = *(_QWORD *)(result + 24);
*(_QWORD *)(a2 + 72) = v3;
*(_QWORD *)(result + 24) = a2;
if ( v3 )
*(_QWORD *)(v3 + 48) = a2;
*(_QWORD *)(a2 + 48) = 0;
*(_DWORD *)(a2 + 24) = v2 | 0x420;
}
return result;
}