//
// sub_100678B2C from 0x100678b2c to 0x100678be8 (188 bytes)
//
// 2 xrefs:
// > sub_100682ECC @ 0x100684500
// > sub_1006AD8D8 @ 0x1006ad924
//
// This function is hookable on this platform (idp: arm, 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 11:11:13 +0000
//
ssize_t __fastcall sub_100678B2C(__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_1006962D0(a1, v8);
sub_10067889C(v9, "Send failure: %s", v10);
*(_DWORD *)(*a1 + 35236) = v8;
*a5 = 55;
return -1;
}
}
return result;
}