def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\cmd.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\cscript.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\mshta.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\powershell_ise.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\powershell.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\pwsh.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\wscript.exe"),
                ]
            ),
            event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
            not all(
                [
                    event.deep_get("ParentImage", default="") == "C:\\Windows\\System32\\cmd.exe",
                    event.deep_get("CommandLine", default="").endswith(
                        " /s C:\\Windows\\System32\\RpcProxy\\RpcProxy.dll"
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
