//
// ASN1_TIME_adj from 0x9d5c1c to 0x9d5ce0 (196 bytes)
//
// 3 xrefs:
// > ASN1_TIME_set @ 0x9d5cec
// > X509_time_adj_ex @ 0xa575a8
// > ??> @ 0x77e5c
//
// 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:14 +0000
//
int __fastcall ASN1_TIME_adj(int a1, int a2, int a3, int a4)
{
int v7; // r6
bool v8; // zf
int result; // r0
int v10; // [sp+Ch] [bp-38h] BYREF
_BYTE v11[44]; // [sp+14h] [bp-30h] BYREF
v10 = a2;
v7 = OPENSSL_gmtime(&v10, v11);
if ( v7 )
{
v8 = a4 == 0;
if ( !a4 )
v8 = a3 == 0;
if ( v8 || (result = OPENSSL_gmtime_adj()) != 0 )
{
if ( (unsigned int)(*(_DWORD *)(v7 + 20) - 50) <= 0x63 )
return ASN1_UTCTIME_adj(a1, v10, a3, a4);
else
return ASN1_GENERALIZEDTIME_adj(a1, v10, a3, a4);
}
}
else
{
ERR_put_error(13, 217, 173, "crypto/asn1/a_time.c", 40);
return 0;
}
return result;
}