//
// sub_8519FC from 0x8519fc to 0x851b10 (276 bytes)
//
// 3 xrefs:
// > X509v3_asid_add_id_or_range @ 0x852884
// > X509v3_asid_add_id_or_range @ 0x852888
// > ??> @ 0x8528e4
//
// 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
//
int __fastcall sub_8519FC(int **a1, _DWORD **a2)
{
int *v2; // r4
_DWORD *v3; // r5
int v4; // r2
_DWORD *v5; // r0
int *v6; // r3
int v7; // r1
int result; // r0
v2 = *a1;
v3 = *a2;
v4 = **a1;
if ( !v4 )
{
v5 = (_DWORD *)v2[1];
if ( v5 )
goto LABEL_3;
LABEL_16:
OPENSSL_die(
"assertion failed: (a->type == ASIdOrRange_id && a->u.id != NULL) || (a->type == ASIdOrRange_range && a->u.range !="
" NULL && a->u.range->min != NULL && a->u.range->max != NULL)",
"crypto/x509v3/v3_asid.c",
128);
}
if ( v4 != 1 )
goto LABEL_16;
v5 = (_DWORD *)v2[1];
if ( !v5 || !*v5 || !v5[1] )
goto LABEL_16;
LABEL_3:
if ( !*v3 )
{
v7 = v3[1];
if ( v7 )
{
if ( v4 )
v5 = (_DWORD *)*v5;
return ASN1_INTEGER_cmp(v5, v7);
}
LABEL_21:
OPENSSL_die(
"assertion failed: (b->type == ASIdOrRange_id && b->u.id != NULL) || (b->type == ASIdOrRange_range && b->u.range !="
" NULL && b->u.range->min != NULL && b->u.range->max != NULL)",
"crypto/x509v3/v3_asid.c",
132);
}
if ( *v3 != 1 )
goto LABEL_21;
v6 = (int *)v3[1];
if ( !v6 )
goto LABEL_21;
v7 = *v6;
if ( !*v6 || !v6[1] )
goto LABEL_21;
if ( v4 )
{
result = ASN1_INTEGER_cmp(*v5, v7);
if ( result )
return result;
v5 = *(_DWORD **)(v2[1] + 4);
v7 = *(_DWORD *)(v3[1] + 4);
}
return ASN1_INTEGER_cmp(v5, v7);
}