//
// ENGINE_ctrl_cmd from 0xd9c85c to 0xd9c968 (268 bytes)
//
// 2 xrefs:
// > sub_BB78D0 @ 0xbb8624
// > ??> @ 0x4a628
//
// 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(__int64 a1, const char *a2, __int64 a3, const char *a4, __int64 a5, int a6)
{
__int64 v6; // x19
int v11; // [xsp+38h] [xbp+38h]
v6 = a1;
if ( a1 && a2 )
{
if ( *(_QWORD *)(a1 + 112) && (v11 = a6, a1 = ENGINE_ctrl(a1, 13, 0, a2, 0), a6 = v11, (int)a1 > 0) )
{
return (int)ENGINE_ctrl(v6, (unsigned 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;
}
}
else
{
ERR_put_error(38, 178, 67, "crypto/engine/eng_ctrl.c", 207);
return 0;
}
}