def rule(event):
    if all(
        [
            event.deep_get("TargetObject", default="").startswith("HKCR\\"),
            event.deep_get("Details", default="").startswith("URL:"),
            not any(
                [
                    event.deep_get("Details", default="").startswith("URL:ms-"),
                    any(
                        [
                            event.deep_get("Image", default="").startswith(
                                "C:\\Program Files (x86)"
                            ),
                            event.deep_get("Image", default="").startswith("C:\\Program Files\\"),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\System32\\"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SysWOW64\\"
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
