//
// BN_GENCB_call from 0xadf880 to 0xadf8f4 (116 bytes)
//
// 22 xrefs:
// > dsa_builtin_paramgen @ 0xa95040
// > dsa_builtin_paramgen @ 0xa952e8
// > dsa_builtin_paramgen @ 0xa95300
// > dsa_builtin_paramgen @ 0xa95514
// > dsa_builtin_paramgen @ 0xa95590
// > dsa_builtin_paramgen @ 0xa95678
// > dsa_builtin_paramgen2 @ 0xa95d28
// > dsa_builtin_paramgen2 @ 0xa95e0c
// > dsa_builtin_paramgen2 @ 0xa95e24
// > dsa_builtin_paramgen2 @ 0xa96060
// > dsa_builtin_paramgen2 @ 0xa96134
// > dsa_builtin_paramgen2 @ 0xa96298
// > RSA_generate_key_ex @ 0xad4a98
// > RSA_generate_key_ex @ 0xad4b40
// > RSA_generate_key_ex @ 0xad4c14
// > RSA_generate_key_ex @ 0xad4cd0
// > BN_is_prime_fasttest_ex @ 0xadf998
// > BN_is_prime_fasttest_ex @ 0xadfc30
// > BN_generate_prime_ex @ 0xae0374
// > BN_generate_prime_ex @ 0xae0438
// > DH_generate_parameters_ex @ 0xae5990
// > ??> @ 0x8426c
//
// 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:33 +0000
//
int __fastcall BN_GENCB_call(_DWORD *a1, int a2, int a3)
{
void (__fastcall *v4)(int, int, _DWORD); // r12
if ( !a1 )
return 1;
if ( *a1 == 1 )
{
v4 = (void (__fastcall *)(int, int, _DWORD))a1[2];
if ( v4 )
{
v4(a2, a3, a1[1]);
return 1;
}
else
{
return *a1;
}
}
else if ( *a1 == 2 )
{
return ((int (__fastcall *)(int, int, _DWORD *))a1[2])(a2, a3, a1);
}
else
{
return 0;
}
}