//
// X509V3_EXT_d2i from 0xdfe1bc to 0xdfe238 (124 bytes)
//
// 4 xrefs:
// > sub_DF885C @ 0xdf8974
// > X509V3_get_d2i @ 0xdfe334
// > sub_E6F8EC @ 0xe6fb6c
// > ??> @ 0x806d0
//
// 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 X509V3_EXT_d2i(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x19
unsigned int *data; // x20
__int64 v5; // x2
__int64 v6; // x3
char *v7; // [xsp+28h] [xbp+28h] BYREF
result = X509V3_EXT_get(a1);
v3 = result;
if ( result )
{
data = (unsigned int *)X509_EXTENSION_get_data(a1);
v7 = (char *)ASN1_STRING_get0_data((__int64)data);
v5 = (int)ASN1_STRING_length(data);
v6 = *(_QWORD *)(v3 + 8);
if ( v6 )
return ASN1_item_d2i(nullptr, &v7, v5, v6);
else
return (*(__int64 (__fastcall **)(_QWORD, char **, __int64))(v3 + 32))(0, &v7, v5);
}
return result;
}