def rule(event):
    if all(
        [
            "\\Windows\\System32\\Tasks" in event.deep_get("TargetFilename", default=""),
            any(
                [
                    "\\AppData\\" in event.deep_get("Image", default=""),
                    "C:\\PerfLogs" in event.deep_get("Image", default=""),
                    "\\Windows\\System32\\config\\systemprofile"
                    in event.deep_get("Image", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
