//
// sub_E0E27C from 0xe0e27c to 0xe0e44c (464 bytes)
//
// 2 xrefs:
// > ASN1_add_oid_module @ 0xe0e450
// > ASN1_add_oid_module @ 0xe0e45c
//
// 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
//
__int64 __fastcall sub_E0E27C(__int64 a1, __int64 a2)
{
__int64 value; // x0
int v4; // w22
unsigned int *section; // x0
unsigned int *v6; // x23
__int64 v7; // x0
char *v8; // x21
__int64 v9; // x24
char *v10; // x0
char *v11; // x19
char *i; // x20
unsigned int v13; // w25
char *v14; // x19
int v15; // w0
char v16; // w20
bool v17; // zf
size_t v18; // x19
char *v19; // x0
char *v20; // x26
value = CONF_imodule_get_value(a1);
v4 = 0;
section = (unsigned int *)NCONF_get_section(a2, value);
v6 = section;
if ( section )
{
if ( (int)OPENSSL_sk_num(section) <= 0 )
return 1;
while ( 1 )
{
v7 = OPENSSL_sk_value((__int64)v6, v4);
v8 = *(char **)(v7 + 16);
v9 = *(_QWORD *)(v7 + 8);
v10 = strrchr(v8, 44);
v11 = v10;
if ( v10 )
{
if ( !v10[1] )
goto LABEL_20;
for ( i = v10 + 1; isspace((unsigned __int8)*i); ++i )
;
v13 = OBJ_create(i, v9, 0);
if ( !v13 )
goto LABEL_20;
while ( isspace((unsigned __int8)*v8) )
++v8;
v14 = v11 - 1;
while ( 1 )
{
v15 = isspace((unsigned __int8)*v14);
v16 = v15;
v17 = v14 == v8;
if ( !v15 )
break;
--v14;
if ( v17 )
goto LABEL_20;
}
v18 = v14 + 1 - v8;
v19 = (char *)CRYPTO_malloc((void *)(v18 + 1), (__int64)"crypto/asn1/asn_moid.c", 95);
v20 = v19;
if ( !v19 )
{
LABEL_20:
ERR_put_error(13, 174, 171, (__int64)"crypto/asn1/asn_moid.c", 38);
return 0;
}
memcpy(v19, v8, v18);
v20[v18] = v16;
OBJ_nid2obj(v13)[1] = v20;
}
else if ( !(unsigned int)OBJ_create(v8, v9, v9) )
{
goto LABEL_20;
}
if ( ++v4 >= (int)OPENSSL_sk_num(v6) )
return 1;
}
}
ERR_put_error(13, 174, 172, (__int64)"crypto/asn1/asn_moid.c", 32);
return 0;
}