//
// ENGINE_load_public_key from 0xa0cf70 to 0xa0d088 (280 bytes)
//
// 1 xrefs:
// > ??> @ 0x7c01c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:44 +0000
//
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;
}