def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\sc.exe"),
            event.deep_get("OriginalFileName", default="") == "sc.exe",
            " query" in event.deep_get("CommandLine", default=""),
            not event.deep_get("CommandLine", default="") == "sc query dokan1",
        ]
    ):
        return True
    return False
