def rule(event):
    if all(
        [
            any(
                [
                    "~1\\" in event.deep_get("CommandLine", default=""),
                    "~2\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
            not any(
                [
                    event.deep_get("ParentImage", default="")
                    in ["C:\\Windows\\System32\\Dism.exe", "C:\\Windows\\System32\\cleanmgr.exe"],
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\winget.exe"),
                            "\\AppData\\Local\\Temp\\WinGet\\"
                            in event.deep_get("ParentImage", default=""),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Windows\\Microsoft.NET\\Framework64\\v"
                            ),
                            event.deep_get("ParentImage", default="").endswith("\\csc.exe"),
                        ]
                    ),
                    any(
                        [
                            all(
                                [
                                    "\\AppData\\" in event.deep_get("Image", default=""),
                                    "\\Temp\\" in event.deep_get("Image", default=""),
                                ]
                            ),
                            "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            not any(
                [
                    event.deep_get("ParentImage", default="")
                    == "C:\\Program Files\\GPSoftware\\Directory Opus\\dopus.exe",
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith(
                                "\\aurora-agent-64.exe"
                            ),
                            event.deep_get("ParentImage", default="").endswith(
                                "\\aurora-agent.exe"
                            ),
                        ]
                    ),
                    event.deep_get("ParentImage", default="").endswith("\\thor\\thor64.exe"),
                    any(
                        [
                            "C:\\Program Files\\Git\\post-install.bat"
                            in event.deep_get("CommandLine", default=""),
                            "C:\\Program Files\\Git\\cmd\\scalar.exe"
                            in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith(
                                "\\WebEx\\webexhost.exe"
                            ),
                            "\\appdata\\local\\webex\\webex64\\meetings\\wbxreport.exe"
                            in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    event.deep_get("ParentImage", default="").endswith("\\veeam.backup.shell.exe"),
                    event.deep_get("ParentImage", default="").endswith(
                        "\\Everything\\Everything.exe"
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
