def rule(event):
    if all(
        [
            any(
                [
                    "\\AppData\\Local\\Temp\\" in event.deep_get("TargetFilename", default=""),
                    "\\Users\\Public\\" in event.deep_get("TargetFilename", default=""),
                    "\\Windows\\Temp\\" in event.deep_get("TargetFilename", default=""),
                    "C:\\Temp\\" in event.deep_get("TargetFilename", default=""),
                ]
            ),
            event.deep_get("TargetFilename", default="").endswith(".pub"),
        ]
    ):
        return True
    return False
