//
// SCT_print from 0x10f9994 to 0x10f9cec (856 bytes)
//
// 2 xrefs:
// > SCT_LIST_print @ 0x10f9d58
// > ??> @ 0x533e0
//
// 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:18:14 +0000
//
__int64 __fastcall SCT_print(__int64 a1, __int64 a2, int a3, _QWORD *a4)
{
int v7; // w22
__int64 v8; // x25
const char *v9; // x0
int v10; // w21
unsigned __int64 v11; // x25
int *v12; // x0
__int64 v13; // x24
const char *v14; // x0
__int64 v15; // x4
unsigned int signature_nid; // w0
char *v17; // x0
int v19; // w21
char v20[24]; // [xsp+58h] [xbp+58h] BYREF
if ( a4 )
{
v7 = a3 + 4;
v8 = CTLOG_STORE_get0_log_by_id(a4, *(const void **)(a1 + 24), *(_QWORD *)(a1 + 32));
BIO_printf(a2, "%*sSigned Certificate Timestamp:", a3, &byte_11B8890);
BIO_printf(a2, "\n%*sVersion : ", a3 + 4, &byte_11B8890);
if ( !*(_DWORD *)a1 )
{
BIO_printf(a2, "v1 (0x0)");
if ( v8 )
{
v9 = (const char *)CTLOG_get0_name(v8);
BIO_printf(a2, "\n%*sLog : %s", v7, &byte_11B8890, v9);
}
goto LABEL_5;
}
LABEL_15:
v19 = a3 + 16;
BIO_printf(a2, "unknown\n%*s", v19, &byte_11B8890);
return BIO_hex_string(a2, v19, 16, *(unsigned __int8 **)(a1 + 8), *(_DWORD *)(a1 + 16));
}
v7 = a3 + 4;
BIO_printf(a2, "%*sSigned Certificate Timestamp:", a3, &byte_11B8890);
BIO_printf(a2, "\n%*sVersion : ", v7, &byte_11B8890);
if ( *(_DWORD *)a1 )
goto LABEL_15;
BIO_printf(a2, "v1 (0x0)");
LABEL_5:
v10 = a3 + 16;
BIO_printf(a2, "\n%*sLog ID : ", v7, &byte_11B8890);
BIO_hex_string(a2, v10, 16, *(unsigned __int8 **)(a1 + 24), *(_DWORD *)(a1 + 32));
BIO_printf(a2, "\n%*sTimestamp : ", v7, &byte_11B8890);
v11 = *(_QWORD *)(a1 + 40);
v12 = (int *)ASN1_GENERALIZEDTIME_new();
v13 = (__int64)v12;
if ( v12 )
{
ASN1_GENERALIZEDTIME_adj(v12, 0, v11 / 0x5265C00, v11 % 0x5265C00 / 0x3E8);
v14 = (const char *)ASN1_STRING_get0_data(v13);
BIO_snprintf(v20, 0x14u, "%.14s.%03dZ", v14, v11 % 0x3E8);
if ( (unsigned int)ASN1_GENERALIZEDTIME_set_string(v13, v20) )
ASN1_GENERALIZEDTIME_print(a2, v13);
ASN1_GENERALIZEDTIME_free(v13);
}
BIO_printf(a2, "\n%*sExtensions: ", v7, &byte_11B8890);
v15 = *(_QWORD *)(a1 + 56);
if ( v15 )
BIO_hex_string(a2, v10, 16, *(unsigned __int8 **)(a1 + 48), v15);
else
BIO_printf(a2, "none");
BIO_printf(a2, "\n%*sSignature : ", v7, &byte_11B8890);
signature_nid = SCT_get_signature_nid(a1);
if ( signature_nid )
{
v17 = OBJ_nid2ln(signature_nid);
BIO_printf(a2, "%s", v17);
}
else
{
BIO_printf(a2, "%02X%02X", *(unsigned __int8 *)(a1 + 64), *(unsigned __int8 *)(a1 + 65));
}
BIO_printf(a2, "\n%*s ", v7, &byte_11B8890);
return BIO_hex_string(a2, v10, 16, *(unsigned __int8 **)(a1 + 72), *(_DWORD *)(a1 + 80));
}