def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("TargetFilename", default="").endswith("\\AtBroker.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\audiodg.exe"),
                    event.deep_get("TargetFilename", default="").endswith(
                        "\\backgroundTaskHost.exe"
                    ),
                    event.deep_get("TargetFilename", default="").endswith("\\bcdedit.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\bitsadmin.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\cmdl32.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\cmstp.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\conhost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\csrss.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\dasHost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\dfrgui.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\dllhost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\dwm.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\eventcreate.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\eventvwr.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\explorer.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\extrac32.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\fontdrvhost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\fsquirt.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\ipconfig.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\iscsicli.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\iscsicpl.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\logman.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\LogonUI.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\LsaIso.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\lsass.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\lsm.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\msiexec.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\msinfo32.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\mstsc.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\nbtstat.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\odbcconf.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\powershell.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\pwsh.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\regini.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\rundll32.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\RuntimeBroker.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\schtasks.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\SearchFilterHost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\SearchIndexer.exe"),
                    event.deep_get("TargetFilename", default="").endswith(
                        "\\SearchProtocolHost.exe"
                    ),
                    event.deep_get("TargetFilename", default="").endswith(
                        "\\SecurityHealthService.exe"
                    ),
                    event.deep_get("TargetFilename", default="").endswith(
                        "\\SecurityHealthSystray.exe"
                    ),
                    event.deep_get("TargetFilename", default="").endswith("\\services.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\ShellAppRuntime.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\sihost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\smartscreen.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\smss.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\spoolsv.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\svchost.exe"),
                    event.deep_get("TargetFilename", default="").endswith(
                        "\\SystemSettingsBroker.exe"
                    ),
                    event.deep_get("TargetFilename", default="").endswith("\\taskhost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\taskhostw.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\Taskmgr.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\TiWorker.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\vssadmin.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\w32tm.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\WerFault.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\WerFaultSecure.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\wermgr.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\wevtutil.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\wininit.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\winlogon.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\winrshost.exe"),
                    event.deep_get("TargetFilename", default="").endswith(
                        "\\WinRTNetMUAHostServer.exe"
                    ),
                    event.deep_get("TargetFilename", default="").endswith("\\wlanext.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\wlrmdr.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\WmiPrvSE.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\wslhost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\WSReset.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\WUDFHost.exe"),
                    event.deep_get("TargetFilename", default="").endswith("\\WWAHost.exe"),
                ]
            ),
            not any(
                [
                    any(
                        [
                            "C:\\$WINDOWS.~BT\\" in event.deep_get("TargetFilename", default=""),
                            "C:\\$WinREAgent\\" in event.deep_get("TargetFilename", default=""),
                            "C:\\Windows\\SoftwareDistribution\\"
                            in event.deep_get("TargetFilename", default=""),
                            "C:\\Windows\\System32\\"
                            in event.deep_get("TargetFilename", default=""),
                            "C:\\Windows\\SysWOW64\\"
                            in event.deep_get("TargetFilename", default=""),
                            "C:\\Windows\\WinSxS\\" in event.deep_get("TargetFilename", default=""),
                            "C:\\Windows\\uus\\" in event.deep_get("TargetFilename", default=""),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\TiWorker.exe"),
                                    event.deep_get("Image", default="").endswith(
                                        "\\wuaucltcore.exe"
                                    ),
                                ]
                            ),
                            event.deep_get("TargetFilename", default="").startswith(
                                "C:\\Windows\\Temp\\"
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith(
                                        "C:\\Windows\\system32\\svchost.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith(
                                        "C:\\Windows\\SysWOW64\\svchost.exe"
                                    ),
                                ]
                            ),
                            any(
                                [
                                    "C:\\Program Files\\WindowsApps\\"
                                    in event.deep_get("TargetFilename", default=""),
                                    "C:\\Program Files (x86)\\WindowsApps\\"
                                    in event.deep_get("TargetFilename", default=""),
                                    "\\AppData\\Local\\Microsoft\\WindowsApps\\"
                                    in event.deep_get("TargetFilename", default=""),
                                ]
                            ),
                        ]
                    ),
                    event.deep_get("Image", default="")
                    in [
                        "C:\\Windows\\System32\\wuauclt.exe",
                        "C:\\Windows\\SysWOW64\\wuauclt.exe",
                        "C:\\Windows\\UUS\\arm64\\wuaucltcore.exe",
                    ],
                    event.deep_get("TargetFilename", default="").endswith(
                        "C:\\Windows\\explorer.exe"
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith(
                                        "C:\\WINDOWS\\system32\\msiexec.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith(
                                        "C:\\WINDOWS\\SysWOW64\\msiexec.exe"
                                    ),
                                ]
                            ),
                            any(
                                [
                                    event.deep_get("TargetFilename", default="").startswith(
                                        "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
                                    ),
                                    event.deep_get("TargetFilename", default="").startswith(
                                        "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe"
                                    ),
                                    event.deep_get("TargetFilename", default="").startswith(
                                        "C:\\Program Files\\WindowsApps\\Microsoft.PowerShellPreview\\"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            "C:\\Windows\\System32\\SecurityHealth\\"
                            in event.deep_get("TargetFilename", default=""),
                            event.deep_get("TargetFilename", default="").endswith(
                                "\\SecurityHealthSystray.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                "\\SecurityHealthSetup.exe"
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
