def rule(event):
    if all(
        [
            "\\SOFTWARE\\Microsoft\\Office\\" in event.deep_get("TargetObject", default=""),
            "\\Security\\ProtectedView\\" in event.deep_get("TargetObject", default=""),
            any(
                [
                    all(
                        [
                            event.deep_get("Details", default="") == "DWORD (0x00000001)",
                            any(
                                [
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\DisableAttachementsInPV"
                                    ),
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\DisableInternetFilesInPV"
                                    ),
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\DisableIntranetCheck"
                                    ),
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\DisableUnsafeLocationsInPV"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Details", default="") == "DWORD (0x00000000)",
                            any(
                                [
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\enabledatabasefileprotectedview"
                                    ),
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\enableforeigntextfileprotectedview"
                                    ),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
