def rule(event):
    if all(
        [
            "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths"
            in event.deep_get("TargetObject", default=""),
            any(
                [
                    event.deep_get("TargetObject", default="").endswith("(Default)"),
                    event.deep_get("TargetObject", default="").endswith("Path"),
                ]
            ),
            any(
                [
                    "\\Users\\Public" in event.deep_get("Details", default=""),
                    "\\AppData\\Local\\Temp\\" in event.deep_get("Details", default=""),
                    "\\Windows\\Temp\\" in event.deep_get("Details", default=""),
                    "\\Desktop\\" in event.deep_get("Details", default=""),
                    "\\Downloads\\" in event.deep_get("Details", default=""),
                    "%temp%" in event.deep_get("Details", default=""),
                    "%tmp%" in event.deep_get("Details", default=""),
                    "iex" in event.deep_get("Details", default=""),
                    "Invoke-" in event.deep_get("Details", default=""),
                    "rundll32" in event.deep_get("Details", default=""),
                    "regsvr32" in event.deep_get("Details", default=""),
                    "mshta" in event.deep_get("Details", default=""),
                    "cscript" in event.deep_get("Details", default=""),
                    "wscript" in event.deep_get("Details", default=""),
                    ".bat" in event.deep_get("Details", default=""),
                    ".hta" in event.deep_get("Details", default=""),
                    ".dll" in event.deep_get("Details", default=""),
                    ".ps1" in event.deep_get("Details", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
