//
// ENGINE_load_public_key from 0x7f8370 to 0x7f8488 (280 bytes)
//
// 1 xrefs:
// > ??> @ 0x6259c
//
// 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 ENGINE_load_public_key(int a1, int a2, int a3, int a4)
{
int (__fastcall *v8)(int, int, int, int); // r4
int result; // r0
if ( a1 )
{
CRYPTO_THREAD_write_lock(global_engine_lock);
if ( *(_DWORD *)(a1 + 84) )
{
CRYPTO_THREAD_unlock(global_engine_lock);
v8 = *(int (__fastcall **)(int, int, int, int))(a1 + 64);
if ( v8 )
{
result = v8(a1, a2, a3, a4);
if ( !result )
{
ERR_put_error(38, 151, 129, "crypto/engine/eng_pkey.c", 108);
return 0;
}
}
else
{
ERR_put_error(38, 151, 125, "crypto/engine/eng_pkey.c", 102);
return 0;
}
}
else
{
CRYPTO_THREAD_unlock(global_engine_lock);
ERR_put_error(38, 151, 117, "crypto/engine/eng_pkey.c", 97);
return 0;
}
}
else
{
ERR_put_error(38, 151, 67, "crypto/engine/eng_pkey.c", 91);
return 0;
}
return result;
}