//
// sub_100585C24 from 0x100585c24 to 0x100585ca4 (128 bytes)
//
// 1 xrefs:
// > sub_1005EB710 @ 0x1005eb7c0
//
// 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:08:32 +0000
//
__int64 __fastcall sub_100585C24(__int64 a1, _DWORD *a2, int a3)
{
__int64 result; // x0
__int64 (*v5)(void); // x3
__int128 v6; // [xsp+0h] [xbp-50h] BYREF
__int128 v7; // [xsp+10h] [xbp-40h]
__int128 v8; // [xsp+20h] [xbp-30h]
__int64 v9; // [xsp+30h] [xbp-20h]
if ( a3 == 8 )
{
v9 = 0;
v7 = 0u;
v8 = 0u;
v6 = 0u;
result = (*(__int64 (__fastcall **)(__int64, _QWORD, __int128 *))(a1 + 136))(a1, *(unsigned int *)(a1 + 284), &v6);
if ( !(_DWORD)result )
*a2 = DWORD1(v7);
}
else
{
v5 = *(__int64 (**)(void))(a1 + 104);
if ( v5 )
{
return v5();
}
else
{
*a2 = 0;
return 68;
}
}
return result;
}