def rule(event):
    if all(
        [
            event.deep_get("ImageLoaded", default="").endswith("\\vss_ps.dll"),
            not any(
                [
                    all(
                        [
                            event.deep_get("Image", default="").startswith("C:\\Windows\\"),
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\clussvc.exe"),
                                    event.deep_get("Image", default="").endswith("\\dismhost.exe"),
                                    event.deep_get("Image", default="").endswith("\\dllhost.exe"),
                                    event.deep_get("Image", default="").endswith(
                                        "\\inetsrv\\appcmd.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith(
                                        "\\inetsrv\\iissetup.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith("\\msiexec.exe"),
                                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                                    event.deep_get("Image", default="").endswith(
                                        "\\searchindexer.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith("\\srtasks.exe"),
                                    event.deep_get("Image", default="").endswith("\\svchost.exe"),
                                    event.deep_get("Image", default="").endswith(
                                        "\\System32\\SystemPropertiesAdvanced.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith("\\taskhostw.exe"),
                                    event.deep_get("Image", default="").endswith("\\thor.exe"),
                                    event.deep_get("Image", default="").endswith("\\thor64.exe"),
                                    event.deep_get("Image", default="").endswith("\\tiworker.exe"),
                                    event.deep_get("Image", default="").endswith("\\vssvc.exe"),
                                    event.deep_get("Image", default="").endswith("\\vssadmin.exe"),
                                    event.deep_get("Image", default="").endswith("\\WmiPrvSE.exe"),
                                    event.deep_get("Image", default="").endswith(
                                        "\\wsmprovhost.exe"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("CommandLine", default="").startswith(
                                "C:\\$WinREAgent\\Scratch\\"
                            ),
                            "\\dismhost.exe {" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    event.deep_get("Image", default="") == "",
                ]
            ),
            not any(
                [
                    event.deep_get("Image", default="").startswith("C:\\Program Files\\"),
                    event.deep_get("Image", default="").startswith("C:\\Program Files (x86)\\"),
                ]
            ),
        ]
    ):
        return True
    return False
