//
// EVP_PKEY_asn1_find from 0x9d6cbc to 0x9d6da4 (232 bytes)
//
// 6 xrefs:
// > EVP_PKEY_set_type @ 0xa19dc0
// > EVP_PKEY_set_type @ 0xa19e00
// > EVP_PKEY_set_type_str @ 0xa1a058
// > EVP_PKEY_type @ 0xa1a3bc
// > X509_signature_print @ 0xa51fd4
// > ??> @ 0x7803c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:14 +0000
//
int __fastcall EVP_PKEY_asn1_find(int *a1, int a2)
{
int *v4; // r0
int v5; // r4
int v6; // r1
int pkey_asn1_meth_engine; // r0
_DWORD *v9; // [sp+Ch] [bp-78h] BYREF
_DWORD v10[29]; // [sp+10h] [bp-74h] BYREF
while ( 1 )
{
v9 = v10;
v10[0] = a2;
if ( !dword_D34068 )
break;
v6 = OPENSSL_sk_find(dword_D34068, v10);
if ( v6 < 0 )
break;
v5 = OPENSSL_sk_value(dword_D34068, v6);
if ( !v5 )
goto LABEL_9;
LABEL_4:
if ( (*(_DWORD *)(v5 + 8) & 1) == 0 )
goto LABEL_9;
a2 = *(_DWORD *)(v5 + 4);
}
v4 = (int *)OBJ_bsearch_(&v9, &off_D25C00, 13, 4, sub_9D6C34);
if ( v4 )
{
v5 = *v4;
if ( *v4 )
goto LABEL_4;
}
v5 = 0;
LABEL_9:
if ( a1 && (pkey_asn1_meth_engine = ENGINE_get_pkey_asn1_meth_engine(a2), (*a1 = pkey_asn1_meth_engine) != 0) )
return ENGINE_get_pkey_asn1_meth(pkey_asn1_meth_engine, a2);
else
return v5;
}