def rule(event):
    if all(
        [
            any(
                [
                    all(
                        [
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                            "copy " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith(
                                        "\\powershell.exe"
                                    ),
                                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                                ]
                            ),
                            any(
                                [
                                    "copy-item" in event.deep_get("CommandLine", default=""),
                                    " copy " in event.deep_get("CommandLine", default=""),
                                    "cpi " in event.deep_get("CommandLine", default=""),
                                    " cp " in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    any(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\robocopy.exe"),
                                    event.deep_get("Image", default="").endswith("\\xcopy.exe"),
                                ]
                            ),
                            event.deep_get("OriginalFileName", default="")
                            in ["robocopy.exe", "XCOPY.EXE"],
                        ]
                    ),
                ]
            ),
            any(
                [
                    "\\System32" in event.deep_get("CommandLine", default=""),
                    "\\SysWOW64" in event.deep_get("CommandLine", default=""),
                    "\\WinSxS" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    "\\bitsadmin.exe" in event.deep_get("CommandLine", default=""),
                    "\\calc.exe" in event.deep_get("CommandLine", default=""),
                    "\\certutil.exe" in event.deep_get("CommandLine", default=""),
                    "\\cmdl32.exe" in event.deep_get("CommandLine", default=""),
                    "\\cscript.exe" in event.deep_get("CommandLine", default=""),
                    "\\mshta.exe" in event.deep_get("CommandLine", default=""),
                    "\\rundll32.exe" in event.deep_get("CommandLine", default=""),
                    "\\wscript.exe" in event.deep_get("CommandLine", default=""),
                    "\\ie4uinit.exe" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
