//
// sub_100678CB4 from 0x100678cb4 to 0x100678d74 (192 bytes)
//
// 2 xrefs:
// > sub_100682ECC @ 0x1006844f0
// > sub_1006AD8D8 @ 0x1006ad908
//
// 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_100678CB4(__int64 *a1, int a2, void *a3, size_t a4, int *a5)
{
ssize_t v7; // x20
__int64 v8; // x22
int v9; // w8
__int64 v10; // x23
const char *v11; // x0
v7 = recv(*((_DWORD *)a1 + a2 + 116), a3, a4, 0);
*a5 = 0;
if ( v7 == -1 )
{
v8 = (unsigned int)*__error();
if ( (_DWORD)v8 == 4 || (_DWORD)v8 == 35 )
{
v9 = 81;
}
else
{
v10 = *a1;
v11 = (const char *)sub_1006962D0(a1, v8);
sub_10067889C(v10, "Recv failure: %s", v11);
*(_DWORD *)(*a1 + 35236) = v8;
v9 = 56;
}
*a5 = v9;
}
return v7;
}