import re


def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\WinRAR.exe"),
            "\\AppData\\Local\\Temp\\Rar$" in event.deep_get("TargetFilename", default=""),
            re.match(r"\\.[a-zA-Z0-9]{1,4} \\.", event.deep_get("TargetFilename", default="")),
        ]
    ):
        return True
    return False
