//
// sub_B9B848 from 0xb9b848 to 0xb9b94c (260 bytes)
//
// 0 xrefs:
//
// 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_B9B848(_QWORD *a1, __int64 *a2)
{
__int64 v3; // x4
__int64 result; // x0
_QWORD *v5; // x19
__time_t v7; // x21
__int64 v8; // x1
__int64 v9; // x22
__int64 v10; // x0
__time_t v11; // x2
if ( !a1 )
return 1;
v3 = *a1;
result = 1;
if ( v3 == 764702 )
{
result = a1[16];
if ( result )
{
v5 = a1;
v7 = sub_B70B94();
v9 = v8;
v10 = sub_BA2CF0(0, 0, v5[16]);
v11 = *(_QWORD *)(v10 + 24);
v5[16] = v10;
if ( v7 > v11 || v7 >= v11 && v9 >= *(_QWORD *)(v10 + 32) )
{
*a2 = 0;
return 0;
}
else
{
result = sub_B70BFC(*(_QWORD *)(v10 + 24), *(_QWORD *)(v10 + 32), v7, v9);
if ( result )
{
*a2 = result;
return 0;
}
else
{
*a2 = 1;
}
}
}
else
{
*a2 = -1;
}
}
return result;
}