def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\winrs.exe"),
                            event.deep_get("OriginalFileName", default="") == "winrs.exe",
                        ]
                    ),
                    any(
                        [
                            any(
                                [
                                    "-r:localhost" in event.deep_get("CommandLine", default=""),
                                    "/r:localhost" in event.deep_get("CommandLine", default=""),
                                    "–r:localhost" in event.deep_get("CommandLine", default=""),
                                    "—r:localhost" in event.deep_get("CommandLine", default=""),
                                    "―r:localhost" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "-r:127.0.0.1" in event.deep_get("CommandLine", default=""),
                                    "/r:127.0.0.1" in event.deep_get("CommandLine", default=""),
                                    "–r:127.0.0.1" in event.deep_get("CommandLine", default=""),
                                    "—r:127.0.0.1" in event.deep_get("CommandLine", default=""),
                                    "―r:127.0.0.1" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "-r:[::1]" in event.deep_get("CommandLine", default=""),
                                    "/r:[::1]" in event.deep_get("CommandLine", default=""),
                                    "–r:[::1]" in event.deep_get("CommandLine", default=""),
                                    "—r:[::1]" in event.deep_get("CommandLine", default=""),
                                    "―r:[::1]" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "-remote:localhost"
                                    in event.deep_get("CommandLine", default=""),
                                    "/remote:localhost"
                                    in event.deep_get("CommandLine", default=""),
                                    "–remote:localhost"
                                    in event.deep_get("CommandLine", default=""),
                                    "—remote:localhost"
                                    in event.deep_get("CommandLine", default=""),
                                    "―remote:localhost"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "-remote:127.0.0.1"
                                    in event.deep_get("CommandLine", default=""),
                                    "/remote:127.0.0.1"
                                    in event.deep_get("CommandLine", default=""),
                                    "–remote:127.0.0.1"
                                    in event.deep_get("CommandLine", default=""),
                                    "—remote:127.0.0.1"
                                    in event.deep_get("CommandLine", default=""),
                                    "―remote:127.0.0.1"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "-remote:[::1]" in event.deep_get("CommandLine", default=""),
                                    "/remote:[::1]" in event.deep_get("CommandLine", default=""),
                                    "–remote:[::1]" in event.deep_get("CommandLine", default=""),
                                    "—remote:[::1]" in event.deep_get("CommandLine", default=""),
                                    "―remote:[::1]" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\winrs.exe"),
                            event.deep_get("OriginalFileName", default="") == "winrs.exe",
                        ]
                    ),
                    not any(
                        [
                            any(
                                [
                                    "-r:" in event.deep_get("CommandLine", default=""),
                                    "/r:" in event.deep_get("CommandLine", default=""),
                                    "–r:" in event.deep_get("CommandLine", default=""),
                                    "—r:" in event.deep_get("CommandLine", default=""),
                                    "―r:" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "-remote:" in event.deep_get("CommandLine", default=""),
                                    "/remote:" in event.deep_get("CommandLine", default=""),
                                    "–remote:" in event.deep_get("CommandLine", default=""),
                                    "—remote:" in event.deep_get("CommandLine", default=""),
                                    "―remote:" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
