//
// sub_100545AF4 from 0x100545af4 to 0x100545cbc (456 bytes)
//
// 1 xrefs:
// > sub_1005834D0 @ 0x1005838d8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100545AF4(_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_1005E1158(a1);
v5 = sub_1005DB7B0(v4);
v6 = sub_1005DA484(v5);
v7 = v6;
if ( v6 )
{
if ( sub_1005DAB78(v6, 108, 3, a2) <= 0 )
{
v10 = 2;
v11 = 701;
}
else
{
v8 = sub_1005FE87C(v7, 0, a1[21], a1[22]);
if ( v8 )
{
if ( (unsigned int)sub_100541118(a1 + 38) )
{
v9 = sub_1005453A8(a1[38], v8);
}
else
{
sub_1005E0E48(20, 171, 65, "ssl_rsa.c", 386);
v9 = 0;
}
v12 = sub_1005E141C();
if ( (_DWORD)v9 )
v13 = v12 == 0;
else
v13 = 0;
if ( v13 )
{
sub_10053EF28((__int64)a1, 88, 0, nullptr);
while ( 1 )
{
v14 = (char *)sub_1005FE7C4(v7, 0, a1[21], a1[22]);
if ( !v14 )
break;
if ( !(unsigned int)sub_10053EF28((__int64)a1, 89, 0, v14) )
{
sub_1005F3CA0(v14);
v9 = 0;
goto LABEL_23;
}
}
v15 = sub_1005E146C();
if ( (v15 & 0xFF000FFF) == 0x900006C )
sub_1005E1158(v15);
else
v9 = 0;
}
else
{
v9 = 0;
}
LABEL_23:
sub_1005F3CA0(v8);
goto LABEL_24;
}
v10 = 9;
v11 = 708;
}
sub_1005E0E48(20, 220, v10, "ssl_rsa.c", v11);
v9 = 0;
LABEL_24:
sub_1005DA554(v7);
return v9;
}
sub_1005E0E48(20, 220, 7, "ssl_rsa.c", 696);
return 0;
}