//
// EVP_CIPHER_asn1_to_param from 0x102888c to 0x102894c (192 bytes)
//
// 7 xrefs:
// > sub_1004D54 @ 0x1005454
// > sub_1009820 @ 0x100a01c
// > PKCS7_dataDecode @ 0x104b2b4
// > cms_RecipientInfo_pwri_crypt @ 0x109f0f0
// > PKCS5_v2_PBE_keyivgen @ 0x10e0c6c
// > cms_EncryptedContent_init_bio @ 0x10f9274
// > ??> @ 0xe5528
//
// 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:15 +0000
//
__int64 __fastcall EVP_CIPHER_asn1_to_param(__int64 a1, __int64 a2)
{
__int64 (*v4)(void); // x2
__int64 result; // x0
__int64 v6; // x0
unsigned __int64 v7; // x2
v4 = *(__int64 (**)(void))(*(_QWORD *)a1 + 64LL);
if ( v4 )
return v4();
if ( (*(_QWORD *)(*(_QWORD *)a1 + 16LL) & 0x1000) == 0 )
return 0xFFFFFFFFLL;
v6 = EVP_CIPHER_CTX_cipher(a1);
v7 = EVP_CIPHER_flags(v6) & 0xF0007;
if ( v7 == 65537 )
return 0xFFFFFFFFLL;
if ( v7 <= 0x10001 )
{
if ( v7 - 6 > 1 )
return EVP_CIPHER_get_asn1_iv(a1, a2);
return 0xFFFFFFFFLL;
}
result = 1;
if ( v7 != 65538 )
{
if ( v7 != 65539 )
return EVP_CIPHER_get_asn1_iv(a1, a2);
return 0xFFFFFFFFLL;
}
return result;
}