//
// sub_1005529C4 from 0x1005529c4 to 0x100552a80 (188 bytes)
//
// 2 xrefs:
// > sub_10055CD64 @ 0x10055e398
// > sub_100587770 @ 0x1005877bc
//
// 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
//
ssize_t __fastcall sub_1005529C4(__int64 *a1, int a2, void *a3, size_t a4, _DWORD *a5)
{
ssize_t result; // x0
__int64 v8; // x21
__int64 v9; // x22
const char *v10; // x0
result = send(*((_DWORD *)a1 + a2 + 116), a3, a4, 0);
*a5 = 0;
if ( result == -1 )
{
v8 = (unsigned int)*__error();
if ( (_DWORD)v8 == 4 || (_DWORD)v8 == 35 )
{
*a5 = 81;
return 0;
}
else
{
v9 = *a1;
v10 = (const char *)sub_100570168(a1, v8);
sub_100552734(v9, "Send failure: %s", v10);
*(_DWORD *)(*a1 + 35236) = v8;
*a5 = 55;
return -1;
}
}
return result;
}