//
// ERR_func_error_string from 0xd9fb74 to 0xd9fc18 (164 bytes)
//
// 31 xrefs:
// > ERR_load_SSL_strings @ 0xd63594
// > ERR_error_string_n @ 0xd9fd44
// > ERR_load_EVP_strings @ 0xe61464
// > ERR_load_KDF_strings @ 0xe62fd8
// > ERR_load_OBJ_strings @ 0xe633c4
// > ERR_load_OCSP_strings @ 0xe6341c
// > ERR_load_PEM_strings @ 0xe643cc
// > ERR_load_PKCS12_strings @ 0xe66210
// > ERR_load_PKCS7_strings @ 0xe665a8
// > ERR_load_RAND_strings @ 0xe68038
// > ERR_load_RSA_strings @ 0xe6a940
// > ERR_load_TS_strings @ 0xe6e7d8
// > ERR_load_UI_strings @ 0xe6e830
// > ERR_load_X509_strings @ 0xe6ef78
// > ERR_load_X509V3_strings @ 0xe70500
// > ERR_load_ASN1_strings @ 0xe70598
// > ERR_load_ASYNC_strings @ 0xe733e8
// > ERR_load_BIO_strings @ 0xe747b4
// > ERR_load_BN_strings @ 0xe748e4
// > ERR_load_BUF_strings @ 0xe77bdc
// > ERR_load_CMS_strings @ 0xe7b758
// > ERR_load_COMP_strings @ 0xe7b7b0
// > ERR_load_CONF_strings @ 0xe7b808
// > ERR_load_CRYPTO_strings @ 0xe7b860
// > ERR_load_CT_strings @ 0xe7b8b8
// > ERR_load_DH_strings @ 0xe7c498
// > ERR_load_DSA_strings @ 0xe7ca60
// > ERR_load_DSO_strings @ 0xe7cc08
// > ERR_load_EC_strings @ 0xe7d720
// > ERR_load_ENGINE_strings @ 0xe7d778
// > ??> @ 0x61ae8
//
// 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 ERR_func_error_string(int a1)
{
__int64 v2; // x19
__int64 v4; // [xsp+30h] [xbp+30h] BYREF
if ( !(unsigned int)CRYPTO_THREAD_run_once(&unk_125DE78, sub_D9F548) || !dword_125D668 )
return 0;
v4 = a1 & 0xFFFFF000;
CRYPTO_THREAD_read_lock(qword_125D660);
if ( !qword_125DE80 )
{
CRYPTO_THREAD_unlock(qword_125D660);
return 0;
}
v2 = OPENSSL_LH_retrieve(qword_125DE80, &v4);
CRYPTO_THREAD_unlock(qword_125D660);
if ( !v2 )
return 0;
return *(_QWORD *)(v2 + 8);
}