def rule(event):
    if all(
        [
            any(
                [
                    "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
                    in event.deep_get("TargetObject", default=""),
                    "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
                    in event.deep_get("TargetObject", default=""),
                ]
            ),
            any(
                [
                    event.deep_get("TargetObject", default="").endswith("\\Common Startup"),
                    event.deep_get("TargetObject", default="").endswith("\\Startup"),
                ]
            ),
            not any(
                [
                    event.deep_get("Details", default="") == "",
                    any(
                        [
                            "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
                            in event.deep_get("Details", default=""),
                            "%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
                            in event.deep_get("Details", default=""),
                        ]
                    ),
                    any(
                        [
                            "%USERPROFILE%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
                            in event.deep_get("Details", default=""),
                            "%%USERPROFILE%%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
                            in event.deep_get("Details", default=""),
                        ]
                    ),
                    all(
                        [
                            "C:\\Users\\" in event.deep_get("Details", default=""),
                            "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
                            in event.deep_get("Details", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
