//
// sub_10061C0B4 from 0x10061c0b4 to 0x10061c140 (140 bytes)
//
// 2 xrefs:
// > sub_10057394C @ 0x100573a1c
// > sub_1005D1420 @ 0x1005d1678
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:10:16 +0000
//
__int64 __fastcall sub_10061C0B4(int a1, char *a2, unsigned int a3, _DWORD *a4)
{
unsigned int v5; // w20
ssize_t v8; // x0
*a4 = 0;
if ( !a3 )
return 0;
v5 = a3;
while ( 1 )
{
v8 = send(a1, a2, v5, 0x80000);
if ( v8 == -1 )
break;
*a4 += v8;
a2 += v8;
v5 -= v8;
if ( !v5 )
return 0;
}
if ( *__error() == 35 )
return 45;
else
return 43;
}