// // X509_cmp_time from 0x1068d48 to 0x1069040 (760 bytes) // // 13 xrefs: // > OCSP_check_validity @ 0x1041eb4 // > OCSP_check_validity @ 0x1041f00 // > OCSP_check_validity @ 0x1041f44 // > x509_check_cert_time @ 0x1069084 // > x509_check_cert_time @ 0x1069108 // > X509_cmp_current_time @ 0x10694ec // > sub_10694F0 @ 0x1069620 // > sub_10694F0 @ 0x10699b0 // > sub_10694F0 @ 0x1069a80 // > sub_10694F0 @ 0x1069c88 // > sub_106C1C4 @ 0x106c234 // > sub_106C1C4 @ 0x106c278 // > @ 0xee018 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // 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 13:16:55 +0000 // __int64 __fastcall X509_cmp_time(int *a1, time_t *a2) { int v2; // w8 int v3; // w3 __int64 *v4; // x4 __int64 result; // x0 unsigned __int8 *v6; // x5 int v7; // w3 char *v8; // x7 int v9; // w6 _WORD *v10; // x4 int v11; // w4 int v12; // w2 int v13; // w3 int v14; // w6 int v15; // w5 __int64 v16; // x3 int v18; // w4 int v19; // w2 int v20; // w0 bool v21; // cc _DWORD v22[2]; // [xsp+38h] [xbp+38h] BYREF char *v23; // [xsp+40h] [xbp+40h] __int64 v24; // [xsp+48h] [xbp+48h] __int64 v25; // [xsp+50h] [xbp+50h] BYREF int v26; // [xsp+58h] [xbp+58h] BYREF int v27; // [xsp+5Ch] [xbp+5Ch] BYREF char v28[24]; // [xsp+68h] [xbp+68h] BYREF v2 = a1[1]; v3 = *a1; v4 = *((__int64 **)a1 + 1); if ( v2 == 23 ) { if ( (unsigned int)(v3 - 11) > 6 ) return 0; v25 = *v4; v6 = (unsigned __int8 *)v4 + 10; v7 = v3 - 10; v8 = (char *)&v26 + 2; LOWORD(v26) = *((_WORD *)v4 + 4); } else { if ( (unsigned int)(v3 - 13) > 0xA ) return 0; v25 = *v4; v6 = (unsigned __int8 *)v4 + 12; v7 = v3 - 12; v8 = (char *)&v27; v26 = *((_DWORD *)v4 + 2); } v9 = *v6; if ( (((_BYTE)v9 - 43) & 0xFD) == 0 || v9 == 90 ) { *v8 = 48; v10 = v8 + 2; v8[1] = 48; goto LABEL_15; } if ( v7 == 1 ) return 0; *v8 = v9; v8[1] = v6[1]; if ( v7 == 2 ) return 0; if ( v6[2] != 46 ) { v10 = v8 + 2; v6 += 2; v7 -= 2; LABEL_15: *v10 = 90; goto LABEL_16; } v7 -= 3; v18 = (_DWORD)v6 + 3; if ( !v7 ) return 0; if ( (unsigned __int8)(v6[3] - 48) > 9u ) { v8[3] = 0; v6 += 3; v8[2] = 90; } else { v6 += 3; do { ++v6; --v7; } while ( (int)v6 - v18 <= 2 && v7 && (unsigned __int8)(*v6 - 48) <= 9u ); *((_WORD *)v8 + 1) = 90; if ( !v7 ) return 0; } LABEL_16: v11 = *v6; if ( v11 == 90 ) { if ( v7 != 1 ) return 0; v16 = 0; } else { if ( (((_BYTE)v11 - 43) & 0xFD) != 0 ) return 0; if ( v7 != 5 ) return 0; v12 = v6[1] - 48; if ( (unsigned __int8)(v6[1] - 48) > 9u ) return 0; v13 = v6[2] - 48; if ( (unsigned __int8)(v6[2] - 48) > 9u ) return 0; v14 = v6[3] - 48; if ( (unsigned __int8)(v6[3] - 48) > 9u ) return 0; v15 = v6[4] - 48; if ( (unsigned __int8)v15 > 9u ) return 0; v16 = 60 * (((v15 + 10 * v14 + (__int64)(60 * (v13 + 10 * v12))) ^ -(__int64)(v11 == 45)) + (v11 == 45)); } v22[1] = v2; v24 = 0; v22[0] = 24; v23 = v28; if ( !X509_time_adj((__int64)v22, v16, a2) ) return 0; if ( a1[1] != 23 ) goto LABEL_28; v19 = BYTE1(v25) - 48 + 10 * ((unsigned __int8)v25 - 48); v20 = (unsigned __int8)v28[1] - 48 + 10 * ((unsigned __int8)v28[0] - 48); if ( v19 <= 49 ) v19 += 100; if ( v20 <= 49 ) v20 += 100; v21 = v19 <= v20; if ( v19 < v20 ) return 0xFFFFFFFFLL; result = 1; if ( v21 ) { LABEL_28: LODWORD(result) = strcmp((const char *)&v25, v28); if ( (_DWORD)result ) return (unsigned int)result; else return 0xFFFFFFFFLL; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source