//
// X509V3_EXT_d2i from 0x107c4fc to 0x107c578 (124 bytes)
//
// 4 xrefs:
// > sub_1076B9C @ 0x1076cb4
// > X509V3_get_d2i @ 0x107c674
// > sub_10ED8EC @ 0x10edb6c
// > ??> @ 0xaaff8
//
// 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:07 +0000
//
__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;
}