//
// X509v3_get_ext_by_critical from 0x1067a30 to 0x1067ae0 (176 bytes)
//
// 8 xrefs:
// > OCSP_REQUEST_get_ext_by_critical @ 0x1042020
// > OCSP_ONEREQ_get_ext_by_critical @ 0x1042080
// > OCSP_BASICRESP_get_ext_by_critical @ 0x10420e0
// > OCSP_SINGLERESP_get_ext_by_critical @ 0x1042140
// > X509_CRL_get_ext_by_critical @ 0x1065484
// > X509_get_ext_by_critical @ 0x10654e4
// > X509_REVOKED_get_ext_by_critical @ 0x1065544
// > ??> @ 0x5b330
//
// 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:16:54 +0000
//
__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;
}
}