//
// sub_A9FC48 from 0xa9fc48 to 0xa9fd00 (184 bytes)
//
// 1 xrefs:
// > ??> @ 0xc8157c
//
// 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:09:11 +0000
//
int __fastcall sub_A9FC48(int a1, int a2)
{
int *v4; // r7
_DWORD *v5; // r6
int *v6; // r1
v4 = *(int **)(a1 + 20);
if ( !*(_DWORD *)(a1 + 8) && !*v4 )
{
ERR_put_error(16, 199, 139, (int)"crypto/ec/ec_pmeth.c", 410);
return 0;
}
v5 = (_DWORD *)EC_KEY_new();
if ( v5 )
{
EVP_PKEY_assign((_DWORD *)a2, 408, (int)v5);
v6 = *(int **)(a1 + 8);
if ( !v6 )
{
if ( !EC_KEY_set_group(v5, *v4) )
return 0;
return EC_KEY_generate_key(*(_DWORD **)(a2 + 20));
}
if ( EVP_PKEY_copy_parameters((_DWORD *)a2, v6) )
return EC_KEY_generate_key(*(_DWORD **)(a2 + 20));
}
return 0;
}