Unfortunately, this is harder than it looks
I can think of two solutions:

First Solution I Could Think Of
Use RegEnumKeyEx and RegEnumValue to enumerate all the subkeys and values. Then, delete the key using RegDeleteKey. Finally, use RegCreateKeyEx to recreate the key with another name, and RegSetValueEx to set all the values back where they were.

Second Solution I Could Think Of
Use GetTempPath and GetTempFileName to get a temporary file name. Then, use RegSaveKey to save your key and all its subkeys in the temporary file. Delete the key from the registry using RegDeleteKey. Load the temporary file into a string buffer, and use the Replace function to replaces all instances of "OldKeyName" with "NewKeyName", and save the result back into the temporary file. Then, call RegRestoreKey to load the temporary file back into the registry, and finally, delete the temporary file.

You'll get over it