//
// ssl_cert_type from 0xfcd134 to 0xfcd1dc (168 bytes)
//
// 8 xrefs:
// > sub_FC2264 @ 0xfc2298
// > sub_FC23F8 @ 0xfc2418
// > SSL_use_PrivateKey @ 0xfc2bf4
// > SSL_CTX_use_PrivateKey @ 0xfc34e4
// > tls_process_server_certificate @ 0xfc7ed8
// > tls_process_cert_verify @ 0xfd1a70
// > tls1_check_chain @ 0xfd93c8
// > ??> @ 0x8db98
//
// 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 13:15:27 +0000
//
__int64 __fastcall ssl_cert_type(__int64 a1, __int64 a2)
{
int v2; // w0
bool v3; // zf
bool v4; // nf
bool v5; // vf
int v6; // w1
__int64 result; // x0
__int64 v8; // x0
if ( !a2 )
{
v8 = X509_get0_pubkey(a1);
if ( !v8 )
return 0xFFFFFFFFLL;
v2 = EVP_PKEY_id(v8);
v5 = __OFSUB__(v2, 408);
v3 = v2 == 408;
v4 = v2 - 408 < 0;
v6 = v2;
if ( v2 != 408 )
goto LABEL_3;
return 3;
}
v2 = EVP_PKEY_id(a2);
v5 = __OFSUB__(v2, 408);
v3 = v2 == 408;
v4 = v2 - 408 < 0;
v6 = v2;
if ( v2 == 408 )
return 3;
LABEL_3:
if ( v4 ^ v5 | v3 )
{
v3 = v2 == 6;
result = 0;
if ( v3 )
return result;
result = 2;
if ( v6 == 116 )
return result;
return 0xFFFFFFFFLL;
}
if ( v2 == 979 )
return 5;
v3 = v2 == 980;
result = 6;
if ( !v3 )
{
result = 4;
if ( v6 != 811 )
return 0xFFFFFFFFLL;
}
return result;
}