//
// SMIME_text from 0xe723b4 to 0xe7253c (392 bytes)
//
// 1 xrefs:
// > ??> @ 0xb85f0
//
// 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
//
bool __fastcall SMIME_text(__int64 a1, __int64 a2)
{
int *v4; // x0
int *v5; // x22
int v6; // w1
__int64 v7; // x0
__int64 v8; // x23
const char *v9; // x0
signed int v10; // w0
_QWORD v12[512]; // [xsp+40h] [xbp+40h] BYREF
v4 = sub_E70BD8(a1);
v5 = v4;
if ( !v4 )
{
ERR_put_error(13, 213, 207, (__int64)"crypto/asn1/asn_mime.c", 532);
return 0;
}
v12[1] = 0;
v12[0] = "content-type";
v12[2] = 0;
v6 = OPENSSL_sk_find((__int64)v4, (__int64)v12);
if ( v6 < 0 || (v7 = OPENSSL_sk_value((__int64)v5, v6), (v8 = v7) == 0) || (v9 = *(const char **)(v7 + 8)) == nullptr )
{
ERR_put_error(13, 213, 206, (__int64)"crypto/asn1/asn_mime.c", 537);
goto LABEL_14;
}
if ( strcmp(v9, "text/plain") )
{
ERR_put_error(13, 213, 205, (__int64)"crypto/asn1/asn_mime.c", 542);
ERR_add_error_data(2, "type: ", *(_QWORD *)(v8 + 8));
LABEL_14:
OPENSSL_sk_pop_free(v5, sub_E70690);
return 0;
}
OPENSSL_sk_pop_free(v5, sub_E70690);
while ( 1 )
{
v10 = BIO_read(a1, (__int64)v12, 0x1000u);
if ( v10 <= 0 )
break;
BIO_write(a2, (__int64)v12, v10);
}
return !v10;
}