//
// sub_100552A80 from 0x100552a80 to 0x100552b4c (204 bytes)
//
// 5 xrefs:
// > sub_1005730E4 @ 0x100573304
// > sub_1005730E4 @ 0x100573340
// > sub_1005735E0 @ 0x100573734
// > sub_1005735E0 @ 0x100573a20
// > sub_1005735E0 @ 0x100573b7c
//
// 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_100552A80(_DWORD *a1, int a2, void *a3, size_t a4, ssize_t *a5)
{
ssize_t v7; // x0
__int64 v8; // x8
int *v9; // x8
__int64 v10; // x21
__int64 v11; // x22
const char *v12; // x0
v7 = send(a1[(a1[117] == a2) + 116], a3, a4, 0);
if ( v7 == -1 )
{
v9 = __error();
v7 = 0;
v10 = (unsigned int)*v9;
v8 = 81;
if ( (_DWORD)v10 != 4 && (_DWORD)v10 != 35 )
{
v11 = *(_QWORD *)a1;
v12 = (const char *)sub_100570168(a1, v10);
sub_100552734(v11, "Send failure: %s", v12);
*(_DWORD *)(*(_QWORD *)a1 + 35236LL) = v10;
v7 = -1;
v8 = 55;
}
}
else
{
v8 = 0;
}
*a5 = v7;
return v8;
}