def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\rar.exe"),
                            event.deep_get("Image", default="").endswith("\\winrar.exe"),
                        ]
                    ),
                    event.deep_get("Description", default="") in ["Command line RAR", "WinRAR"],
                ]
            ),
            not any(
                [
                    event.deep_get("Image", default="").endswith("\\UnRAR.exe"),
                    any(
                        [
                            ":\\Program Files (x86)\\WinRAR\\"
                            in event.deep_get("Image", default=""),
                            ":\\Program Files\\WinRAR\\" in event.deep_get("Image", default=""),
                        ]
                    ),
                ]
            ),
            not ":\\Windows\\Temp\\" in event.deep_get("Image", default=""),
        ]
    ):
        return True
    return False
