//
// policy_data_new from 0x84b920 to 0x84ba0c (236 bytes)
//
// 7 xrefs:
// > policy_cache_set @ 0x84b740
// > policy_cache_set_mapping @ 0x84bad8
// > X509_policy_check @ 0x84bfd8
// > X509_policy_check @ 0x84c2b4
// > X509_policy_check @ 0x84c47c
// > X509_policy_check @ 0x84c68c
// > ??> @ 0x6855c
//
// 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
//
_DWORD *__fastcall policy_data_new(_DWORD *a1, const char **a2, int a3)
{
bool v3; // zf
const char **v6; // r4
_DWORD *v7; // r6
_DWORD *v8; // r7
v3 = a1 == nullptr;
if ( !a1 )
v3 = a2 == nullptr;
if ( v3 )
return nullptr;
if ( a2 )
{
v6 = OBJ_dup(a2);
if ( !v6 )
return nullptr;
}
else
{
v6 = nullptr;
}
v7 = CRYPTO_zalloc(&word_10, (int)"crypto/x509v3/pcy_data.c", 51);
if ( !v7 )
return nullptr;
v8 = OPENSSL_sk_new_null();
v7[3] = v8;
if ( v8 )
{
if ( a3 )
*v7 = 16;
if ( !v6 )
{
v7[1] = *a1;
*a1 = 0;
goto LABEL_12;
}
v7[1] = v6;
if ( a1 )
{
LABEL_12:
v7[2] = a1[1];
a1[1] = 0;
return v7;
}
return v7;
}
else
{
CRYPTO_free(v7, (int)"crypto/x509v3/pcy_data.c", 56);
ASN1_OBJECT_free(v6);
return nullptr;
}
}