//
// sub_61C8C from 0x61c8c to 0x61d00 (116 bytes)
//
// 2 xrefs:
// > sub_836EC @ 0x837cc
// > sub_E0F84 @ 0xe1428
//
// 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_61C8C(int fd, char *buf, size_t n, _DWORD *a4)
{
unsigned int v5; // w20
ssize_t v8; // x0
__int64 v10; // x0
v5 = n;
*a4 = 0;
if ( !(_DWORD)n )
return 0;
while ( 1 )
{
v8 = send(fd, buf, v5, 0x4000);
if ( v8 == -1 )
break;
v5 -= v8;
buf += v8;
*a4 += v8;
if ( !v5 )
return 0;
}
v10 = __errno();
return sub_61D9C(v10);
}