//
// sub_82FDE4 from 0x82fde4 to 0x82ff00 (284 bytes)
//
// 2 xrefs:
// > sub_82FF1C @ 0x830000
// > sub_82FF1C @ 0x830048
//
// 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_82FDE4(int a1, int a2)
{
int v3; // r0
if ( !a1 )
return 1;
v3 = EVP_MD_type(a1);
if ( a2 == 3 )
{
ERR_put_error(4, 140, 141, (int)"crypto/rsa/rsa_pmeth.c", 335);
return 0;
}
else
{
if ( a2 != 5 )
{
if ( v3 != 114 )
{
if ( v3 <= 114 )
{
if ( v3 != 64 )
{
if ( v3 > 64 )
{
if ( v3 != 95 )
goto LABEL_9;
}
else if ( (unsigned int)(v3 - 3) > 1 )
{
goto LABEL_9;
}
}
}
else if ( v3 != 257 )
{
if ( v3 > 257 )
{
if ( (unsigned int)(v3 - 672) > 3 )
goto LABEL_9;
}
else if ( v3 != 117 )
{
LABEL_9:
ERR_put_error(4, 140, 157, (int)"crypto/rsa/rsa_pmeth.c", 361);
return 0;
}
}
}
return 1;
}
if ( RSA_X931_hash_id(v3) != -1 )
return 1;
ERR_put_error(4, 140, 142, (int)"crypto/rsa/rsa_pmeth.c", 341);
return 0;
}
}