def rule(event):
    if all(
        [
            any(
                [
                    "\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
                    in event.deep_get("TargetObject", default=""),
                    "\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run"
                    in event.deep_get("TargetObject", default=""),
                    "\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run"
                    in event.deep_get("TargetObject", default=""),
                ]
            ),
            any(
                [
                    any(
                        [
                            ":\\Perflogs" in event.deep_get("Details", default=""),
                            ":\\ProgramData'" in event.deep_get("Details", default=""),
                            ":\\Windows\\Temp" in event.deep_get("Details", default=""),
                            ":\\Temp" in event.deep_get("Details", default=""),
                            "\\AppData\\Local\\Temp" in event.deep_get("Details", default=""),
                            "\\AppData\\Roaming" in event.deep_get("Details", default=""),
                            ":\\$Recycle.bin" in event.deep_get("Details", default=""),
                            ":\\Users\\Default" in event.deep_get("Details", default=""),
                            ":\\Users\\public" in event.deep_get("Details", default=""),
                            "%temp%" in event.deep_get("Details", default=""),
                            "%tmp%" in event.deep_get("Details", default=""),
                            "%Public%" in event.deep_get("Details", default=""),
                            "%AppData%" in event.deep_get("Details", default=""),
                        ]
                    ),
                    all(
                        [
                            ":\\Users\\" in event.deep_get("Details", default=""),
                            any(
                                [
                                    "\\Favorites" in event.deep_get("Details", default=""),
                                    "\\Favourites" in event.deep_get("Details", default=""),
                                    "\\Contacts" in event.deep_get("Details", default=""),
                                    "\\Music" in event.deep_get("Details", default=""),
                                    "\\Pictures" in event.deep_get("Details", default=""),
                                    "\\Documents" in event.deep_get("Details", default=""),
                                    "\\Photos" in event.deep_get("Details", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
            not all(
                [
                    "\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\"
                    in event.deep_get("TargetObject", default=""),
                    event.deep_get("Image", default="").startswith(
                        "C:\\Windows\\SoftwareDistribution\\Download\\"
                    ),
                    "rundll32.exe " in event.deep_get("Details", default=""),
                    "C:\\WINDOWS\\system32\\advpack.dll,DelNodeRunDLL32"
                    in event.deep_get("Details", default=""),
                    any(
                        [
                            "\\AppData\\Local\\Temp\\" in event.deep_get("Details", default=""),
                            "C:\\Windows\\Temp\\" in event.deep_get("Details", default=""),
                        ]
                    ),
                ]
            ),
            not all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith(
                                "C:\\Program Files\\Spotify\\Spotify.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                "C:\\Program Files (x86)\\Spotify\\Spotify.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                "\\AppData\\Roaming\\Spotify\\Spotify.exe"
                            ),
                        ]
                    ),
                    event.deep_get("TargetObject", default="").endswith(
                        "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\Spotify"
                    ),
                    event.deep_get("Details", default="").endswith(
                        "Spotify.exe --autostart --minimized"
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
