//
// sub_10F069C from 0x10f069c to 0x10f0740 (164 bytes)
//
// 2 xrefs:
// > BIO_new_NDEF @ 0x10f083c
// > BIO_new_NDEF @ 0x10f0844
//
// 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:18:07 +0000
//
__int64 __fastcall sub_10F069C(__int64 a1, _QWORD *a2, _DWORD *a3, __int64 **a4)
{
__int64 *v4; // x19
int v7; // w0
void *v8; // x0
__int64 v9; // x1
void *v11; // [xsp+38h] [xbp+38h] BYREF
if ( !a4 )
return 0;
v4 = *a4;
v7 = ASN1_item_ndef_i2d(**a4, nullptr, (*a4)[1]);
v8 = CRYPTO_malloc((void *)v7, (__int64)"crypto/asn1/bio_ndef.c", 116);
v11 = v8;
if ( !v8 )
return 0;
v4[5] = (__int64)v8;
*a2 = v8;
ASN1_item_ndef_i2d(*v4, (__int64 *)&v11, v4[1]);
v9 = *(_QWORD *)v4[4];
if ( !v9 )
return 0;
*a3 = v9 - *a2;
return 1;
}