//
// sub_10EE850 from 0x10ee850 to 0x10ee980 (304 bytes)
//
// 6 xrefs:
// > sub_10EEBD8 @ 0x10eefe8
// > sub_10EEBD8 @ 0x10ef00c
// > sub_10EEBD8 @ 0x10ef0a4
// > sub_10EEBD8 @ 0x10ef260
// > sub_10EEBD8 @ 0x10ef280
// > sub_10EEBD8 @ 0x10ef2b8
//
// 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 sub_10EE850(int **a1, const char *a2, const char *a3)
{
const char *v5; // x0
char *v6; // x21
int v7; // w19
char *v8; // x20
int v9; // t1
char *v10; // x19
_QWORD *v11; // x0
void *v12; // x20
int v13; // w0
unsigned int v14; // w1
if ( !a2 )
{
v6 = nullptr;
if ( a3 )
goto LABEL_9;
LABEL_15:
v10 = (char *)a3;
goto LABEL_10;
}
v5 = CRYPTO_strdup(a2, (__int64)"crypto/asn1/asn_mime.c", 840);
v6 = (char *)v5;
if ( !v5 )
{
v12 = nullptr;
v10 = nullptr;
goto LABEL_12;
}
v7 = *(unsigned __int8 *)v5;
if ( *v5 )
{
v8 = (char *)v5;
do
{
if ( isupper(v7) )
*v8 = tolower(v7);
v9 = (unsigned __int8)*++v8;
v7 = v9;
}
while ( v9 );
}
if ( !a3 )
goto LABEL_15;
LABEL_9:
v10 = (char *)CRYPTO_strdup(a3, (__int64)"crypto/asn1/asn_mime.c", 852);
if ( !v10 )
{
v12 = nullptr;
LABEL_12:
CRYPTO_free(v6, (__int64)"crypto/asn1/asn_mime.c", 866);
CRYPTO_free(v10, (__int64)"crypto/asn1/asn_mime.c", 867);
CRYPTO_free(v12, (__int64)"crypto/asn1/asn_mime.c", 868);
return 0;
}
LABEL_10:
v11 = CRYPTO_malloc(&word_10, (__int64)"crypto/asn1/asn_mime.c", 857);
v12 = v11;
if ( !v11 )
goto LABEL_12;
*v11 = v6;
v11[1] = v10;
v13 = OPENSSL_sk_push(*a1, (__int64)v11);
v14 = 1;
if ( !v13 )
goto LABEL_12;
return v14;
}