//
// X509_check_trust from 0x840e30 to 0x840ea0 (112 bytes)
//
// 5 xrefs:
// > OCSP_basic_verify @ 0x81fce8
// > sub_8426AC @ 0x84271c
// > sub_8426AC @ 0x84291c
// > sub_843DE0 @ 0x844720
// > ??> @ 0x64d9c
//
// 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_check_trust(int a1, char *a2, int a3)
{
int v6; // r0
char *v7; // r0
if ( !a2 )
return sub_840B9C((_BYTE *)&stru_38C.st_name + 2, a1, a3 | 8);
v6 = X509_TRUST_get_by_id((int)a2);
if ( v6 == -1 )
return off_AC0F60(a2, a1, a3);
v7 = X509_TRUST_get0(v6);
return (*((int (__fastcall **)(char *, int, int))v7 + 2))(v7, a1, a3);
}