//
// X509_TRUST_get_by_id from 0x1067210 to 0x1067264 (84 bytes)
//
// 6 xrefs:
// > X509_check_trust @ 0x1067290
// > X509_TRUST_set @ 0x1067318
// > X509_TRUST_add @ 0x1067398
// > X509_STORE_CTX_purpose_inherit @ 0x106ba58
// > X509_STORE_CTX_purpose_inherit @ 0x106ba74
// > ??> @ 0x894a0
//
// 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:16:54 +0000
//
__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_1568518 )
return 0xFFFFFFFFLL;
v1 = OPENSSL_sk_find(qword_1568518, (__int64)&v3);
if ( v1 == -1 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(v1 + 8);
}