//
// RSA_verify_ASN1_OCTET_STRING from 0xdd82cc to 0xdd845c (400 bytes)
//
// 1 xrefs:
// > ??> @ 0x4cab8
//
// 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
//
__int64 __fastcall RSA_verify_ASN1_OCTET_STRING(__int64 a1, const void *a2, int a3, __int64 a4, int a5, __int64 a6)
{
unsigned int v10; // w0
unsigned int v11; // w19
unsigned __int64 v13; // x25
char *v14; // x0
char *v15; // x21
int v16; // w0
const void **v17; // x0
__int64 v18; // x20
unsigned int v19; // w19
char *v21; // [xsp+78h] [xbp+78h] BYREF
v10 = RSA_size(a6);
v11 = v10;
if ( v10 == a5 )
{
v13 = v10;
v14 = (char *)CRYPTO_malloc((void *)v10, (__int64)"crypto/rsa/rsa_saos.c", 70);
v15 = v14;
if ( v14 )
{
v16 = RSA_public_decrypt(v11, a4, (__int64)v14, a6);
if ( v16 > 0
&& (v21 = v15, v17 = (const void **)d2i_ASN1_OCTET_STRING(nullptr, &v21, v16), (v18 = (__int64)v17) != 0) )
{
if ( *(_DWORD *)v17 != a3 || (v19 = 1, memcmp(a2, v17[1], *(unsigned int *)v17)) )
{
v19 = 0;
ERR_put_error(4, 120, 104, (__int64)"crypto/rsa/rsa_saos.c", 87);
}
}
else
{
v18 = 0;
v19 = 0;
}
}
else
{
v18 = 0;
v19 = 0;
ERR_put_error(4, 120, 65, (__int64)"crypto/rsa/rsa_saos.c", 72);
}
ASN1_OCTET_STRING_free(v18);
CRYPTO_clear_free(v15, v13, (__int64)"crypto/rsa/rsa_saos.c", 0x5Cu);
return v19;
}
else
{
ERR_put_error(4, 120, 119, (__int64)"crypto/rsa/rsa_saos.c", 66);
return 0;
}
}