//
// ERR_lib_error_string from 0x7f9d28 to 0x7f9dc4 (156 bytes)
//
// 2 xrefs:
// > ERR_error_string_n @ 0x7f9f88
// > ??> @ 0x628fc
//
// 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_lib_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 & 0xFF000000;
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);
}