//
// sub_82BA50 from 0x82ba50 to 0x82badc (140 bytes)
//
// 1 xrefs:
// > ??> @ 0xa38d0c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_82BA50(int a1, int a2)
{
int v2; // r4
int v4; // r6
char **v5; // r0
void *v7; // [sp+Ch] [bp-4h] BYREF
v2 = 0;
v7 = nullptr;
v4 = i2d_RSAPublicKey(*(_DWORD *)(a2 + 20), &v7);
if ( v4 > 0 )
{
v5 = OBJ_nid2obj(6u);
if ( !X509_PUBKEY_set0_param(a1, v5, 5, 0, v7, v4) )
{
CRYPTO_free(v7, (int)"crypto/rsa/rsa_ameth.c", 38);
return 0;
}
return 1;
}
return v2;
}