//
// ERR_unload_strings from 0x7f9bec to 0x7f9cb8 (204 bytes)
//
// 1 xrefs:
// > ??> @ 0x628ec
//
// 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_unload_strings(int a1, int *a2)
{
int result; // r0
int v5; // r0
int v6; // r3
bool v7; // zf
int v8; // r6
int v9; // t1
int v10; // t1
result = CRYPTO_THREAD_run_once(&unk_AD2EC0, sub_7F9708);
if ( result )
{
result = dword_AD2EB4;
if ( dword_AD2EB4 )
{
CRYPTO_THREAD_write_lock(dword_AD2EB0);
v5 = dword_AD2EC4;
if ( dword_AD2EC4 )
{
v6 = *a2;
if ( *a2 )
{
v7 = a1 == 0;
v8 = a1 << 24;
if ( v7 )
{
while ( 1 )
{
OPENSSL_LH_delete(v5, a2);
v9 = a2[2];
a2 += 2;
if ( !v9 )
break;
v5 = dword_AD2EC4;
}
}
else
{
while ( 1 )
{
*a2 = v6 | v8;
OPENSSL_LH_delete(v5, a2);
v10 = a2[2];
a2 += 2;
v6 = v10;
if ( !v10 )
break;
v5 = dword_AD2EC4;
}
}
}
}
CRYPTO_THREAD_unlock(dword_AD2EB0);
return 1;
}
}
return result;
}