def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("TargetImage", default="").endswith("\\calc.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\calculator.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\mspaint.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\notepad.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\ping.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\sethc.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\spoolsv.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\wordpad.exe"),
                    event.deep_get("TargetImage", default="").endswith("\\write.exe"),
                ]
            ),
            not any(
                [
                    event.deep_get("SourceImage", default="") == "C:\\Windows\\System32\\csrss.exe",
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            in [
                                "C:\\Windows\\System32\\explorer.exe",
                                "C:\\Windows\\System32\\OpenWith.exe",
                            ],
                            event.deep_get("TargetImage", default="")
                            == "C:\\Windows\\System32\\notepad.exe",
                        ]
                    ),
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            == "C:\\Windows\\System32\\AtBroker.exe",
                            event.deep_get("TargetImage", default="")
                            == "C:\\Windows\\System32\\Sethc.exe",
                        ]
                    ),
                ]
            ),
            not any(
                [
                    event.deep_get("StartFunction", default="") == "EtwpNotificationThread",
                    "unknown process" in event.deep_get("SourceImage", default=""),
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            == "C:\\Program Files\\VMware\\VMware Tools\\vmtoolsd.exe",
                            event.deep_get("StartFunction", default="") == "GetCommandLineW",
                            event.deep_get("TargetImage", default="")
                            in [
                                "C:\\Windows\\System32\\notepad.exe",
                                "C:\\Windows\\System32\\spoolsv.exe",
                            ],
                        ]
                    ),
                    all(
                        [
                            event.deep_get("SourceImage", default="")
                            == "C:\\Program Files\\Xerox\\XeroxPrintExperience\\CommonFiles\\XeroxPrintJobEventManagerService.exe",
                            event.deep_get("StartFunction", default="") == "LoadLibraryW",
                            event.deep_get("TargetImage", default="")
                            == "C:\\Windows\\System32\\spoolsv.exe",
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
