//
// X509_PURPOSE_get_by_id from 0xe00e24 to 0xe00e78 (84 bytes)
//
// 7 xrefs:
// > X509_STORE_CTX_purpose_inherit @ 0xded698
// > X509_STORE_CTX_purpose_inherit @ 0xded75c
// > X509_STORE_CTX_init @ 0xdedc54
// > X509_PURPOSE_set @ 0xe00e90
// > X509_PURPOSE_add @ 0xe00f10
// > X509_check_purpose @ 0xe01968
// > ??> @ 0x2dff0
//
// 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_PURPOSE_get_by_id(int a1)
{
int v1; // w0
int v3; // [xsp+10h] [xbp+10h] BYREF
if ( (unsigned int)(a1 - 1) <= 8 )
return (unsigned int)(a1 - 1);
v3 = a1;
if ( !qword_125F730 )
return 0xFFFFFFFFLL;
v1 = OPENSSL_sk_find(qword_125F730, (__int64)&v3);
if ( v1 == -1 )
return 0xFFFFFFFFLL;
else
return (unsigned int)(v1 + 9);
}