//
// sub_1006AC650 from 0x1006ac650 to 0x1006ac764 (276 bytes)
//
// 1 xrefs:
// > sub_1006A9638 @ 0x1006abf68
//
// 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:47 +0000
//
__int64 __fastcall sub_1006AC650(__int64 *a1, int a2, __int64 a3, __int64 a4, int *a5)
{
__int64 *v8; // x23
int v9; // w0
__int64 v10; // x21
__int64 v11; // x0
int v13; // w8
__int64 v14; // x0
__int64 v15; // x20
const char *v16; // x21
int *v17; // x0
_BYTE v19[120]; // [xsp+10h] [xbp-B0h] BYREF
sub_1007072C0(a1);
v8 = &a1[5 * a2];
v9 = sub_100664CE0(v8[68]);
v10 = v9;
if ( v9 <= 0 )
{
v11 = sub_1006666AC(v8[68], v9);
if ( (_DWORD)v11 != 6 && (_DWORD)v11 != 0 )
{
if ( (unsigned int)(v11 - 2) <= 1 )
{
v13 = 81;
LABEL_11:
*a5 = v13;
return -1;
}
v14 = sub_100707344(v11);
if ( (v10 & 0x80000000) != 0 || v14 )
{
v15 = *a1;
v16 = (const char *)sub_100707A04(v14, v19);
v17 = __error();
sub_10067889C(v15, "SSL read: %s, errno %d", v16, *v17);
v13 = 56;
goto LABEL_11;
}
}
}
return v10;
}