def rule(event):
    if all(
        [
            any(
                [
                    all(
                        [
                            "\\Windows\\Installer\\" in event.deep_get("Image", default=""),
                            "msi" in event.deep_get("Image", default=""),
                            event.deep_get("Image", default="").endswith("tmp"),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").endswith("\\msiexec.exe"),
                            event.deep_get("IntegrityLevel", default="")
                            in ["System", "S-1-16-16384"],
                        ]
                    ),
                ]
            ),
            any(
                [
                    "AUTHORI" in event.deep_get("User", default=""),
                    "AUTORI" in event.deep_get("User", default=""),
                ]
            ),
            not any(
                [
                    event.deep_get("ParentImage", default="")
                    == "C:\\Windows\\System32\\services.exe",
                    any(
                        [
                            event.deep_get("CommandLine", default="").endswith(
                                "\\system32\\msiexec.exe /V"
                            ),
                            event.deep_get("ParentCommandLine", default="").endswith(
                                "\\system32\\msiexec.exe /V"
                            ),
                        ]
                    ),
                    event.deep_get("ParentImage", default="").startswith(
                        "C:\\ProgramData\\Sophos\\"
                    ),
                    event.deep_get("ParentImage", default="").startswith(
                        "C:\\ProgramData\\Avira\\"
                    ),
                    any(
                        [
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Program Files\\Avast Software\\"
                            ),
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Program Files (x86)\\Avast Software\\"
                            ),
                        ]
                    ),
                    any(
                        [
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Program Files\\Google\\Update\\"
                            ),
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Program Files (x86)\\Google\\Update\\"
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
