def rule(event):
    if all(
        [
            event.deep_get("ImageLoaded", default="").endswith("\\MpSvc.dll"),
            not any(
                [
                    event.deep_get("ImageLoaded", default="").startswith(
                        "C:\\Program Files\\Windows Defender\\"
                    ),
                    event.deep_get("ImageLoaded", default="").startswith(
                        "C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\"
                    ),
                    event.deep_get("ImageLoaded", default="").startswith("C:\\Windows\\WinSxS\\"),
                ]
            ),
        ]
    ):
        return True
    return False
