//
// X509V3_EXT_i2d from 0xa68cf4 to 0xa68e48 (340 bytes)
//
// 7 xrefs:
// > OCSP_crlID_new @ 0xa3324c
// > OCSP_accept_responses_new @ 0xa332e8
// > OCSP_archive_cutoff_new @ 0xa33344
// > OCSP_url_svcloc_new @ 0xa33498
// > X509V3_add1_i2d @ 0xa6c480
// > X509V3_add1_i2d @ 0xa6c514
// > ??> @ 0x7e67c
//
// 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:37 +0000
//
const char ***__fastcall X509V3_EXT_i2d(unsigned int a1, int a2, size_t *a3)
{
int nid; // r0
int v7; // r4
unsigned __int8 *v8; // r2
void *v9; // r8
_DWORD *v10; // r5
const char ***v11; // r4
void (__fastcall *v13)(size_t *, _DWORD **); // r3
void *v14; // [sp+8h] [bp-Ch] BYREF
_DWORD *v15; // [sp+Ch] [bp-8h] BYREF
nid = X509V3_EXT_get_nid(a1);
v7 = nid;
if ( !nid )
{
ERR_put_error(34, 136, 129, (int)"crypto/x509v3/v3_conf.c", 182);
return nullptr;
}
v8 = *(unsigned __int8 **)(nid + 8);
v14 = nullptr;
if ( v8 )
{
v9 = (void *)ASN1_item_i2d(a3, (int *)&v14, v8);
if ( (int)v9 < 0 )
{
LABEL_10:
v10 = nullptr;
goto LABEL_11;
}
}
else
{
v9 = (void *)(*(int (__fastcall **)(size_t *, _DWORD))(nid + 24))(a3, 0);
v10 = CRYPTO_malloc(v9, (int)"crypto/x509v3/v3_conf.c", 149);
v14 = v10;
if ( !v10 )
goto LABEL_11;
v13 = *(void (__fastcall **)(size_t *, _DWORD **))(v7 + 24);
v15 = v10;
v13(a3, &v15);
}
v10 = (_DWORD *)ASN1_OCTET_STRING_new();
if ( !v10 )
goto LABEL_10;
v10[2] = v14;
v14 = nullptr;
*v10 = v9;
v11 = X509_EXTENSION_create_by_NID(nullptr, a1, a2, v10);
if ( !v11 )
{
LABEL_11:
ERR_put_error(34, 135, 65, (int)"crypto/x509v3/v3_conf.c", 168);
CRYPTO_free(v14, (int)"crypto/x509v3/v3_conf.c", 169);
ASN1_OCTET_STRING_free((int)v10);
return nullptr;
}
ASN1_OCTET_STRING_free((int)v10);
return v11;
}