//
// sub_10066BAEC from 0x10066baec to 0x10066bc5c (368 bytes)
//
// 1 xrefs:
// > sub_1006A9638 @ 0x1006ab908
//
// 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_10066BAEC(_QWORD *a1, __int64 a2, int a3)
{
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x19
__int64 v9; // x21
__int64 v10; // x2
__int64 v11; // x20
__int64 v12; // x4
__int64 *v13; // x20
v6 = sub_100701918();
v7 = sub_1007005EC(v6);
v8 = v7;
if ( v7 )
{
if ( sub_100700CE0(v7, 108, 3, a2) <= 0 )
{
v10 = 2;
v12 = 633;
}
else
{
if ( a3 == 2 )
{
v9 = sub_10072A3C4(v8, 0);
v10 = 13;
}
else
{
if ( a3 != 1 )
{
v10 = 124;
v12 = 645;
goto LABEL_14;
}
v9 = sub_100724ACC(v8, 0, a1[21], a1[22]);
v10 = 9;
}
if ( v9 )
{
v13 = a1 + 38;
if ( (unsigned int)sub_100667280(v13) )
{
v11 = sub_10066B654(*v13, v9);
}
else
{
sub_100706FB0(20, 174, 65, "ssl_rsa.c", 613);
v11 = 0;
}
sub_10070FBF4(v9);
goto LABEL_17;
}
v12 = 649;
}
LABEL_14:
sub_100706FB0(20, 176, v10, "ssl_rsa.c", v12);
v11 = 0;
LABEL_17:
sub_1007006BC(v8);
return v11;
}
sub_100706FB0(20, 176, 7, "ssl_rsa.c", 628);
return 0;
}