//
// sub_1005D452C from 0x1005d452c to 0x1005d45d4 (168 bytes)
//
// 1 xrefs:
// > sub_10062D634 @ 0x10062d7cc
//
// 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:33 +0000
//
__int64 __fastcall sub_1005D452C(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v5; // [xsp+0h] [xbp-20h] BYREF
__int64 v6; // [xsp+8h] [xbp-18h] BYREF
if ( *(_QWORD *)(a1 + 336) )
{
if ( (unsigned int)sub_100581904(a2, &v6, nullptr) )
{
if ( !(unsigned int)sub_10057FAA0(a2, &v5, nullptr) && *(_DWORD *)(v5 + 544) == 1 )
{
result = v5 + 520;
*(_DWORD *)(v5 + 544) = 2;
return result;
}
}
else
{
result = *(_QWORD *)(a1 + 336) + ((__int64)*(int *)(v6 + 464) << 6);
if ( *(_DWORD *)(result + 24) == 1 )
{
*(_DWORD *)(result + 24) = 2;
return result;
}
}
}
return 0;
}