//
// X509_check_issued from 0xe01aa8 to 0xe01ba0 (248 bytes)
//
// 3 xrefs:
// > sub_BB678C @ 0xbb7120
// > sub_DE9DE0 @ 0xde9e08
// > ??> @ 0x99480
//
// 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 X509_check_issued(__int64 a1, __int64 a2)
{
__int64 subject_name; // x20
__int64 issuer_name; // x0
int v6; // w0
unsigned int v7; // w2
__int64 *v9; // x1
subject_name = X509_get_subject_name(a1);
issuer_name = X509_get_issuer_name(a2);
v6 = X509_NAME_cmp(subject_name, issuer_name);
v7 = 29;
if ( v6 )
return v7;
if ( (*(_DWORD *)(a1 + 208) & 0x100) == 0 )
sub_E012FC(a1);
if ( (*(_DWORD *)(a2 + 208) & 0x100) == 0 )
sub_E012FC(a2);
v9 = *(__int64 **)(a2 + 232);
if ( v9 )
{
v7 = X509_check_akid(a1, v9);
if ( v7 )
return v7;
}
if ( (*(_DWORD *)(a2 + 208) & 0x400) != 0 )
{
if ( (*(_QWORD *)(a1 + 208) & 0x8000000002LL) == 2 )
return 39;
else
return 0;
}
else if ( (*(_QWORD *)(a1 + 208) & 0x400000002LL) == 2 )
{
return 32;
}
else
{
return 0;
}
}