//
// asn1_enc_init from 0x7ca438 to 0x7ca480 (72 bytes)
//
// 3 xrefs:
// > sub_7C96C0 @ 0x7c98f0
// > ASN1_item_ex_new @ 0x7c9d34
// > ??> @ 0x5eb2c
//
// 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
//
int *__fastcall asn1_enc_init(int *result, int a2)
{
int v2; // r3
int v3; // r2
char *v4; // r1
if ( result )
{
v2 = *result;
if ( *result )
{
v3 = *(_DWORD *)(a2 + 16);
if ( v3 )
{
if ( (*(_DWORD *)(v3 + 4) & 2) != 0 )
{
result = *(int **)(v3 + 20);
v4 = (char *)result + v2;
if ( (char *)result + v2 )
{
*(int *)((char *)result + v2) = 0;
*((_DWORD *)v4 + 1) = 0;
*((_DWORD *)v4 + 2) = 1;
}
}
}
}
}
return result;
}