def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\AnyDesk.exe"),
                    event.deep_get("Description", default="") == "AnyDesk",
                    event.deep_get("Product", default="") == "AnyDesk",
                    event.deep_get("Company", default="") == "AnyDesk Software GmbH",
                ]
            ),
            any(
                [
                    event.deep_get("FileVersion", default="").startswith("7.0."),
                    event.deep_get("FileVersion", default="").startswith("7.1."),
                    event.deep_get("FileVersion", default="").startswith("8.0.1"),
                    event.deep_get("FileVersion", default="").startswith("8.0.2"),
                    event.deep_get("FileVersion", default="").startswith("8.0.3"),
                    event.deep_get("FileVersion", default="").startswith("8.0.4"),
                    event.deep_get("FileVersion", default="").startswith("8.0.5"),
                    event.deep_get("FileVersion", default="").startswith("8.0.6"),
                    event.deep_get("FileVersion", default="").startswith("8.0.7"),
                ]
            ),
            not any(
                [
                    " --remove" in event.deep_get("CommandLine", default=""),
                    " --uninstall" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
