//
// sub_1006663D4 from 0x1006663d4 to 0x100666474 (160 bytes)
//
// 3 xrefs:
// > sub_100644BF4 @ 0x100644c18
// > sub_10064D160 @ 0x10064d640
// > sub_100659AD0 @ 0x100659b00
//
// 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:01 +0000
//
__int64 __fastcall sub_1006663D4(__int64 a1)
{
__int64 v2; // x8
__int64 v3; // x1
__int64 v4; // x19
int v5; // w0
v2 = *(_QWORD *)(a1 + 128);
if ( !v2 )
return 0;
v3 = *(_QWORD *)(v2 + 936);
if ( !v3 )
return 0;
v4 = *(_QWORD *)(a1 + 256);
sub_100665E10(v4, v3);
v5 = sub_10066B3C8(*(_QWORD *)(*(_QWORD *)(a1 + 128) + 936LL));
if ( v5 != -1 )
{
if ( v5 )
{
if ( v5 < 0 )
return 0;
}
else
{
v5 = *(_QWORD *)(*(_QWORD *)(a1 + 256) + 112LL) == 0;
}
return v4 + 56LL * v5 + 112;
}
sub_100706FB0(20, 322, 68, "ssl_lib.c", 2522);
return 0;
}