def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\cmd.exe"),
            any(
                [
                    any(
                        [
                            " -c " in event.deep_get("ParentCommandLine", default=""),
                            " /c " in event.deep_get("ParentCommandLine", default=""),
                            " –c " in event.deep_get("ParentCommandLine", default=""),
                            " —c " in event.deep_get("ParentCommandLine", default=""),
                            " ―c " in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            " -r " in event.deep_get("ParentCommandLine", default=""),
                            " /r " in event.deep_get("ParentCommandLine", default=""),
                            " –r " in event.deep_get("ParentCommandLine", default=""),
                            " —r " in event.deep_get("ParentCommandLine", default=""),
                            " ―r " in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            " -k " in event.deep_get("ParentCommandLine", default=""),
                            " /k " in event.deep_get("ParentCommandLine", default=""),
                            " –k " in event.deep_get("ParentCommandLine", default=""),
                            " —k " in event.deep_get("ParentCommandLine", default=""),
                            " ―k " in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                ]
            ),
            event.deep_get("Image", default="").endswith("\\chcp.com"),
            any(
                [
                    event.deep_get("CommandLine", default="").endswith("chcp"),
                    event.deep_get("CommandLine", default="").endswith("chcp "),
                    event.deep_get("CommandLine", default="").endswith("chcp  "),
                ]
            ),
        ]
    ):
        return True
    return False
