//
// i2d_ASN1_OBJECT from 0xd636c0 to 0xd63780 (192 bytes)
//
// 1 xrefs:
// > ??> @ 0x8d5d0
//
// 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
//
__int64 __fastcall i2d_ASN1_OBJECT(__int64 result, void **a2)
{
__int64 v2; // x20
__int64 v4; // x19
__int64 v5; // x2
void *v6; // [xsp+38h] [xbp+38h] BYREF
v2 = result;
if ( result )
{
v4 = *(_QWORD *)(result + 24);
if ( v4 && (LODWORD(v4) = ASN1_object_size(0, *(unsigned int *)(result + 20), 6), (_DWORD)v4 != -1) && a2 )
{
v5 = *(unsigned int *)(v2 + 20);
v6 = *a2;
ASN1_put_object(&v6, a2 == nullptr, v5, 6, 0);
memcpy(v6, *(const void **)(v2 + 24), *(int *)(v2 + 20));
*a2 = (char *)v6 + *(int *)(v2 + 20);
return (unsigned int)v4;
}
else
{
return (unsigned int)v4;
}
}
return result;
}