//
// sub_A44FD4 from 0xa44fd4 to 0xa450a0 (204 bytes)
//
// 1 xrefs:
// > ??> @ 0xc80114
//
// 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:15 +0000
//
int __fastcall sub_A44FD4(int a1, _DWORD *a2)
{
_DWORD *v2; // r4
_DWORD *v5; // r7
int v6; // r5
_DWORD *v7; // r0
int key; // r4
int **v10; // r0
v2 = *(_DWORD **)(a1 + 20);
if ( !v2[1] )
{
v10 = (int **)BN_new();
v2[1] = v10;
if ( !v10 || !BN_set_word(v10, 65537) )
return 0;
}
v5 = RSA_new();
if ( !v5 )
return 0;
v6 = *(_DWORD *)(a1 + 28);
if ( v6 )
{
v7 = (_DWORD *)BN_GENCB_new();
v6 = (int)v7;
if ( !v7 )
{
RSA_free((int)v5);
return 0;
}
evp_pkey_set_cb_translate(v7, a1);
}
key = RSA_generate_key_ex(v5, *v2, v2[1], v6);
BN_GENCB_free(v6);
if ( key <= 0 )
RSA_free((int)v5);
else
EVP_PKEY_assign(a2, 6, (int)v5);
return key;
}