PiEventRemovalPostSurpriseRemove

void __fastcall PiEventRemovalPostSurpriseRemove(__int64 a1, int a2, _RELATION_LIST **a3){
  __int64 v3; 
  __int64 v7; 

  v3 = *(_QWORD *)(a1 + 152);
  if( v3 )
    v7 = *(_QWORD *)(*(_QWORD *)(v3 + 312) + 40i64);
  else
    v7 = 0i64;
  PnpUnlinkDeviceRemovalRelations(a1, *a3);
  if( !*(_QWORD *)(v7 + 16) )
  {
    ++*(_DWORD *)(*(_QWORD *)(v7 + 648) + 656i64);
    *(_QWORD *)(v7 + 648) |= 1ui64;
  }
  PnpQueuePendingSurpriseRemoval(*(_RELATION_LIST **)(v7 + 32), a3, *(unsigned int *)(a1 + 16), a2);
}

Referenced by:

PnpProcessQueryRemoveAndEject