//
// X509_TRUST_get_by_id from 0x840dd4 to 0x840e2c (88 bytes)
//
// 6 xrefs:
// > X509_check_trust @ 0x840e4c
// > X509_TRUST_set @ 0x840ebc
// > X509_TRUST_add @ 0x840f24
// > X509_STORE_CTX_purpose_inherit @ 0x8459e0
// > X509_STORE_CTX_purpose_inherit @ 0x8459f8
// > ??> @ 0x673bc
//
// 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_TRUST_get_by_id(int a1)
{
int v1; // r0
int v3; // [sp+0h] [bp-20h] BYREF
if ( (unsigned int)(a1 - 1) <= 7 )
return a1 - 1;
v3 = a1;
if ( !dword_AD4848 )
return -1;
v1 = OPENSSL_sk_find(dword_AD4848, (int)&v3);
if ( v1 == -1 )
return -1;
else
return v1 + 8;
}