//
// ssl_validate_ct from 0x9afe8c to 0x9b0014 (392 bytes)
//
// 2 xrefs:
// > tls_process_server_done @ 0x9b8cf8
// > ??> @ 0x7613c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:56 +0000
//
int __fastcall ssl_validate_ct(_DWORD *a1)
{
int v1; // r3
int v2; // r5
bool v3; // zf
unsigned __int8 *v5; // r3
int v6; // r6
int v7; // r7
int v8; // r5
int v9; // r5
v1 = a1[60];
if ( v1 )
{
v2 = *(_DWORD *)(v1 + 140);
v3 = v2 == 0;
if ( v2 )
v3 = a1[90] == 0;
if ( v3 )
return 1;
if ( a1[71] )
return 1;
if ( !a1[70] )
return 1;
if ( OPENSSL_sk_num(a1[70]) <= 1 )
return 1;
if ( OPENSSL_sk_num(a1[33]) > 0 )
{
v5 = (unsigned __int8 *)a1[35];
if ( v5 )
{
if ( (unsigned int)*v5 - 2 <= 1 )
return 1;
}
}
v6 = CT_POLICY_EVAL_CTX_new();
if ( v6 )
{
v7 = OPENSSL_sk_value(a1[70], 1);
CT_POLICY_EVAL_CTX_set1_cert(v6, v2);
CT_POLICY_EVAL_CTX_set1_issuer(v6, v7);
CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(v6, *(_DWORD *)(a1[69] + 248));
v8 = SSL_get0_peer_scts(a1);
if ( SCT_LIST_validate(v8, v6) < 0 )
{
ERR_put_error(20, 400, 208, "ssl/ssl_lib.c", 4196);
}
else
{
v9 = ((int (__fastcall *)(int, int, _DWORD))a1[90])(v6, v8, a1[91]);
if ( v9 >= 0 )
{
CT_POLICY_EVAL_CTX_free(v6);
if ( v9 )
return v9;
goto LABEL_20;
}
}
}
else
{
ERR_put_error(20, 400, 65, "ssl/ssl_lib.c", 4170);
}
CT_POLICY_EVAL_CTX_free(v6);
LABEL_20:
a1[71] = 71;
return 0;
}
return 1;
}