def rule(event):
    if all(
        [
            "\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp"
            in event.deep_get("TargetFilename", default=""),
            not any(
                [
                    event.deep_get("Image", default="")
                    in [
                        "C:\\Windows\\System32\\wuauclt.exe",
                        "C:\\Windows\\uus\\ARM64\\wuaucltcore.exe",
                    ],
                    any(
                        [
                            event.deep_get("TargetFilename", default="").startswith(
                                "C:\\$WINDOWS.~BT\\NewOS\\"
                            ),
                            event.deep_get("TargetFilename", default="").startswith(
                                "C:\\$WinREAgent\\Scratch\\Mount\\"
                            ),
                        ]
                    ),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="").endswith("\\ONENOTE.EXE"),
                    event.deep_get("TargetFilename", default="").endswith("\\Send to OneNote.lnk"),
                ]
            ),
        ]
    ):
        return True
    return False
