//
// ASN1_TIME_adj from 0xd677e8 to 0xd678c4 (220 bytes)
//
// 3 xrefs:
// > ASN1_TIME_set @ 0xd678cc
// > X509_time_adj_ex @ 0xdea9a8
// > ??> @ 0x2b0b0
//
// 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 ASN1_TIME_adj(__int64 a1, __int64 a2, unsigned int a3, __int64 a4)
{
__int64 v6; // x0
__int64 v7; // x19
__int64 v10; // [xsp+38h] [xbp+38h] BYREF
_BYTE v11[56]; // [xsp+48h] [xbp+48h] BYREF
v10 = a2;
v6 = OPENSSL_gmtime(&v10, v11);
v7 = v6;
if ( v6 )
{
if ( (a3 || a4) && !(unsigned int)OPENSSL_gmtime_adj(v6, a3, a4) )
{
return 0;
}
else if ( (unsigned int)(*(_DWORD *)(v7 + 20) - 50) <= 0x63 )
{
return ASN1_UTCTIME_adj(a1, v10, a3);
}
else
{
return ASN1_GENERALIZEDTIME_adj(a1, v10, a3);
}
}
else
{
ERR_put_error(13, 217, 173, "crypto/asn1/a_time.c", 40);
return 0;
}
}