Failed HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

Again, the handle value for this key is 0x80000050, *on the usermode side*. The high bit of the handle, 0x8000000, normally means that it is a kernel handle; it is set on handles created with OBJ_KERNEL_HANDLE.
So the object manager (or whatever is responsible for mapping handles to objects) thinks that it is handle 0x50 in the system table - but it is not! Handle 0x50 may already exist and belong to something very different, not a registry key. Hence the type mismatch error.

Good luck once more,
–pa