//
// i2d_ASN1_bio_stream from 0x10efa78 to 0x10efb40 (200 bytes)
//
// 5 xrefs:
// > i2d_CMS_bio_stream @ 0x109d008
// > PEM_write_bio_ASN1_stream @ 0x10efbb4
// > SMIME_write_ASN1 @ 0x10f002c
// > SMIME_write_ASN1 @ 0x10f029c
// > ??> @ 0x45640
//
// 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:18:06 +0000
//
__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;
}