//
// ERR_lib_error_string from 0xd9fad0 to 0xd9fb74 (164 bytes)
//
// 2 xrefs:
// > ERR_error_string_n @ 0xd9fd38
// > ??> @ 0x60168
//
// 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_lib_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 & 0xFF000000;
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);
}