//
// sub_618368 from 0x618368 to 0x6183ea (130 bytes)
//
// 0 xrefs:
//
// 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_618368(int *a1, int a2, void *a3, size_t a4, _DWORD *a5)
{
ssize_t v6; // r0
ssize_t v7; // r4
_DWORD *v9; // r0
int v10; // r8
bool v11; // zf
int v12; // r3
int v13; // r7
const char *v14; // r0
v6 = send(a1[a2 + 104], a3, a4, 0x4000);
*a5 = 0;
v7 = v6;
if ( v6 != -1 )
return v7;
v9 = (_DWORD *)_errno();
v10 = *v9;
v11 = *v9 == 11;
if ( *v9 != 11 )
v11 = v10 == 4;
v12 = v11;
if ( v10 == 115 )
v12 |= 1u;
if ( !v12 )
{
v13 = *a1;
v14 = (const char *)sub_6325A4(a1, *v9);
sub_6180F8(v13, "Send failure: %s", v14);
*(_DWORD *)(*a1 + 34488) = v10;
*a5 = 55;
return v7;
}
*a5 = 81;
return 0;
}