//
// PKCS8_set0_pbe from 0xad0b3c to 0xad0bfc (192 bytes)
//
// 2 xrefs:
// > PKCS8_encrypt @ 0xad0c80
// > ??> @ 0x84eec
//
// 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:09:23 +0000
//
_DWORD *__fastcall PKCS8_set0_pbe(const char *a1, size_t a2, size_t *a3, int *a4)
{
int *v5; // r6
_DWORD *result; // r0
v5 = PKCS12_item_i2d_encrypt(a4, PKCS8_PRIV_KEY_INFO_it, a1, a2, a3, 1);
if ( v5 )
{
result = CRYPTO_zalloc(byte_8, (int)"crypto/pkcs12/p12_p8e.c", 58);
if ( result )
{
*result = a4;
result[1] = v5;
}
else
{
ERR_put_error(35, 132, 65, (int)"crypto/pkcs12/p12_p8e.c", 61);
ASN1_OCTET_STRING_free((int)v5);
return nullptr;
}
}
else
{
ERR_put_error(35, 132, 103, (int)"crypto/pkcs12/p12_p8e.c", 54);
return nullptr;
}
return result;
}