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=""),
                    ":\\Temp\\" in event.deep_get("TargetFilename", default=""),
                ]
            ),
            any(
                [
                    event.deep_get("TargetFilename", default="").endswith(".one"),
                    event.deep_get("TargetFilename", default="").endswith(".onepkg"),
                ]
            ),
            not all(
                [
                    ":\\Program Files\\Microsoft Office\\" in event.deep_get("Image", default=""),
                    event.deep_get("Image", default="").endswith("\\ONENOTE.EXE"),
                ]
            ),
        ]
    ):
        return True
    return False
