//
// sub_A6E22C from 0xa6e22c to 0xa6e408 (476 bytes)
//
// 1 xrefs:
// > ??> @ 0xd189c4
//
// 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:08:40 +0000
//
int *__fastcall sub_A6E22C(int a1, int a2, _DWORD *a3)
{
int *v4; // r9
signed int v5; // r4
int v6; // r0
_DWORD *v7; // r5
char *v8; // r0
char **v9; // r7
char **v10; // r0
bool v11; // zf
char **v12; // r6
_DWORD *v13; // r3
v4 = OPENSSL_sk_new_null();
if ( v4 )
{
v5 = 0;
while ( 1 )
{
if ( v5 >= OPENSSL_sk_num((int)a3) )
return v4;
v6 = OPENSSL_sk_value(a3, v5++);
v7 = (_DWORD *)v6;
if ( !*(_DWORD *)(v6 + 8) || (v8 = *(char **)(v6 + 4)) == nullptr )
{
ERR_put_error(34, 145, 110, (int)"crypto/x509v3/v3_pmaps.c", 82);
ERR_add_error_data(6, "section:", *v7, ",name:", v7[1], ",value:", v7[2]);
v12 = nullptr;
v9 = nullptr;
goto LABEL_14;
}
v9 = OBJ_txt2obj(v8, 0);
v10 = OBJ_txt2obj((char *)v7[2], 0);
v11 = v9 == nullptr;
if ( v9 )
v11 = v10 == nullptr;
v12 = v10;
if ( v11 )
{
ERR_put_error(34, 145, 110, (int)"crypto/x509v3/v3_pmaps.c", 90);
ERR_add_error_data(6, "section:", *v7, ",name:", v7[1], ",value:", v7[2]);
goto LABEL_14;
}
v13 = POLICY_MAPPING_new();
if ( !v13 )
break;
*v13 = v9;
v13[1] = v12;
OPENSSL_sk_push(v4, (int)v13);
}
ERR_put_error(34, 145, 65, (int)"crypto/x509v3/v3_pmaps.c", 96);
LABEL_14:
ASN1_OBJECT_free(v9);
ASN1_OBJECT_free(v12);
OPENSSL_sk_pop_free((int)v4, (void (__fastcall *)(int))POLICY_MAPPING_free);
return nullptr;
}
else
{
ERR_put_error(34, 145, 65, (int)"crypto/x509v3/v3_pmaps.c", 74);
return nullptr;
}
}