I have a legacy Windows application that reads values from specific registry key (and its subkeys). I'd like to change the key it reads, so when it opens e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Something, it will be transparently redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Redirected\Something. Or even to corresponding key in HKEY_CURRENT_USER.
This is identical to what Windows itself uses for WOW64 virtualization (https://msdn.microsoft.com/en-us/library/windows/desktop/aa384232(v=vs.85).aspx).
I can inject DLL into target process, to call necessary APIs from within target process context, so maybe there is some well-hidden system API, that exposes this functionality. Only way I'm thinking currently is to hook all relevant registry APIs and change the requested keys in each and every invocation of those APIs, but I think that is rather extreme approach, so I'd like to find any better ways.
Maybe WOW64 registry redirection internal APIs can be (ab)used for this? Or maybe there exists some slightly less-involving method than API hooking of all core registry API functions?
Thanks in advance.