//
// i2d_ASN1_OBJECT from 0x9d1ec0 to 0x9d1f60 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0x77bdc
//
// 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:12 +0000
//
int __fastcall i2d_ASN1_OBJECT(int result, void **a2)
{
int v2; // r4
int v3; // r5
int v5; // r0
bool v6; // zf
int v7; // r2
void *v8; // [sp+Ch] [bp-14h] BYREF
if ( result )
{
v2 = *(_DWORD *)(result + 16);
if ( !v2 )
return v2;
v3 = result;
v5 = ASN1_object_size(0, *(_DWORD *)(result + 12), 6);
v6 = v5 == -1;
if ( v5 != -1 )
v6 = a2 == nullptr;
v2 = v5;
if ( v6 )
{
return v2;
}
else
{
v7 = *(_DWORD *)(v3 + 12);
v8 = *a2;
ASN1_put_object(&v8, 0, v7, 6, 0);
memcpy(v8, *(const void **)(v3 + 16), *(_DWORD *)(v3 + 12));
*a2 = (char *)v8 + *(_DWORD *)(v3 + 12);
return v2;
}
}
return result;
}