//
// i2d_ASN1_bio_stream from 0xe71a78 to 0xe71b40 (200 bytes)
//
// 5 xrefs:
// > i2d_CMS_bio_stream @ 0xe1ed08
// > PEM_write_bio_ASN1_stream @ 0xe71bb4
// > SMIME_write_ASN1 @ 0xe7202c
// > SMIME_write_ASN1 @ 0xe7229c
// > ??> @ 0x2e260
//
// 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 i2d_ASN1_bio_stream(__int64 a1, __int64 a2, __int64 a3, int a4, __int64 a5)
{
__int64 v7; // x0
__int64 v8; // x19
__int64 v9; // x2
_QWORD *v10; // x0
if ( (a4 & 0x1000) != 0 )
{
v7 = BIO_new_NDEF(a1, a2, a5);
v8 = v7;
if ( !v7 )
{
ERR_put_error(13, 211, 65, (__int64)"crypto/asn1/asn_mime.c", 75);
return 0;
}
SMIME_crlf_copy(a3, v7, a4);
BIO_ctrl(v8, 0xBu, 0, 0);
do
{
v9 = BIO_pop(v8);
v10 = (_QWORD *)v8;
v8 = v9;
BIO_free(v10);
}
while ( a1 != v8 );
}
else
{
ASN1_item_i2d_bio(a5, a1, a2);
}
return 1;
}