def rule(event):
    if all(
        [
            "\\CurrentControlSet\\Control\\Session Manager\\PendingFileRenameOperations"
            in event.deep_get("TargetObject", default=""),
            any(
                [
                    "\\Users\\Public\\" in event.deep_get("Image", default=""),
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\reg.exe"),
                            event.deep_get("Image", default="").endswith("\\regedit.exe"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
