//
// sub_100586B2C from 0x100586b2c to 0x100586bbc (144 bytes)
//
// 1 xrefs:
// > sub_1005834D0 @ 0x100585ee0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100586B2C(__int64 a1, __int64 a2)
{
__int64 v4; // x0
char *v5; // x21
__int64 v6; // x0
__int64 (__fastcall *v7)(__int64, __int64); // x2
v4 = sub_100617F64(a2);
if ( (unsigned int)(v4 - 1) <= 1
&& (v4 = sub_100617B98(a1), (v5 = (char *)v4) != nullptr)
&& (v4 = sub_100617F78(a2), (v4 & 2) != 0) )
{
sub_100617FF4(a1, a2, v5);
return 1;
}
else
{
v6 = sub_10061826C(v4);
v7 = (__int64 (__fastcall *)(__int64, __int64))sub_100617F3C(v6);
return v7(a1, a2);
}
}