def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            all(
                                [
                                    event.deep_get("OriginalFileName", default="") == "",
                                    event.deep_get("CommandLine", default="").endswith(
                                        ".exe tunnel"
                                    ),
                                ]
                            ),
                            all(
                                [
                                    ".exe tunnel" in event.deep_get("CommandLine", default=""),
                                    "--accept-server-license-terms"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    "tunnel " in event.deep_get("CommandLine", default=""),
                                    "service" in event.deep_get("CommandLine", default=""),
                                    "internal-run" in event.deep_get("CommandLine", default=""),
                                    "tunnel-service.log"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    not any(
                        [
                            event.deep_get("Image", default="").endswith("\\code-tunnel.exe"),
                            event.deep_get("Image", default="").endswith("\\code.exe"),
                        ]
                    ),
                ]
            ),
            all(
                [
                    event.deep_get("ParentCommandLine", default="").endswith(" tunnel"),
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    "/d /c " in event.deep_get("CommandLine", default=""),
                    "\\servers\\Stable-" in event.deep_get("CommandLine", default=""),
                    "code-server.cmd" in event.deep_get("CommandLine", default=""),
                    not any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\code-tunnel.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\code.exe"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
