//
// PKCS12_item_decrypt_d2i from 0x10e3df4 to 0x10e3ed4 (224 bytes)
//
// 3 xrefs:
// > PKCS8_decrypt @ 0x10497b8
// > PKCS12_unpack_p7encdata @ 0x10e39dc
// > ??> @ 0x62b78
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:50 +0000
//
__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;
}
}