//
// PKCS12_item_decrypt_d2i from 0xe65df4 to 0xe65ed4 (224 bytes)
//
// 3 xrefs:
// > PKCS8_decrypt @ 0xdcb458
// > PKCS12_unpack_p7encdata @ 0xe659dc
// > ??> @ 0x45768
//
// 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 PKCS12_item_decrypt_d2i(
__int64 *a1,
__int64 a2,
const char *a3,
unsigned int a4,
__int64 a5,
int a6)
{
__int64 v8; // x19
int v10; // [xsp+3Ch] [xbp+3Ch] BYREF
char *v11; // [xsp+40h] [xbp+40h] BYREF
char *v12; // [xsp+48h] [xbp+48h] BYREF
if ( PKCS12_pbe_crypt(a1, a3, a4, *(char **)(a5 + 8), *(_DWORD *)a5, &v11, &v10, 0) )
{
v12 = v11;
v8 = ASN1_item_d2i(nullptr, &v12, v10, a2);
if ( a6 )
OPENSSL_cleanse(v11, v10);
if ( !v8 )
ERR_put_error(35, 106, 101, (__int64)"crypto/pkcs12/p12_decr.c", 114);
CRYPTO_free(v11, (__int64)"crypto/pkcs12/p12_decr.c", 115);
return v8;
}
else
{
ERR_put_error(35, 106, 117, (__int64)"crypto/pkcs12/p12_decr.c", 94);
return 0;
}
}