//
// sub_E5DA40 from 0xe5da40 to 0xe5dafc (188 bytes)
//
// 2 xrefs:
// > engine_load_openssl_int @ 0xe5e0ac
// > engine_load_openssl_int @ 0xe5e0b4
//
// 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 sub_E5DA40(__int64 a1, __int64 *a2, _QWORD *a3, int a4)
{
unsigned int v4; // w3
__int64 v6; // x0
unsigned int *v7; // x0
int v8; // w21
_QWORD *v10; // [xsp+38h] [xbp+38h]
if ( a2 )
{
if ( a4 == 64 )
{
v6 = sub_E5D958();
v4 = 1;
*a2 = v6;
}
else
{
*a2 = 0;
return 0;
}
}
else
{
if ( dword_125F888 )
{
v4 = dword_125F88C;
}
else
{
v10 = a3;
v7 = (unsigned int *)sub_E5D958();
a3 = v10;
if ( v7 )
{
v8 = dword_125F88C++;
*((_DWORD *)&qword_125F880 + v8 + 4) = EVP_MD_type(v7);
a3 = v10;
}
v4 = dword_125F88C;
dword_125F888 = 1;
*((_DWORD *)&qword_125F880 + dword_125F88C + 4) = 0;
}
*a3 = &unk_125F890;
}
return v4;
}