//
// asn1_enc_init from 0xd703e0 to 0xd7041c (60 bytes)
//
// 3 xrefs:
// > sub_D6F800 @ 0xd6f97c
// > ASN1_item_ex_new @ 0xd6fdc8
// > ??> @ 0x85a70
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_QWORD *__fastcall asn1_enc_init(_QWORD *result, __int64 a2)
{
__int64 v2; // x1
__int64 v3; // x2
char *v4; // x1
if ( result )
{
result = (_QWORD *)*result;
if ( result )
{
v2 = *(_QWORD *)(a2 + 32);
if ( v2 )
{
if ( (*(_DWORD *)(v2 + 8) & 2) != 0 )
{
v3 = *(int *)(v2 + 32);
v4 = (char *)result + v3;
if ( (char *)result + v3 )
{
*(_QWORD *)((char *)result + v3) = 0;
*((_QWORD *)v4 + 1) = 0;
*((_DWORD *)v4 + 4) = 1;
return (_QWORD *)(dword_0 + 1);
}
}
}
}
}
return result;
}