//
// X509_set_version from 0xde89e0 to 0xde8a54 (116 bytes)
//
// 1 xrefs:
// > ??> @ 0xac2d8
//
// 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 X509_set_version(__int64 *a1, __int64 a2)
{
__int64 v3; // x0
__int64 v5; // [xsp+28h] [xbp+28h]
if ( a1 )
{
if ( !a2 )
{
ASN1_INTEGER_free(*a1);
*a1 = 0;
return 1;
}
v3 = *a1;
if ( v3 )
return ASN1_INTEGER_set(v3, a2);
v5 = a2;
v3 = ASN1_INTEGER_new();
*a1 = v3;
a2 = v5;
if ( v3 )
return ASN1_INTEGER_set(v3, a2);
}
return 0;
}