//
// X509v3_get_ext_by_critical from 0xde96f0 to 0xde97a0 (176 bytes)
//
// 8 xrefs:
// > OCSP_REQUEST_get_ext_by_critical @ 0xdc3cc0
// > OCSP_ONEREQ_get_ext_by_critical @ 0xdc3d20
// > OCSP_BASICRESP_get_ext_by_critical @ 0xdc3d80
// > OCSP_SINGLERESP_get_ext_by_critical @ 0xdc3de0
// > X509_CRL_get_ext_by_critical @ 0xde7144
// > X509_get_ext_by_critical @ 0xde71a4
// > X509_REVOKED_get_ext_by_critical @ 0xde7204
// > ??> @ 0x3f4f8
//
// 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 X509v3_get_ext_by_critical(unsigned int *a1, int a2, int a3)
{
int v3; // w2
unsigned int v5; // w19
signed int v7; // w22
if ( !a1 )
return 0xFFFFFFFFLL;
v3 = a3 + 1;
v5 = v3 < 0 ? 0 : v3;
v7 = OPENSSL_sk_num(a1);
if ( v7 <= (int)v5 )
return 0xFFFFFFFFLL;
if ( a2 )
{
while ( *(int *)(OPENSSL_sk_value((__int64)a1, v5) + 8) <= 0 )
{
if ( ++v5 == v7 )
return 0xFFFFFFFFLL;
}
return v5;
}
else
{
while ( *(int *)(OPENSSL_sk_value((__int64)a1, v5) + 8) > 0 )
{
if ( ++v5 == v7 )
return 0xFFFFFFFFLL;
}
return v5;
}
}