//
// RSA_set0_factors from 0x82dbb0 to 0x82dc30 (128 bytes)
//
// 1 xrefs:
// > ??> @ 0x6636c
//
// 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 RSA_set0_factors(int a1, int a2, int a3)
{
int v3; // r3
bool v4; // zf
int v5; // r12
bool v6; // zf
v3 = *(_DWORD *)(a1 + 28);
v4 = a2 == 0;
if ( !a2 )
v4 = v3 == 0;
v5 = v4;
if ( v4 )
return 0;
v6 = a3 == 0;
if ( !a3 )
v6 = *(_DWORD *)(a1 + 32) == 0;
if ( v6 )
return v5;
if ( a2 )
{
BN_free(v3);
*(_DWORD *)(a1 + 28) = a2;
}
if ( a3 )
{
BN_free(*(_DWORD *)(a1 + 32));
*(_DWORD *)(a1 + 32) = a3;
}
return 1;
}