//
// sub_18010A410 from 0x18010a410 to 0x18010a49d (141 bytes)
//
// 3 xrefs:
// > sub_1800B4680 @ 0x1800b48dd
// > sub_180112AC0 @ 0x180112c55
// > ??> @ 0x1802017cc
//
// This function is hookable on this platform (idp: pc, 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 10:54:32 +0000
//
__int64 __fastcall sub_18010A410(SOCKET s, char *buf, int len, _DWORD *a4)
{
int v8; // eax
int Error; // eax
unsigned int v10; // ecx
*a4 = 0;
while ( 1 )
{
if ( !len )
return 0;
v8 = send(s, buf, len, 0);
if ( v8 == -1 )
break;
*a4 += v8;
len -= v8;
buf += v8;
}
Error = WSAGetLastError();
v10 = 43;
if ( Error == 10035 )
return 45;
return v10;
}