// // SCT_print from 0x8cfccc to 0x8d0038 (876 bytes) // // 2 xrefs: // > SCT_LIST_print @ 0x8d00f0 // > @ 0x6bcbc // // 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 SCT_print(int a1, int a2, int a3, _DWORD *a4) { int v7; // r7 int v8; // r9 const char *v9; // r0 int v10; // r6 unsigned __int64 v11; // r8 int *v12; // r10 const char *v13; // r11 unsigned int signature_nid; // r0 char *v15; // r0 int v17; // r6 char v18[24]; // [sp+Ch] [bp-18h] BYREF if ( a4 ) { v7 = a3 + 4; v8 = CTLOG_STORE_get0_log_by_id(a4, *(const void **)(a1 + 12), *(_DWORD *)(a1 + 16)); BIO_printf(a2, "%*sSigned Certificate Timestamp:", a3, &byte_9B1912); BIO_printf(a2, "\n%*sVersion : ", a3 + 4, &byte_9B1912); if ( !*(_DWORD *)a1 ) { BIO_printf(a2, "v1 (0x0)"); if ( v8 ) { v9 = (const char *)CTLOG_get0_name(v8); BIO_printf(a2, "\n%*sLog : %s", a3 + 4, &byte_9B1912, v9); } goto LABEL_5; } LABEL_15: v17 = a3 + 16; BIO_printf(a2, "unknown\n%*s", v17, &byte_9B1912); return BIO_hex_string(a2, v17, 16, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 8)); } v7 = a3 + 4; BIO_printf(a2, "%*sSigned Certificate Timestamp:", a3, &byte_9B1912); BIO_printf(a2, "\n%*sVersion : ", v7, &byte_9B1912); if ( *(_DWORD *)a1 ) goto LABEL_15; BIO_printf(a2, "v1 (0x0)"); LABEL_5: BIO_printf(a2, "\n%*sLog ID : ", v7, &byte_9B1912); v10 = a3 + 16; BIO_hex_string(a2, v10, 16, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 16)); BIO_printf(a2, "\n%*sTimestamp : ", v7, &byte_9B1912); v11 = *(_QWORD *)(a1 + 24); v12 = (int *)ASN1_GENERALIZEDTIME_new(); if ( v12 ) { ASN1_GENERALIZEDTIME_adj((int)v12, 0, v11 / 0x5265C00, v11 % 0x5265C00 / 0x3E8); v13 = (const char *)ASN1_STRING_get0_data((int)v12); BIO_snprintf(v18, 0x14u, "%.14s.%03dZ", v13, (unsigned int)(v11 % 0x3E8)); if ( ASN1_GENERALIZEDTIME_set_string(v12, v18) ) ASN1_GENERALIZEDTIME_print(a2, v12); ASN1_GENERALIZEDTIME_free((int)v12); } BIO_printf(a2, "\n%*sExtensions: ", v7, &byte_9B1912); if ( *(_DWORD *)(a1 + 36) ) BIO_hex_string(a2, v10, 16, *(_DWORD *)(a1 + 32), *(_DWORD *)(a1 + 36)); else BIO_printf(a2, "none"); BIO_printf(a2, "\n%*sSignature : ", v7, &byte_9B1912); signature_nid = SCT_get_signature_nid((_BYTE *)a1); if ( signature_nid ) { v15 = OBJ_nid2ln(signature_nid); BIO_printf(a2, "%s", v15); } else { BIO_printf(a2, "%02X%02X", *(unsigned __int8 *)(a1 + 40), *(unsigned __int8 *)(a1 + 41)); } BIO_printf(a2, "\n%*s ", v7, &byte_9B1912); return BIO_hex_string(a2, v10, 16, *(_DWORD *)(a1 + 44), *(_DWORD *)(a1 + 48)); }
GD Web Decomp Icon

GD Web Decomp

Raw Source