//
// ERR_func_error_string from 0x7f9dcc to 0x7f9e6c (160 bytes)
//
// 31 xrefs:
// > ERR_load_SSL_strings @ 0x7bd138
// > ERR_error_string_n @ 0x7f9f94
// > ERR_load_EVP_strings @ 0x8b73a4
// > ERR_load_KDF_strings @ 0x8b8bb4
// > ERR_load_OBJ_strings @ 0x8b8f38
// > ERR_load_OCSP_strings @ 0x8b8f7c
// > ERR_load_PEM_strings @ 0x8b9ef8
// > ERR_load_PKCS12_strings @ 0x8bbd24
// > ERR_load_PKCS7_strings @ 0x8bc06c
// > ERR_load_RAND_strings @ 0x8bd7a0
// > ERR_load_RSA_strings @ 0x8bf90c
// > ERR_load_TS_strings @ 0x8c2b90
// > ERR_load_UI_strings @ 0x8c2bd4
// > ERR_load_X509_strings @ 0x8c3260
// > ERR_load_X509V3_strings @ 0x8c4794
// > ERR_load_ASN1_strings @ 0x8c4830
// > ERR_load_ASYNC_strings @ 0x8c7b08
// > ERR_load_BIO_strings @ 0x8c9054
// > ERR_load_BN_strings @ 0x8c9150
// > ERR_load_BUF_strings @ 0x8cb7a0
// > ERR_load_CMS_strings @ 0x8cfaec
// > ERR_load_COMP_strings @ 0x8cfb30
// > ERR_load_CONF_strings @ 0x8cfb74
// > ERR_load_CRYPTO_strings @ 0x8cfbb8
// > ERR_load_CT_strings @ 0x8cfbfc
// > ERR_load_DH_strings @ 0x8d086c
// > ERR_load_DSA_strings @ 0x8d0e58
// > ERR_load_DSO_strings @ 0x8d0fdc
// > ERR_load_EC_strings @ 0x8d1bcc
// > ERR_load_ENGINE_strings @ 0x8d1c10
// > ??> @ 0x5e0fc
//
// 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 ERR_func_error_string(int a1)
{
int v2; // r5
unsigned int v4[3]; // [sp+0h] [bp-Ch] BYREF
if ( !CRYPTO_THREAD_run_once(&unk_AD2EC0, sub_7F9708) || !dword_AD2EB4 )
return 0;
v4[0] = a1 & 0xFFFFF000;
CRYPTO_THREAD_read_lock(dword_AD2EB0);
if ( !dword_AD2EC4 )
{
CRYPTO_THREAD_unlock(dword_AD2EB0);
return 0;
}
v2 = OPENSSL_LH_retrieve(dword_AD2EC4, v4);
CRYPTO_THREAD_unlock(dword_AD2EB0);
if ( !v2 )
return 0;
return *(_DWORD *)(v2 + 4);
}