//
// sub_E70710 from 0xe70710 to 0xe70850 (320 bytes)
//
// 2 xrefs:
// > sub_E70BD8 @ 0xe70e54
// > sub_E70BD8 @ 0xe71158
//
// 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
//
const char *__fastcall sub_E70710(const char *a1, char *a2)
{
char *v2; // x22
const char *result; // x0
int v5; // w19
char *v6; // x20
int v7; // t1
const char *v8; // x0
int v9; // w19
char *v10; // x20
int v11; // t1
_QWORD *v12; // x0
_QWORD *v13; // x19
_QWORD *v14; // x1
v2 = (char *)a1;
if ( a1 )
{
result = CRYPTO_strdup(a1, (__int64)"crypto/asn1/asn_mime.c", 797);
v2 = (char *)result;
if ( !result )
return result;
v5 = *(unsigned __int8 *)result;
if ( *result )
{
v6 = (char *)result;
do
{
if ( isupper(v5) )
*v6 = tolower(v5);
v7 = (unsigned __int8)*++v6;
v5 = v7;
}
while ( v7 );
}
}
if ( a2 )
{
v8 = CRYPTO_strdup(a2, (__int64)"crypto/asn1/asn_mime.c", 808);
a2 = (char *)v8;
if ( !v8 )
{
v13 = nullptr;
LABEL_19:
CRYPTO_free(v2, (__int64)"crypto/asn1/asn_mime.c", 828);
CRYPTO_free(a2, (__int64)"crypto/asn1/asn_mime.c", 829);
CRYPTO_free(v13, (__int64)"crypto/asn1/asn_mime.c", 830);
return nullptr;
}
v9 = *(unsigned __int8 *)v8;
if ( *v8 )
{
v10 = (char *)v8;
do
{
if ( isupper(v9) )
*v10 = tolower(v9);
v11 = (unsigned __int8)*++v10;
v9 = v11;
}
while ( v11 );
}
}
v12 = CRYPTO_malloc(&off_18, (__int64)"crypto/asn1/asn_mime.c", 818);
v13 = v12;
if ( !v12 )
goto LABEL_19;
*v12 = v2;
v12[1] = a2;
v14 = OPENSSL_sk_new((__int64)sub_E7065C);
v13[2] = v14;
result = (const char *)v13;
if ( !v14 )
goto LABEL_19;
return result;
}