//
// sub_10066BC5C from 0x10066bc5c to 0x10066be24 (456 bytes)
//
// 1 xrefs:
// > sub_1006A9638 @ 0x1006a9a40
//
// 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:04 +0000
//
__int64 __fastcall sub_10066BC5C(_QWORD *a1, __int64 a2)
{
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x19
__int64 v8; // x21
__int64 v9; // x22
__int64 v10; // x2
__int64 v11; // x4
__int64 v12; // x0
bool v13; // zf
char *v14; // x23
__int64 v15; // x0
v4 = sub_1007072C0(a1);
v5 = sub_100701918(v4);
v6 = sub_1007005EC(v5);
v7 = v6;
if ( v6 )
{
if ( sub_100700CE0(v6, 108, 3, a2) <= 0 )
{
v10 = 2;
v11 = 701;
}
else
{
v8 = sub_1007249E4(v7, 0, a1[21], a1[22]);
if ( v8 )
{
if ( (unsigned int)sub_100667280(a1 + 38) )
{
v9 = sub_10066B510(a1[38], v8);
}
else
{
sub_100706FB0(20, 171, 65, "ssl_rsa.c", 386);
v9 = 0;
}
v12 = sub_100707584();
if ( (_DWORD)v9 )
v13 = v12 == 0;
else
v13 = 0;
if ( v13 )
{
sub_100665090((__int64)a1, 88, 0, nullptr);
while ( 1 )
{
v14 = (char *)sub_10072492C(v7, 0, a1[21], a1[22]);
if ( !v14 )
break;
if ( !(unsigned int)sub_100665090((__int64)a1, 89, 0, v14) )
{
sub_100719E08(v14);
v9 = 0;
goto LABEL_23;
}
}
v15 = sub_1007075D4();
if ( (v15 & 0xFF000FFF) == 0x900006C )
sub_1007072C0(v15);
else
v9 = 0;
}
else
{
v9 = 0;
}
LABEL_23:
sub_100719E08(v8);
goto LABEL_24;
}
v10 = 9;
v11 = 708;
}
sub_100706FB0(20, 220, v10, "ssl_rsa.c", v11);
v9 = 0;
LABEL_24:
sub_1007006BC(v7);
return v9;
}
sub_100706FB0(20, 220, 7, "ssl_rsa.c", 696);
return 0;
}