//
// sub_742280 from 0x742280 to 0x7422ce (78 bytes)
//
// 3 xrefs:
// > sub_7424F0 @ 0x74253a
// > sub_7424F0 @ 0x742556
// > sub_7424F0 @ 0x742572
//
// 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
//
int __fastcall sub_742280(const char *a1, int a2, int a3)
{
int v5; // r5
int v6; // r4
ssize_t v7; // r0
v5 = open(a1, 0);
if ( v5 < 0 )
return -1;
v6 = 0;
while ( v6 < a3 )
{
v7 = read(v5, (void *)(a2 + v6), a3 - v6);
if ( v7 >= 0 )
{
if ( !v7 )
break;
v6 += v7;
}
else if ( *(_DWORD *)_errno() != 4 )
{
if ( !v6 )
v6 = -1;
break;
}
}
close(v5);
return v6;
}