def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("TargetObject", default="").endswith(
                        "\\Word\\Security\\AllowDDE"
                    ),
                    event.deep_get("Details", default="")
                    in ["DWORD (0x00000001)", "DWORD (0x00000002)"],
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("TargetObject", default="").endswith(
                                "\\Excel\\Security\\DisableDDEServerLaunch"
                            ),
                            event.deep_get("TargetObject", default="").endswith(
                                "\\Excel\\Security\\DisableDDEServerLookup"
                            ),
                        ]
                    ),
                    event.deep_get("Details", default="") == "DWORD (0x00000000)",
                ]
            ),
        ]
    ):
        return True
    return False
