def rule(event):
    if all(
        [
            "\\System\\CurrentControlSet\\Services\\WinSock2\\Parameters"
            in event.deep_get("TargetObject", default=""),
            any(
                [
                    "\\Protocol_Catalog9\\Catalog_Entries"
                    in event.deep_get("TargetObject", default=""),
                    "\\NameSpace_Catalog5\\Catalog_Entries"
                    in event.deep_get("TargetObject", default=""),
                ]
            ),
            not any(
                [
                    event.deep_get("Details", default="") == "(Empty)",
                    event.deep_get("Image", default="") == "C:\\Windows\\System32\\MsiExec.exe",
                    event.deep_get("Image", default="") == "C:\\Windows\\syswow64\\MsiExec.exe",
                ]
            ),
        ]
    ):
        return True
    return False
