def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("SourceImage", default="").endswith("\\bash.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\cscript.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\cvtres.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\defrag.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\dialer.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\dnx.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\esentutl.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\excel.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\expand.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\find.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\findstr.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\forfiles.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\gpupdate.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\hh.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\installutil.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\lync.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\makecab.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\mDNSResponder.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\monitoringhost.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\msbuild.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\mshta.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\mspaint.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\outlook.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\ping.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\provtool.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\python.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\robocopy.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\runonce.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\sapcimc.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\smartscreen.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\spoolsv.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\tstheme.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\userinit.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\vssadmin.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\vssvc.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\w3wp.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\winscp.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\winword.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\wmic.exe"),
                    event.deep_get("SourceImage", default="").endswith("\\wscript.exe"),
                ]
            ),
            not any(
                [
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            in [
                                "C:\\Windows\\System32\\Defrag.exe",
                                "C:\\Windows\\System32\\makecab.exe",
                            ],
                            event.deep_get("TargetImage", default="")
                            == "C:\\Windows\\System32\\conhost.exe",
                        ]
                    ),
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            == "C:\\Windows\\System32\\provtool.exe",
                            event.deep_get("TargetImage", default="")
                            == "C:\\Windows\\System32\\svchost.exe",
                        ]
                    ),
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            == "C:\\Windows\\System32\\provtool.exe",
                            event.deep_get("TargetImage", default="") == "System",
                        ]
                    ),
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            == "C:\\Windows\\System32\\userinit.exe",
                            event.deep_get("TargetImage", default="")
                            == "C:\\Windows\\explorer.exe",
                        ]
                    ),
                    all(
                        [
                            event.deep_get("SourceImage", default="").endswith("\\WINWORD.EXE"),
                            any(
                                [
                                    event.deep_get("TargetImage", default="").startswith(
                                        "C:\\Program Files (x86)\\"
                                    ),
                                    event.deep_get("TargetImage", default="").startswith(
                                        "C:\\Program Files\\"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("SourceImage", default="").startswith(
                                        "C:\\Program Files\\Microsoft Office\\"
                                    ),
                                    event.deep_get("SourceImage", default="").startswith(
                                        "C:\\Program Files (x86)\\Microsoft Office\\"
                                    ),
                                ]
                            ),
                            event.deep_get("TargetImage", default="") == "System",
                        ]
                    ),
                ]
            ),
            not all(
                [
                    event.deep_get("SourceImage", default="").endswith("\\SysWOW64\\explorer.exe"),
                    event.deep_get("TargetImage", default="")
                    in [
                        "C:\\Program Files (x86)\\VMware\\VMware Tools\\vmtoolsd.exe",
                        "C:\\Program Files\\VMware\\VMware Tools\\vmtoolsd.exe",
                    ],
                ]
            ),
        ]
    ):
        return True
    return False
