def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 4738,
            any(
                [
                    all(
                        [
                            any(
                                [
                                    event.deep_get("NewUacValue", default="").endswith("8???"),
                                    event.deep_get("NewUacValue", default="").endswith("9???"),
                                    event.deep_get("NewUacValue", default="").endswith("A???"),
                                    event.deep_get("NewUacValue", default="").endswith("B???"),
                                    event.deep_get("NewUacValue", default="").endswith("C???"),
                                    event.deep_get("NewUacValue", default="").endswith("D???"),
                                    event.deep_get("NewUacValue", default="").endswith("E???"),
                                    event.deep_get("NewUacValue", default="").endswith("F???"),
                                ]
                            ),
                            not any(
                                [
                                    event.deep_get("OldUacValue", default="").endswith("8???"),
                                    event.deep_get("OldUacValue", default="").endswith("9???"),
                                    event.deep_get("OldUacValue", default="").endswith("A???"),
                                    event.deep_get("OldUacValue", default="").endswith("B???"),
                                    event.deep_get("OldUacValue", default="").endswith("C???"),
                                    event.deep_get("OldUacValue", default="").endswith("D???"),
                                    event.deep_get("OldUacValue", default="").endswith("E???"),
                                    event.deep_get("OldUacValue", default="").endswith("F???"),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("NewUacValue", default="").endswith("1????"),
                                    event.deep_get("NewUacValue", default="").endswith("3????"),
                                    event.deep_get("NewUacValue", default="").endswith("5????"),
                                    event.deep_get("NewUacValue", default="").endswith("7????"),
                                    event.deep_get("NewUacValue", default="").endswith("9????"),
                                    event.deep_get("NewUacValue", default="").endswith("B????"),
                                    event.deep_get("NewUacValue", default="").endswith("D????"),
                                    event.deep_get("NewUacValue", default="").endswith("F????"),
                                ]
                            ),
                            not any(
                                [
                                    event.deep_get("OldUacValue", default="").endswith("1????"),
                                    event.deep_get("OldUacValue", default="").endswith("3????"),
                                    event.deep_get("OldUacValue", default="").endswith("5????"),
                                    event.deep_get("OldUacValue", default="").endswith("7????"),
                                    event.deep_get("OldUacValue", default="").endswith("9????"),
                                    event.deep_get("OldUacValue", default="").endswith("B????"),
                                    event.deep_get("OldUacValue", default="").endswith("D????"),
                                    event.deep_get("OldUacValue", default="").endswith("F????"),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("NewUacValue", default="").endswith("8??"),
                                    event.deep_get("NewUacValue", default="").endswith("9??"),
                                    event.deep_get("NewUacValue", default="").endswith("A??"),
                                    event.deep_get("NewUacValue", default="").endswith("B??"),
                                    event.deep_get("NewUacValue", default="").endswith("C??"),
                                    event.deep_get("NewUacValue", default="").endswith("D??"),
                                    event.deep_get("NewUacValue", default="").endswith("E??"),
                                    event.deep_get("NewUacValue", default="").endswith("F??"),
                                ]
                            ),
                            not any(
                                [
                                    event.deep_get("OldUacValue", default="").endswith("8??"),
                                    event.deep_get("OldUacValue", default="").endswith("9??"),
                                    event.deep_get("OldUacValue", default="").endswith("A??"),
                                    event.deep_get("OldUacValue", default="").endswith("B??"),
                                    event.deep_get("OldUacValue", default="").endswith("C??"),
                                    event.deep_get("OldUacValue", default="").endswith("D??"),
                                    event.deep_get("OldUacValue", default="").endswith("E??"),
                                    event.deep_get("OldUacValue", default="").endswith("F??"),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
