//
// RSA_padding_check_SSLv23 from 0xa46e98 to 0xa47058 (448 bytes)
//
// 2 xrefs:
// > sub_A43A80 @ 0xa43db4
// > ??> @ 0x7ff4c
//
// 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:16 +0000
//
int __fastcall RSA_padding_check_SSLv23(void *a1, int a2, _BYTE *a3, int a4, int a5)
{
char *v5; // r12
char *v6; // r4
int v7; // lr
int v8; // r3
bool v10; // cc
int v12; // r5
if ( a4 <= 9 )
{
ERR_put_error(4, 114, 111, (int)"crypto/rsa/rsa_ssl.c", 63);
return -1;
}
else if ( a4 + 1 == a5 && (v5 = a3 + 1, *a3 == 2) )
{
v6 = &a3[a4];
v7 = 0;
v8 = a4 - 1;
while ( *v5++ )
{
++v7;
if ( v5 == v6 )
goto LABEL_8;
}
v6 = v5;
LABEL_8:
v10 = v7 <= v8;
if ( v7 != v8 )
v10 = v7 <= 7;
if ( v10 )
{
ERR_put_error(4, 114, 113, (int)"crypto/rsa/rsa_ssl.c", 79);
return -1;
}
else if ( *(v6 - 9) == 3
&& *(v6 - 8) == 3
&& *(v6 - 7) == 3
&& *(v6 - 6) == 3
&& *(v6 - 5) == 3
&& *(v6 - 4) == 3
&& *(v6 - 3) == 3
&& *(v6 - 2) == 3 )
{
ERR_put_error(4, 114, 115, (int)"crypto/rsa/rsa_ssl.c", 87);
return -1;
}
else
{
v12 = v8 - (v7 + 1);
if ( v12 > a2 )
{
ERR_put_error(4, 114, 109, (int)"crypto/rsa/rsa_ssl.c", 94);
return -1;
}
else
{
memcpy(a1, v6, v8 - (v7 + 1));
return v12;
}
}
}
else
{
ERR_put_error(4, 114, 107, (int)"crypto/rsa/rsa_ssl.c", 67);
return -1;
}
}