//
// i2d_ASN1_bio_stream from 0x8c6050 to 0x8c6108 (184 bytes)
//
// 5 xrefs:
// > i2d_CMS_bio_stream @ 0x8743e0
// > PEM_write_bio_ASN1_stream @ 0x8c6164
// > SMIME_write_ASN1 @ 0x8c65fc
// > SMIME_write_ASN1 @ 0x8c682c
// > ??> @ 0x6a2ac
//
// 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
//
int __fastcall i2d_ASN1_bio_stream(int a1, size_t *a2, _DWORD *a3, int a4, unsigned __int8 *a5)
{
int v8; // r0
_DWORD *v9; // r4
int v10; // r3
_DWORD *v11; // r0
if ( (a4 & 0x1000) == 0 )
{
ASN1_item_i2d_bio(a5, a1, a2);
return 1;
}
v8 = BIO_new_NDEF(a1, a2, a5);
v9 = (_DWORD *)v8;
if ( v8 )
{
SMIME_crlf_copy(a3, v8, a4);
BIO_ctrl(v9, 11, 0, 0);
do
{
v10 = BIO_pop(v9);
v11 = v9;
v9 = (_DWORD *)v10;
BIO_free(v11);
}
while ( (_DWORD *)a1 != v9 );
return 1;
}
ERR_put_error(13, 211, 65, (int)"crypto/asn1/asn_mime.c", 75);
return 0;
}