def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\wermgr.exe"),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\cscript.exe"),
                    event.deep_get("Image", default="").endswith("\\ipconfig.exe"),
                    event.deep_get("Image", default="").endswith("\\mshta.exe"),
                    event.deep_get("Image", default="").endswith("\\net.exe"),
                    event.deep_get("Image", default="").endswith("\\net1.exe"),
                    event.deep_get("Image", default="").endswith("\\netstat.exe"),
                    event.deep_get("Image", default="").endswith("\\nslookup.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell_ise.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                    event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                    event.deep_get("Image", default="").endswith("\\systeminfo.exe"),
                    event.deep_get("Image", default="").endswith("\\whoami.exe"),
                    event.deep_get("Image", default="").endswith("\\wscript.exe"),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                    "C:\\Windows\\system32\\WerConCpl.dll"
                    in event.deep_get("CommandLine", default=""),
                    "LaunchErcApp " in event.deep_get("CommandLine", default=""),
                    any(
                        [
                            "-queuereporting" in event.deep_get("CommandLine", default=""),
                            "-responsepester" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
