//
// ENGINE_load_public_key from 0x101c568 to 0x101c684 (284 bytes)
//
// 1 xrefs:
// > ??> @ 0xd43c8
//
// 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:08 +0000
//
__int64 __fastcall ENGINE_load_public_key(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v4; // x19
__int64 (__fastcall *v5)(__int64, __int64, __int64, __int64); // x5
v4 = a1;
if ( a1 )
{
CRYPTO_THREAD_write_lock(global_engine_lock);
if ( *(_DWORD *)(v4 + 160) )
{
CRYPTO_THREAD_unlock(global_engine_lock);
v5 = *(__int64 (__fastcall **)(__int64, __int64, __int64, __int64))(v4 + 128);
if ( v5 )
{
v4 = v5(v4, a2, a3, a4);
if ( !v4 )
ERR_put_error(38, 151, 129, "crypto/engine/eng_pkey.c", 108);
}
else
{
v4 = 0;
ERR_put_error(38, 151, 125, "crypto/engine/eng_pkey.c", 102);
}
}
else
{
v4 = 0;
CRYPTO_THREAD_unlock(global_engine_lock);
ERR_put_error(38, 151, 117, "crypto/engine/eng_pkey.c", 97);
}
}
else
{
ERR_put_error(38, 151, 67, "crypto/engine/eng_pkey.c", 91);
}
return v4;
}