//
// EVP_CIPHER_get_asn1_iv from 0xdaa480 to 0xdaa52c (172 bytes)
//
// 21 xrefs:
// > EVP_CIPHER_asn1_to_param @ 0xdaa5cc
// > ??> @ 0x5f898
// > ??> @ 0x12225b8
// > ??> @ 0x1222610
// > ??> @ 0x1222668
// > ??> @ 0x12226c0
// > ??> @ 0x1222718
// > ??> @ 0x1222770
// > ??> @ 0x12227c8
// > ??> @ 0x1222820
// > ??> @ 0x1222878
// > ??> @ 0x12228d0
// > ??> @ 0x12272f8
// > ??> @ 0x1227350
// > ??> @ 0x12273a8
// > ??> @ 0x1227400
// > ??> @ 0x1227458
// > ??> @ 0x12274b0
// > ??> @ 0x1227508
// > ??> @ 0x1227560
// > ??> @ 0x12275b8
//
// 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 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;
}