def rule(event):
    if all(
        [
            "ControlSet" in event.deep_get("TargetObject", default=""),
            "\\Services\\" in event.deep_get("TargetObject", default=""),
            event.deep_get("TargetObject", default="").endswith("\\ImagePath"),
            any(
                [
                    ":\\ProgramData\\" in event.deep_get("Details", default=""),
                    "\\AppData\\Local\\" in event.deep_get("Details", default=""),
                    "\\AppData\\Roaming\\" in event.deep_get("Details", default=""),
                ]
            ),
            not all(
                [
                    any(
                        [
                            "\\Services\\WinDefend\\" in event.deep_get("TargetObject", default=""),
                            "\\Services\\MpKs" in event.deep_get("TargetObject", default=""),
                        ]
                    ),
                    "C:\\ProgramData\\Microsoft\\Windows Defender\\"
                    in event.deep_get("Details", default=""),
                ]
            ),
            not any(
                [
                    all(
                        [
                            "\\Services\\ZoomCptService"
                            in event.deep_get("TargetObject", default=""),
                            "C:\\Program Files\\Common Files\\Zoom\\Support\\CptService.exe"
                            in event.deep_get("Details", default=""),
                        ]
                    ),
                    all(
                        [
                            "\\Services\\MBAMInstallerService"
                            in event.deep_get("TargetObject", default=""),
                            "C:\\Users\\" in event.deep_get("Details", default=""),
                            "AppData\\Local\\Temp\\MBAMInstallerService.exe"
                            in event.deep_get("Details", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
