def rule(event):
    if all(
        [
            "\\SOFTWARE\\ODBC\\ODBCINST.INI\\" in event.deep_get("TargetObject", default=""),
            event.deep_get("TargetObject", default="").endswith("\\Driver"),
            not all(
                [
                    "\\SQL Server\\" in event.deep_get("TargetObject", default=""),
                    event.deep_get("Details", default="") == "%WINDIR%\\System32\\SQLSRV32.dll",
                ]
            ),
            not any(
                [
                    all(
                        [
                            "\\Microsoft Access " in event.deep_get("TargetObject", default=""),
                            event.deep_get("Details", default="").startswith("C:\\Progra"),
                            event.deep_get("Details", default="").endswith("\\ACEODBC.DLL"),
                        ]
                    ),
                    all(
                        [
                            "\\Microsoft Excel Driver"
                            in event.deep_get("TargetObject", default=""),
                            event.deep_get("Details", default="").startswith("C:\\Progra"),
                            event.deep_get("Details", default="").endswith("\\ACEODBC.DLL"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
