//
// sub_1005E9B58 from 0x1005e9b58 to 0x1005e9c08 (176 bytes)
//
// 1 xrefs:
// > ??> @ 0x100861718
//
// 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_1005E9B58(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // x20
__int64 v5; // x22
__int64 v6; // x0
v4 = 0;
if ( a2 && (int)a3 >= 1 )
{
v5 = *(_QWORD *)(a1 + 48);
if ( v5 && (v6 = *(_QWORD *)(a1 + 56)) != 0 )
{
v4 = sub_1005DA72C(v6, a2, a3);
if ( (int)v4 >= 1 && *(_DWORD *)(a1 + 24) && !(unsigned int)sub_1005E303C(v5) )
{
sub_1005DA600(a1, 15);
return 0;
}
}
else
{
v4 = 0;
}
if ( *(_QWORD *)(a1 + 56) )
{
sub_1005DA600(a1, 15);
sub_1005DB0A8(a1);
}
}
return v4;
}