//
// RSA_padding_add_PKCS1_type_1 from 0xa43ff8 to 0xa44098 (160 bytes)
//
// 2 xrefs:
// > sub_A43568 @ 0xa437bc
// > ??> @ 0x7fedc
//
// 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 RSA_padding_add_PKCS1_type_1(_BYTE *a1, int a2, const void *a3, signed int a4)
{
size_t v5; // r4
_BYTE *v7; // r0
if ( a2 - 10 <= a4 )
{
ERR_put_error(4, 108, 110, (int)"crypto/rsa/rsa_pk1.c", 26);
return 0;
}
else
{
v5 = a2 - 3 - a4;
*a1 = 0;
a1[1] = 1;
v7 = memset(a1 + 2, 255, v5);
v7[v5] = 0;
memcpy(&v7[v5 + 1], a3, a4);
return 1;
}
}