//
// X509_check_issued from 0x107fde8 to 0x107fee0 (248 bytes)
//
// 3 xrefs:
// > sub_E2C94C @ 0xe2d2e0
// > sub_1068120 @ 0x1068148
// > ??> @ 0xca4f8
//
// 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:17:09 +0000
//
__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_107F63C(a1);
if ( (*(_DWORD *)(a2 + 208) & 0x100) == 0 )
sub_107F63C(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;
}
}