def rule(event):
    if all(
        [
            any(
                [
                    "Software\\Microsoft\\Windows NT\\CurrentVersion\\Accessibility\\ATs"
                    in event.deep_get("TargetObject", default=""),
                    "Software\\Microsoft\\Windows NT\\CurrentVersion\\Accessibility\\Configuration"
                    in event.deep_get("TargetObject", default=""),
                ]
            ),
            not any(
                [
                    all(
                        [
                            event.deep_get("Image", default="")
                            == "C:\\Windows\\system32\\atbroker.exe",
                            "\\Microsoft\\Windows NT\\CurrentVersion\\Accessibility\\Configuration"
                            in event.deep_get("TargetObject", default=""),
                            event.deep_get("Details", default="") == "(Empty)",
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\Installer\\MSI"
                            ),
                            "Software\\Microsoft\\Windows NT\\CurrentVersion\\Accessibility\\ATs"
                            in event.deep_get("TargetObject", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
