//
// SMIME_text from 0xadba38 to 0xadbbc4 (396 bytes)
//
// 1 xrefs:
// > ??> @ 0x852ec
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:09:31 +0000
//
bool __fastcall SMIME_text(_DWORD *a1, int a2)
{
int *v4; // r0
int *v5; // r8
signed int v6; // r1
int v7; // r0
int v8; // r9
const char *v9; // r0
int v10; // r2
_DWORD v12[1025]; // [sp+8h] [bp-1004h] BYREF
v4 = sub_AD9EEC(a1);
v5 = v4;
if ( v4 )
{
v12[0] = "content-type";
v12[1] = 0;
v12[2] = 0;
v6 = OPENSSL_sk_find((int)v4, (int)v12);
if ( v6 >= 0 && (v7 = OPENSSL_sk_value(v5, v6), (v8 = v7) != 0) && (v9 = *(const char **)(v7 + 4)) != nullptr )
{
if ( !strcmp(v9, "text/plain") )
{
OPENSSL_sk_pop_free((int)v5, sub_AD992C);
while ( 1 )
{
v10 = BIO_read((int)a1, (int)v12, 4096);
if ( v10 <= 0 )
break;
BIO_write(a2, (int)v12, v10);
}
return !v10;
}
else
{
ERR_put_error(13, 213, 205, (int)"crypto/asn1/asn_mime.c", 542);
ERR_add_error_data(2, "type: ", *(_DWORD *)(v8 + 4));
OPENSSL_sk_pop_free((int)v5, sub_AD992C);
return 0;
}
}
else
{
ERR_put_error(13, 213, 206, (int)"crypto/asn1/asn_mime.c", 537);
OPENSSL_sk_pop_free((int)v5, sub_AD992C);
return 0;
}
}
else
{
ERR_put_error(13, 213, 207, (int)"crypto/asn1/asn_mime.c", 532);
return 0;
}
}