//
// RSA_padding_add_PKCS1_type_1 from 0xdd582c to 0xdd58d4 (168 bytes)
//
// 2 xrefs:
// > sub_DD4EB0 @ 0xdd5110
// > ??> @ 0xb0358
//
// 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_padding_add_PKCS1_type_1(_BYTE *a1, int a2, const void *a3, unsigned int a4)
{
unsigned int v5; // w19
_BYTE *v6; // x0
if ( a2 - 10 <= (int)a4 )
{
ERR_put_error(4, 108, 110, (__int64)"crypto/rsa/rsa_pk1.c", 26);
return 0;
}
else
{
*a1 = 0;
v5 = a2 - 3 - a4;
a1[1] = 1;
v6 = memset(a1 + 2, 255, (int)v5);
v6[v5] = 0;
memcpy(&v6[v5 + 1], a3, a4);
return 1;
}
}