//
// ASN1_item_ndef_i2d from 0x9dcb1c to 0x9dcbcc (176 bytes)
//
// 6 xrefs:
// > i2d_PKCS7_NDEF @ 0xa3b250
// > ??> @ 0xadbc9c
// > ??> @ 0xadbccc
// > ??> @ 0xadbd48
// > ??> @ 0xadbd78
// > ??> @ 0x7856c
//
// 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:07:17 +0000
//
int __fastcall ASN1_item_ndef_i2d(size_t *a1, int *a2, unsigned __int8 *a3)
{
int result; // r0
int v6; // r5
int v7; // r9
size_t *v8; // [sp+8h] [bp-Ch] BYREF
int v9; // [sp+Ch] [bp-8h] BYREF
v8 = a1;
if ( !a2 || *a2 )
return ASN1_item_ex_i2d(&v8, a2, a3, -1, 2048);
result = ASN1_item_ex_i2d(&v8, nullptr, a3, -1, 2048);
v6 = result;
if ( result > 0 )
{
v7 = CRYPTO_malloc(result, "crypto/asn1/tasn_enc.c", 63);
if ( v7 )
{
v9 = v7;
ASN1_item_ex_i2d(&v8, &v9, a3, -1, 2048);
*a2 = v7;
return v6;
}
else
{
return -1;
}
}
return result;
}