def rule(event):
    if all(
        [
            event.deep_get("Provider_Name", default="") == "Service Control Manager",
            event.deep_get("EventID", default="") == 7045,
            any(
                [
                    any(
                        [
                            " -c " in event.deep_get("ImagePath", default=""),
                            " /c " in event.deep_get("ImagePath", default=""),
                            " –c " in event.deep_get("ImagePath", default=""),
                            " —c " in event.deep_get("ImagePath", default=""),
                            " ―c " in event.deep_get("ImagePath", default=""),
                        ]
                    ),
                    any(
                        [
                            " -r " in event.deep_get("ImagePath", default=""),
                            " /r " in event.deep_get("ImagePath", default=""),
                            " –r " in event.deep_get("ImagePath", default=""),
                            " —r " in event.deep_get("ImagePath", default=""),
                            " ―r " in event.deep_get("ImagePath", default=""),
                        ]
                    ),
                    any(
                        [
                            " -k " in event.deep_get("ImagePath", default=""),
                            " /k " in event.deep_get("ImagePath", default=""),
                            " –k " in event.deep_get("ImagePath", default=""),
                            " —k " in event.deep_get("ImagePath", default=""),
                            " ―k " in event.deep_get("ImagePath", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    "cscript" in event.deep_get("ImagePath", default=""),
                    "mshta" in event.deep_get("ImagePath", default=""),
                    "powershell" in event.deep_get("ImagePath", default=""),
                    "pwsh" in event.deep_get("ImagePath", default=""),
                    "regsvr32" in event.deep_get("ImagePath", default=""),
                    "rundll32" in event.deep_get("ImagePath", default=""),
                    "wscript" in event.deep_get("ImagePath", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
