//
// ASN1_TIME_to_generalizedtime from 0x9d5d14 to 0x9d5e08 (244 bytes)
//
// 1 xrefs:
// > ??> @ 0x77eec
//
// 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_to_generalizedtime(int a1, int *a2)
{
int v4; // r4
int v5; // r7
int v6; // r6
int v8; // r0
if ( !ASN1_TIME_check(a1) )
return 0;
if ( a2 )
{
v4 = *a2;
if ( !*a2 )
{
v8 = ASN1_GENERALIZEDTIME_new();
v4 = v8;
if ( !v8 )
return 0;
*a2 = v8;
}
}
else
{
v4 = ASN1_GENERALIZEDTIME_new();
if ( !v4 )
return 0;
}
if ( *(_DWORD *)(a1 + 4) == 24 )
{
if ( ASN1_STRING_set(v4, *(void **)(a1 + 8)) )
return v4;
}
else if ( ASN1_STRING_set(v4, nullptr) )
{
v5 = *(_DWORD *)(v4 + 8);
v6 = *(_DWORD *)a1 + 3;
if ( **(unsigned __int8 **)(a1 + 8) > 0x34u )
OPENSSL_strlcpy(v5, "19", *(_DWORD *)a1 + 3);
else
OPENSSL_strlcpy(v5, "20", *(_DWORD *)a1 + 3);
OPENSSL_strlcat(v5, *(_DWORD *)(a1 + 8), v6);
return v4;
}
return 0;
}