PiDrvDbUnloadHive

NTSTATUS __stdcall PiDrvDbUnloadHive(_UNICODE_STRING *HiveKeyPath, VOID *UnloadEventHandle){
  _OBJECT_ATTRIBUTES v3; 

  v3.ObjectName = HiveKeyPath;
  v3.RootDirectory = 0i64;
  *(_QWORD *)&v3.Length = 48i64;
  *(_QWORD *)&v3.Attributes = 576i64;
  *(_OWORD *)&v3.SecurityDescriptor = 0i64;
  if( UnloadEventHandle )
    return ZwUnloadKeyEx(&v3, UnloadEventHandle);
  else
    return ZwUnloadKey2(&v3, 0i64);
}

Referenced by:

PiDrvDbLoadNodeWorkerCallback
PiDrvDbSetupNodeHive