//
// RSA_verify_ASN1_OCTET_STRING from 0x83190c to 0x831a60 (340 bytes)
//
// 1 xrefs:
// > ??> @ 0x665ac
//
// 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_verify_ASN1_OCTET_STRING(int a1, const void *a2, int a3, int a4, void *a5, int a6)
{
void *v9; // r0
unsigned int v10; // r5
unsigned __int8 *v12; // r0
unsigned __int8 *v13; // r6
int v14; // r4
int v15; // r2
int v16; // r0
int v17; // r7
unsigned __int8 *v18; // [sp+Ch] [bp-8h] BYREF
v9 = (void *)RSA_size(a6);
v10 = (unsigned int)v9;
if ( v9 == a5 )
{
v12 = (unsigned __int8 *)CRYPTO_malloc(v9, (int)"crypto/rsa/rsa_saos.c", 70);
v13 = v12;
if ( v12 )
{
v14 = 1;
v15 = RSA_public_decrypt(v10, a4, (int)v12, a6);
if ( v15 > 0 && (v18 = v13, v16 = d2i_ASN1_OCTET_STRING(nullptr, &v18, v15), (v17 = v16) != 0) )
{
if ( *(_DWORD *)v16 != a3 || memcmp(a2, *(const void **)(v16 + 8), *(_DWORD *)v16) )
{
ERR_put_error(4, 120, 104, (int)"crypto/rsa/rsa_saos.c", 87);
v14 = 0;
}
}
else
{
v17 = 0;
v14 = 0;
}
}
else
{
ERR_put_error(4, 120, 65, (int)"crypto/rsa/rsa_saos.c", 72);
v17 = 0;
v14 = 0;
}
ASN1_OCTET_STRING_free(v17);
CRYPTO_clear_free(v13, v10, (int)"crypto/rsa/rsa_saos.c", 92);
return v14;
}
else
{
ERR_put_error(4, 120, 119, (int)"crypto/rsa/rsa_saos.c", 66);
return 0;
}
}