//
// ossl_init_thread_start from 0xdb1ea8 to 0xdb1f40 (152 bytes)
//
// 3 xrefs:
// > ASYNC_init_thread @ 0xd70f40
// > ERR_get_state @ 0xda002c
// > ??> @ 0x5d018
//
// 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 ossl_init_thread_start(char a1)
{
_DWORD *local; // x20
__int64 result; // x0
local = (_DWORD *)CRYPTO_THREAD_get_local(&unk_125F0AC);
if ( !local )
{
local = (_DWORD *)CRYPTO_zalloc(8, "crypto/init.c", 45);
CRYPTO_THREAD_set_local(&unk_125F0AC, local);
if ( !local )
return 0;
}
if ( (a1 & 1) != 0 )
*local = 1;
result = 1;
if ( (a1 & 2) != 0 )
local[1] = 1;
return result;
}