//
// EVP_CIPHER_get_asn1_iv from 0x10287e0 to 0x102888c (172 bytes)
//
// 21 xrefs:
// > EVP_CIPHER_asn1_to_param @ 0x102892c
// > ??> @ 0x826c0
// > ??> @ 0x153a340
// > ??> @ 0x153a398
// > ??> @ 0x153a3f0
// > ??> @ 0x153a448
// > ??> @ 0x153a4a0
// > ??> @ 0x153a4f8
// > ??> @ 0x153a550
// > ??> @ 0x153a5a8
// > ??> @ 0x153a600
// > ??> @ 0x153a658
// > ??> @ 0x153f080
// > ??> @ 0x153f0d8
// > ??> @ 0x153f130
// > ??> @ 0x153f188
// > ??> @ 0x153f1e0
// > ??> @ 0x153f238
// > ??> @ 0x153f290
// > ??> @ 0x153f2e8
// > ??> @ 0x153f340
//
// 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_get_asn1_iv(__int64 a1, __int64 a2)
{
unsigned int v3; // w19
if ( !a2 )
return 0;
v3 = EVP_CIPHER_CTX_iv_length(a1);
if ( v3 > 0x10 )
OPENSSL_die("assertion failed: l <= sizeof(c->iv)", "crypto/evp/evp_lib.c", 82);
if ( v3 == (unsigned int)ASN1_TYPE_get_octetstring(a2, a1 + 24, v3) )
{
if ( v3 )
memcpy((void *)(a1 + 40), (const void *)(a1 + 24), v3);
}
else
{
return (unsigned int)-1;
}
return v3;
}