//
// i2d_ASN1_OBJECT from 0x7bd2c0 to 0x7bd360 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0x5e15c
//
// 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 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;
}