PnpCollectOpenHandles

void __fastcall PnpCollectOpenHandles(PVOID *a1, __int64 a2, __int64 a3){
  __int64 v4; 
  char v6; 

  v4 = (unsigned int)a2;
  if( *(_BYTE *)(a3 + 36) )
    IopDebugPrint(0x14ui64, (CHAR *)"Beginning handle dump:\n");
  *(_DWORD *)(a3 + 32) = 0;
  *(_QWORD *)(a3 + 24) = a3 + 16;
  *(_QWORD *)(a3 + 16) = a3 + 16;
  v6 = *(_BYTE *)(a3 + 36);
  if( v6 || *(_BYTE *)(a3 + 37) )
  {
    if( (_DWORD)v4 )
    {
      do
      {
        *(_QWORD *)a3 = *a1;
        PnpHandleEnumerateHandlesAgainstPdoStack(*a1++, a2, a3);
        --v4;
      }
      while( v4 );
      v6 = *(_BYTE *)(a3 + 36);
    }
    if( v6 )
      IopDebugPrint(0x14ui64, (CHAR *)"Dump complete - %d total handles found.\n");
  }
}

Referenced by:

PipRecordOpenHandleVeto
PipSendQueryRemoveIrpAndCheckOpenHandles