def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\regsvr32.exe"),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\calc.exe"),
                    event.deep_get("Image", default="").endswith("\\cscript.exe"),
                    event.deep_get("Image", default="").endswith("\\explorer.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("\\nltest.exe"),
                    event.deep_get("Image", default="").endswith("\\notepad.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                    event.deep_get("Image", default="").endswith("\\reg.exe"),
                    event.deep_get("Image", default="").endswith("\\schtasks.exe"),
                    event.deep_get("Image", default="").endswith("\\werfault.exe"),
                    event.deep_get("Image", default="").endswith("\\wscript.exe"),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="").endswith("\\werfault.exe"),
                    " -u -p " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
