//
// ASN1_GENERALIZEDTIME_print from 0x8610f4 to 0x861394 (672 bytes)
//
// 14 xrefs:
// > ASN1_TIME_print @ 0x7c13e8
// > OCSP_RESPONSE_print @ 0x81f408
// > OCSP_RESPONSE_print @ 0x81f4b8
// > OCSP_RESPONSE_print @ 0x81f4f0
// > OCSP_RESPONSE_print @ 0x81f6a0
// > sub_85948C @ 0x8594dc
// > sub_85948C @ 0x859528
// > sub_867C80 @ 0x8687e8
// > sub_867C80 @ 0x868944
// > ASN1_item_print @ 0x869330
// > sub_8B9A58 @ 0x8b9b68
// > sub_8B9BC4 @ 0x8b9bfc
// > SCT_print @ 0x8cfe9c
// > ??> @ 0x5e51c
//
// 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(int a1, int *a2)
{
int v2; // r4
unsigned __int8 *v3; // r2
int v4; // r9
int v5; // r11
int v6; // r3
int v7; // r1
int v8; // r6
int v9; // r7
int v10; // r5
unsigned int v11; // r1
int v12; // r5
int v13; // r3
int v14; // r4
const char *v15; // r7
int v16; // r6
const char *v17; // r8
int v19; // r10
unsigned __int8 *v20; // r8
int v21; // t1
int v22; // [sp+24h] [bp-10h]
int v23; // [sp+28h] [bp-Ch]
v2 = *a2;
v3 = (unsigned __int8 *)a2[2];
if ( *a2 <= 11 )
goto LABEL_20;
v22 = v3[v2 - 1];
if ( (unsigned __int8)(*v3 - 48) > 9u )
goto LABEL_20;
v4 = v3[1];
if ( (unsigned int)(v4 - 48) > 9 )
goto LABEL_20;
v5 = v3[2];
if ( (unsigned int)(v5 - 48) > 9
|| (v23 = v3[3], (unsigned int)(v23 - 48) > 9)
|| (v6 = v3[4], (unsigned int)(v6 - 48) > 9)
|| (v7 = v3[5], (unsigned int)(v7 - 48) > 9)
|| (v8 = v3[6], (unsigned int)(v8 - 48) > 9)
|| (v9 = v3[7], (unsigned int)(v9 - 48) > 9)
|| (v10 = v3[8], (unsigned int)(v10 - 48) > 9)
|| (unsigned __int8)(v3[9] - 48) > 9u
|| (unsigned __int8)(v3[10] - 48) > 9u
|| (unsigned __int8)(v3[11] - 48) > 9u
|| (v11 = v7 + 10 * (v6 - 48) - 49, v11 > 0xB) )
{
LABEL_20:
BIO_write(a1, (int)"Bad time value", 14);
return 0;
}
else
{
v12 = v3[9] - 48 + 10 * (v10 - 48);
v13 = v9 - 48 + 10 * (v8 - 48);
if ( v2 <= 13 || (unsigned __int8)(v3[12] - 48) > 9u || (unsigned __int8)(v3[13] - 48) > 9u )
{
v14 = 0;
v15 = nullptr;
v16 = 0;
}
else
{
v16 = v3[13] - 48 + 10 * (v3[12] - 48);
if ( v2 != 14 && v3[14] == 46 )
{
v15 = (const char *)(v3 + 14);
if ( v2 == 15 || (unsigned int)v3[15] - 48 > 9 )
{
v14 = 1;
}
else
{
v19 = v2 - 14;
v20 = v3 + 15;
v14 = 1;
do
{
if ( ++v14 == v19 )
break;
v21 = *++v20;
}
while ( (unsigned int)(v21 - 48) <= 9 );
}
}
else
{
v14 = 0;
v15 = nullptr;
}
}
if ( v22 == 90 )
v17 = " GMT";
else
v17 = &byte_9B1912;
return BIO_printf(
a1,
"%s %2d %02d:%02d:%02d%.*s %d%s",
asn1_mon[v11],
v13,
v12,
v3[11] - 48 + 10 * (v3[10] - 48),
v16,
v14,
v15,
100 * (v4 - 48) + 1000 * (*v3 - 48) + 10 * (v5 - 48) + v23 - 48,
v17) > 0;
}
}