I opened up regedit and made an empty binary value monitoring it using ProcessMonitor.exe. I set up a filter so that it included anything mentioning the registry path of the empty binary value’s key and excluded everything else. When making a new binary value, it creates the unnamed one, then when I rename it to something else it deletes the unnamed one. However, it doesn’t set anything with the new name, it just queries the value which returns an error until after I close the key in regedit then open it again and it now queries successfully the empty REG_BINARY.
At no point do I see any set value calls, and I looked on msdn, it doesn’t say querying non-existing values creates them. How does it make the new value?
Doing this on XP, you can also get the RegMon output, and that lists SetValue:
ProcMon:
RegMon:
The regmon output looks like a rename operation to me (QV,QVx2,SV,DV) Maybe regmon uses hooking and procmon uses the documented registry monitor api (Or maybe a procmon bug?)
I tested both the latest and a older version on procmon; v1.37 (The older versions don’t have a huge ETW delay when you toggle monitoring on/off on XP)