//
// ENGINE_ctrl_cmd from 0x7f6828 to 0x7f6918 (240 bytes)
//
// 2 xrefs:
// > sub_643938 @ 0x6442f6
// > ??> @ 0x5538c
//
// 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
//
bool __fastcall ENGINE_ctrl_cmd(_DWORD *a1, const char *a2, unsigned int a3, const char *a4, int a5, int a6)
{
bool v6; // zf
_DWORD *v7; // r4
v6 = a2 == nullptr;
if ( a2 )
v6 = a1 == nullptr;
if ( v6 )
{
ERR_put_error(38, 178, 67, "crypto/engine/eng_ctrl.c", 207);
return 0;
}
else
{
v7 = a1;
if ( a1[14] && (a1 = (_DWORD *)ENGINE_ctrl(a1, 13, 0, a2, 0), (int)a1 > 0) )
{
return ENGINE_ctrl(v7, (int)a1, a3, a4, a5) > 0;
}
else if ( a6 )
{
ERR_clear_error(a1);
return 1;
}
else
{
ERR_put_error(38, 178, 137, "crypto/engine/eng_ctrl.c", 225);
return 0;
}
}
}