//
// sub_A454E4 from 0xa454e4 to 0xa45698 (436 bytes)
//
// 1 xrefs:
// > ??> @ 0xc80124
//
// 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:08:15 +0000
//
int __fastcall sub_A454E4(int a1, int a2, int a3, const void *a4, size_t a5)
{
_DWORD *v5; // r4
int v9; // r5
int v10; // r12
int v11; // r2
int v13; // r0
int v14; // r2
int v15; // r0
void *v16; // r0
void *v17; // r0
void *v18; // r0
void *v19; // r0
signed int v20; // [sp+Ch] [bp-8h] BYREF
v5 = *(_DWORD **)(a1 + 20);
v9 = *(_DWORD *)(*(_DWORD *)(a1 + 8) + 20);
if ( !v5[5] )
{
v14 = v5[8];
if ( !v14 )
{
v18 = (void *)EVP_PKEY_size(*(_DWORD *)(a1 + 8));
v19 = CRYPTO_malloc(v18, (int)"crypto/rsa/rsa_pmeth.c", 91);
v5[8] = v19;
if ( !v19 )
return -1;
v14 = (int)v19;
}
v13 = RSA_public_decrypt(a3, a2, v14, v9);
v20 = v13;
if ( !v13 )
return 0;
LABEL_14:
if ( a5 == v13 )
return memcmp(a4, (const void *)v5[8], a5) == 0;
return 0;
}
v10 = v5[4];
if ( v10 == 1 )
{
v15 = EVP_MD_type(v5[5]);
return RSA_verify(v15, a4, a5, a2, a3, v9);
}
if ( v10 == 5 )
{
if ( sub_A45308(a1, nullptr, &v20, a2, a3) <= 0 )
return 0;
v13 = v20;
goto LABEL_14;
}
if ( v10 != 6 )
return -1;
v11 = v5[8];
if ( v11 )
goto LABEL_6;
v16 = (void *)EVP_PKEY_size(*(_DWORD *)(a1 + 8));
v17 = CRYPTO_malloc(v16, (int)"crypto/rsa/rsa_pmeth.c", 91);
v5[8] = v17;
if ( !v17 )
return -1;
v11 = (int)v17;
LABEL_6:
if ( RSA_public_decrypt(a3, a2, v11, v9) <= 0 )
return 0;
return RSA_verify_PKCS1_PSS_mgf1(v9, a4, v5[5], v5[6], v5[8], v5[7]) > 0;
}