//
// X509_TRUST_get_by_id from 0xde8ed0 to 0xde8f24 (84 bytes)
//
// 6 xrefs:
// > X509_check_trust @ 0xde8f50
// > X509_TRUST_set @ 0xde8fd8
// > X509_TRUST_add @ 0xde9058
// > X509_STORE_CTX_purpose_inherit @ 0xded718
// > X509_STORE_CTX_purpose_inherit @ 0xded734
// > ??> @ 0x65088
//
// 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
//
__int64 __fastcall X509_TRUST_get_by_id(int a1)
{
int v1; // w0
int v3; // [xsp+18h] [xbp+18h] BYREF
if ( (unsigned int)(a1 - 1) <= 7 )
return (unsigned int)(a1 - 1);
v3 = a1;
if ( !qword_125F718 )
return 0xFFFFFFFFLL;
v1 = OPENSSL_sk_find(qword_125F718, (__int64)&v3);
if ( v1 == -1 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(v1 + 8);
}