//
// sub_A40F50 from 0xa40f50 to 0xa41028 (216 bytes)
//
// 1 xrefs:
// > ??> @ 0xc7ffe0
//
// 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:13 +0000
//
int __fastcall sub_A40F50(int a1, int a2, int a3, _DWORD **a4, _DWORD **a5)
{
int v6; // r4
int v8; // r0
int v9; // r6
int v10; // r4
char **v11; // r0
char **v12; // r0
int v13; // [sp+Ch] [bp-4h]
v6 = EVP_MD_CTX_pkey_ctx(a1);
if ( EVP_PKEY_CTX_ctrl(v6, 6, -1) <= 0 )
return 0;
if ( v13 != 6 )
return 2;
v8 = sub_A40D84(v6);
v9 = v8;
if ( !v8 )
return 0;
if ( !a5 )
goto LABEL_10;
v10 = ASN1_STRING_dup(v8);
if ( v10 )
{
v11 = OBJ_nid2obj(0x390u);
X509_ALGOR_set0(a5, v11, 16, v10);
LABEL_10:
v12 = OBJ_nid2obj(0x390u);
X509_ALGOR_set0(a4, v12, 16, v9);
return 3;
}
ASN1_STRING_free(v9);
return 0;
}