//
// sub_10042B118 from 0x10042b118 to 0x10042b1d0 (184 bytes)
//
// 3 xrefs:
// > sub_1004EADF4 @ 0x1004eaec8
// > sub_1004EADF4 @ 0x1004eb0a8
// > sub_1004EADF4 @ 0x1004eb15c
//
// 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
//
bool __fastcall sub_10042B118(__int64 a1, __int64 a2, unsigned int a3)
{
unsigned int v3; // w19
unsigned int v6; // w22
int v8; // [xsp+Ch] [xbp-24h] BYREF
if ( !a3 )
return 1;
v3 = a3;
if ( (*(_DWORD *)(a2 + 24) & 7) != 0 )
{
if ( 8 - (*(_DWORD *)(a2 + 24) & 7u) >= a3 )
v6 = a3;
else
v6 = 8 - (*(_DWORD *)(a2 + 24) & 7);
if ( !(unsigned int)sub_10042ACF0(a1, a2, &v8, v6) )
return 0;
v3 -= v6;
}
if ( v3 >= 8 )
{
if ( !(unsigned int)sub_10042B1D0(a1, a2, v3 >> 3) )
return 0;
v3 &= 7u;
}
return !v3 || (unsigned int)sub_10042ACF0(a1, a2, &v8, v3);
}