def rule(event):
    if all(
        [
            "\\SOFTWARE\\Microsoft\\Office\\" in event.deep_get("TargetObject", default=""),
            "\\Outlook\\Security\\" in event.deep_get("TargetObject", default=""),
            not all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").startswith(
                                "C:\\Program Files\\Microsoft Office\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Program Files (x86)\\Microsoft Office\\"
                            ),
                        ]
                    ),
                    event.deep_get("Image", default="").endswith("\\OUTLOOK.EXE"),
                ]
            ),
        ]
    ):
        return True
    return False
