def rule(event):
    if any(
        [
            all(
                [
                    "\\Microsoft\\Word\\Startup\\" in event.deep_get("TargetFilename", default=""),
                    event.deep_get("TargetFilename", default="").endswith(".wll"),
                ]
            ),
            all(
                [
                    "\\Microsoft\\Excel\\Startup\\" in event.deep_get("TargetFilename", default=""),
                    event.deep_get("TargetFilename", default="").endswith(".xll"),
                ]
            ),
            all(
                [
                    "Microsoft\\Excel\\XLSTART\\" in event.deep_get("TargetFilename", default=""),
                    event.deep_get("TargetFilename", default="").endswith(".xlam"),
                ]
            ),
            all(
                [
                    "\\Microsoft\\Addins\\" in event.deep_get("TargetFilename", default=""),
                    any(
                        [
                            event.deep_get("TargetFilename", default="").endswith(".xlam"),
                            event.deep_get("TargetFilename", default="").endswith(".xla"),
                            event.deep_get("TargetFilename", default="").endswith(".ppam"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
