def rule(event):
    if all(
        [
            any(
                [
                    "7-Zip" in event.deep_get("Description", default=""),
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\7z.exe"),
                            event.deep_get("Image", default="").endswith("\\7zr.exe"),
                            event.deep_get("Image", default="").endswith("\\7za.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["7z.exe", "7za.exe", "7zr.exe"],
                ]
            ),
            " -p" in event.deep_get("CommandLine", default=""),
            any(
                [
                    " a " in event.deep_get("CommandLine", default=""),
                    " u " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
