//
// sub_1005B36E0 from 0x1005b36e0 to 0x1005b3770 (144 bytes)
//
// 5 xrefs:
// > sub_1005A92E8 @ 0x1005a971c
// > sub_1005A976C @ 0x1005a9cf0
// > sub_1005AA178 @ 0x1005aa8b8
// > sub_1005B3C70 @ 0x1005b4298
// > sub_1005BB458 @ 0x1005bb478
//
// 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_1005B36E0(__int64 a1, __int64 a2, __int64 a3, __int64 *a4)
{
_QWORD *v8; // x0
__int64 v9; // x23
__int64 v10; // x20
sub_1005ABC90((__int64)a4);
v8 = sub_1005ABDFC(a4);
v9 = (__int64)v8;
if ( v8 )
{
if ( sub_1005AAFFC((__int64)v8, a2) )
v10 = sub_1005B3440(a1, v9, a3);
else
v10 = 0;
}
else
{
v10 = 0;
}
sub_1005ABD78((__int64)a4);
return v10;
}