//
// sub_100678BE8 from 0x100678be8 to 0x100678cb4 (204 bytes)
//
// 5 xrefs:
// > sub_10069924C @ 0x10069946c
// > sub_10069924C @ 0x1006994a8
// > sub_100699748 @ 0x10069989c
// > sub_100699748 @ 0x100699b88
// > sub_100699748 @ 0x100699ce4
//
// 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
//
__int64 __fastcall sub_100678BE8(_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_1006962D0(a1, v10);
sub_10067889C(v11, "Send failure: %s", v12);
*(_DWORD *)(*(_QWORD *)a1 + 35236LL) = v10;
v7 = -1;
v8 = 55;
}
}
else
{
v8 = 0;
}
*a5 = v7;
return v8;
}