// // X509_cmp_time from 0x8429fc to 0x842d0c (784 bytes) // // 13 xrefs: // > OCSP_check_validity @ 0x81df90 // > OCSP_check_validity @ 0x81dfd4 // > OCSP_check_validity @ 0x81e024 // > x509_check_cert_time @ 0x842d48 // > x509_check_cert_time @ 0x842db0 // > X509_cmp_current_time @ 0x84314c // > sub_843150 @ 0x843268 // > sub_843150 @ 0x8434a8 // > sub_843150 @ 0x843724 // > sub_843150 @ 0x843974 // > sub_8462B8 @ 0x846328 // > sub_8462B8 @ 0x84636c // > @ 0x648bc // // 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 // int __fastcall X509_cmp_time(int *a1, unsigned int a2) { int v4; // r5 int v5; // r6 int result; // r0 unsigned __int8 *v7; // r6 int v8; // r5 char *v9; // r1 int v10; // r2 int v11; // r3 _BYTE *v12; // r3 unsigned __int8 *v13; // r0 _BOOL4 v14; // r2 int v15; // r2 _BOOL4 v16; // r5 unsigned int v17; // r3 unsigned int v18; // r1 int v19; // r2 int v20; // r3 size_t v21[4]; // [sp+0h] [bp-40h] BYREF char v22[12]; // [sp+10h] [bp-30h] BYREF char v23; // [sp+1Ch] [bp-24h] BYREF char v24[24]; // [sp+28h] [bp-18h] BYREF v4 = *a1; v5 = a1[2]; if ( a1[1] == 23 ) { if ( (unsigned int)(v4 - 11) > 6 ) return 0; memcpy(v22, (const void *)a1[2], 0xAu); v7 = (unsigned __int8 *)(v5 + 10); v8 = v4 - 10; v9 = &v22[10]; } else { if ( (unsigned int)(v4 - 13) > 0xA ) return 0; memcpy(v22, (const void *)a1[2], sizeof(v22)); v7 = (unsigned __int8 *)(v5 + 12); v8 = v4 - 12; v9 = &v23; } v10 = *v7; v11 = ((v10 - 43) & 0xFD) == 0; if ( v10 == 90 ) v11 = 1; if ( v11 ) { *v9 = 48; v12 = v9 + 2; v9[1] = 48; goto LABEL_25; } if ( v8 == 1 ) return 0; *v9 = v10; v9[1] = v7[1]; if ( v8 == 2 ) return 0; if ( v7[2] != 46 ) { v12 = v9 + 2; v7 += 2; v8 -= 2; LABEL_25: *v12 = 90; v12[1] = 0; goto LABEL_26; } v8 -= 3; if ( !v8 ) return 0; if ( (unsigned int)v7[3] - 48 > 9 ) { v9[3] = 0; v7 += 3; v9[2] = 90; } else { v13 = v7 + 4; do { v14 = ++v11 <= 2 && --v8 != 0; v7 = v13; if ( !v14 ) break; ++v13; } while ( (unsigned int)*v7 - 48 <= 9 ); v9[2] = 90; v9[3] = 0; if ( !v8 ) return 0; } LABEL_26: v15 = *v7; if ( v15 == 90 ) { if ( v8 != 1 ) return 0; v18 = 0; } else { v16 = v8 != 5 || ((v15 - 43) & 0xFD) != 0; if ( v16 || (unsigned __int8)(v7[1] - 48) > 9u || (unsigned __int8)(v7[2] - 48) > 9u || (unsigned __int8)(v7[3] - 48) > 9u || (unsigned __int8)(v7[4] - 48) > 9u ) { return 0; } v17 = __clz(v15 - 45); v18 = 60 * ((-(v17 >> 5) ^ (v7[4] - 48 + 10 * (v7[3] - 48) + 60 * (v7[2] - 48 + 10 * (v7[1] - 48)))) + (v17 >> 5)); } v21[1] = a1[1]; v21[3] = 0; v21[0] = 24; v21[2] = (size_t)v24; if ( !X509_time_adj(v21, v18, a2) ) return 0; if ( a1[1] == 23 ) { v19 = (unsigned __int8)v22[1] - 48 + 10 * ((unsigned __int8)v22[0] - 48); v20 = (unsigned __int8)v24[1] - 48 + 10 * ((unsigned __int8)v24[0] - 48); if ( v19 <= 49 ) v19 += 100; if ( v20 <= 49 ) v20 += 100; if ( v19 < v20 ) return -1; if ( v19 > v20 ) return 1; } result = strcmp(v22, v24); if ( !result ) return -1; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source