//
// X509V3_EXT_d2i from 0xa6c284 to 0xa6c2fc (120 bytes)
//
// 4 xrefs:
// > sub_A65F2C @ 0xa66020
// > X509V3_get_d2i @ 0xa6c3e0
// > sub_AD8B7C @ 0xad8db8
// > ??> @ 0x823bc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:39 +0000
//
int __fastcall X509V3_EXT_d2i(int a1)
{
char *v2; // r4
int data; // r5
int v4; // r0
int v5; // r3
unsigned __int8 *v7[2]; // [sp+4h] [bp-8h] BYREF
v2 = X509V3_EXT_get(a1);
if ( !v2 )
return 0;
data = X509_EXTENSION_get_data(a1);
v7[0] = (unsigned __int8 *)ASN1_STRING_get0_data(data);
v4 = ASN1_STRING_length(data);
v5 = *((_DWORD *)v2 + 2);
if ( v5 )
return ASN1_item_d2i(nullptr, v7, v4, v5);
else
return (*((int (__fastcall **)(_DWORD, unsigned __int8 **, int))v2 + 5))(0, v7, v4);
}