//
// ERR_lib_error_string from 0x101de30 to 0x101ded4 (164 bytes)
//
// 2 xrefs:
// > ERR_error_string_n @ 0x101e098
// > ??> @ 0x832c0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:16:09 +0000
//
__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_1566C78, sub_101D8A8) || !dword_1566468 )
return 0;
v4 = a1 & 0xFF000000;
CRYPTO_THREAD_read_lock(qword_1566460);
if ( !qword_1566C80 )
{
CRYPTO_THREAD_unlock(qword_1566460);
return 0;
}
v2 = OPENSSL_LH_retrieve(qword_1566C80, &v4);
CRYPTO_THREAD_unlock(qword_1566460);
if ( !v2 )
return 0;
return *(_QWORD *)(v2 + 8);
}