//
// ASN1_GENERALIZEDTIME_print from 0xe09108 to 0xe093f4 (748 bytes)
//
// 14 xrefs:
// > ASN1_TIME_print @ 0xd67c14
// > OCSP_RESPONSE_print @ 0xdc4fc4
// > OCSP_RESPONSE_print @ 0xdc5144
// > OCSP_RESPONSE_print @ 0xdc5174
// > OCSP_RESPONSE_print @ 0xdc51fc
// > sub_DFFC74 @ 0xdffcc8
// > sub_DFFC74 @ 0xdffd0c
// > sub_E0FE14 @ 0xe10828
// > sub_E0FE14 @ 0xe10ae8
// > ASN1_item_print @ 0xe113d0
// > sub_E63F08 @ 0xe64020
// > ??> @ 0xe64090
// > SCT_print @ 0xe7bb58
// > ??> @ 0xc2550
//
// 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
//
bool __fastcall ASN1_GENERALIZEDTIME_print(__int64 a1, __int64 a2)
{
int v2; // w7
unsigned __int8 *v3; // x1
int v4; // w13
int v5; // w8
int v6; // w12
int v7; // w10
int v8; // w11
unsigned int v9; // w2
int v10; // w3
int v11; // w4
int v12; // w5
const char *v13; // x14
int v14; // w7
int v15; // w6
const char *v16; // x2
const char *v17; // x9
int v19; // w9
char *v20; // x1
char v21; // t1
v2 = *(_DWORD *)a2;
v3 = *(unsigned __int8 **)(a2 + 8);
if ( v2 <= 11
|| (v4 = v3[v2 - 1], v5 = *v3 - 48, (unsigned __int8)(*v3 - 48) > 9u)
|| (unsigned __int8)(v3[1] - 48) > 9u
|| (unsigned __int8)(v3[2] - 48) > 9u
|| (unsigned __int8)(v3[3] - 48) > 9u
|| (unsigned __int8)(v3[4] - 48) > 9u
|| (unsigned __int8)(v3[5] - 48) > 9u
|| (unsigned __int8)(v3[6] - 48) > 9u
|| (unsigned __int8)(v3[7] - 48) > 9u
|| (unsigned __int8)(v3[8] - 48) > 9u
|| (unsigned __int8)(v3[9] - 48) > 9u
|| (unsigned __int8)(v3[10] - 48) > 9u
|| (unsigned __int8)(v3[11] - 48) > 9u
|| (v6 = v3[1], v7 = v3[2], v8 = v3[3], v9 = v3[5] + 10 * (v3[4] - 48) - 49, v9 > 0xB) )
{
BIO_write(a1, (__int64)"Bad time value", 0xEu);
return 0;
}
else
{
v10 = v3[7] - 48 + 10 * (v3[6] - 48);
v11 = v3[9] - 48 + 10 * (v3[8] - 48);
v12 = v3[11] - 48 + 10 * (v3[10] - 48);
if ( v2 <= 13 || (unsigned __int8)(v3[12] - 48) > 9u || (unsigned __int8)(v3[13] - 48) > 9u )
{
v13 = nullptr;
v14 = 0;
v15 = 0;
}
else
{
v15 = v3[13] - 48 + 10 * (v3[12] - 48);
if ( v2 != 14 && v3[14] == 46 )
{
v13 = (const char *)(v3 + 14);
if ( v2 == 15 || (unsigned __int8)(v3[15] - 48) > 9u )
{
v14 = 1;
}
else
{
v19 = v2 - 14;
v20 = (char *)(v3 + 16);
v14 = 1;
do
{
if ( ++v14 == v19 )
break;
v21 = *v20++;
}
while ( (unsigned __int8)(v21 - 48) <= 9u );
}
}
else
{
v14 = 0;
v13 = nullptr;
}
}
v16 = asn1_mon[v9];
if ( v4 == 90 )
v17 = " GMT";
else
v17 = &byte_F288A0;
return (int)BIO_printf(
a1,
"%s %2d %02d:%02d:%02d%.*s %d%s",
v16,
v10,
v11,
v12,
v15,
v14,
v13,
100 * (v6 - 48) + 1000 * v5 + 10 * (v7 - 48) + v8 - 48,
v17) > 0;
}
}