def rule(event):
    if all(
        [
            event.deep_get("Provider_Name", default="") == "Service Control Manager",
            event.deep_get("EventID", default="") == 7045,
            any(
                [
                    any(
                        [
                            "\\\\.\\pipe" in event.deep_get("ImagePath", default=""),
                            "\\Users\\Public\\" in event.deep_get("ImagePath", default=""),
                            "\\Windows\\Temp\\" in event.deep_get("ImagePath", default=""),
                        ]
                    ),
                    all(
                        [
                            " -e" in event.deep_get("ImagePath", default=""),
                            any(
                                [
                                    " aQBlAHgA" in event.deep_get("ImagePath", default=""),
                                    " aWV4I" in event.deep_get("ImagePath", default=""),
                                    " IAB" in event.deep_get("ImagePath", default=""),
                                    " JAB" in event.deep_get("ImagePath", default=""),
                                    " PAA" in event.deep_get("ImagePath", default=""),
                                    " SQBFAFgA" in event.deep_get("ImagePath", default=""),
                                    " SUVYI" in event.deep_get("ImagePath", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
            not event.deep_get("ImagePath", default="").startswith(
                "C:\\ProgramData\\Microsoft\\Windows Defender\\Definition Updates\\"
            ),
            not event.deep_get("ImagePath", default="").startswith(
                "C:\\WINDOWS\\TEMP\\thor10-remote\\thor64.exe"
            ),
        ]
    ):
        return True
    return False
