//
// sub_83CF98 from 0x83cf98 to 0x83d05c (196 bytes)
//
// 1 xrefs:
// > ??> @ 0xac0f4c
//
// 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 sub_83CF98(int a1, int a2, const char *a3, int a4)
{
_BOOL4 v4; // r4
const char *default_cert_file_env; // r0
char *default_cert_file; // r1
if ( a2 != 1 )
return 0;
if ( a4 == 3 )
{
default_cert_file_env = (const char *)X509_get_default_cert_file_env();
default_cert_file = getenv(default_cert_file_env);
if ( !default_cert_file )
default_cert_file = (char *)X509_get_default_cert_file();
v4 = X509_load_cert_crl_file(a1, default_cert_file, 1) != 0;
if ( v4 )
return 1;
ERR_put_error(11, 101, 104, (int)"crypto/x509/by_file.c", 61);
return v4;
}
if ( a4 != 1 )
return X509_load_cert_file(a1, (int)a3, a4) != 0;
return X509_load_cert_crl_file(a1, a3, 1) != 0;
}