It`s called from lots of exported functions, but I think most comfortable for RE are IoOpenDeviceRegistryKey & IoOpenDeviceInterfaceRegistryKey. You can gather address of PiPnpRtlCtx with one pass of disassembling - it will be first loaded address in .data section after call to ExAcquireResourceExclusiveLite
This structure allocating and partially initializing in function PnpCtxOpenMachine. There are at least 3 version with different size:
- 0xac for 32 bit/0x158 for x64 - used in w8, w8.1 and in w10 up to est.build 14279
- 0xb0 for 32 bit/0x160 for x64 - used in w10 up to est. build 16299
- 0x10c for 32 bit/0x210 for x64 - used in w10 since est. build 17134
This struct has lots of pointer to functions (see also PiPnpRtlInit):