IopReleaseResources

VOID __stdcall IopReleaseResources(_DEVICE_NODE *DeviceNode){
  void *v2; 
  void *v3; 
  int v4; 
  void *v5; 
  CM_RESOURCE_LIST *v6; 
  PnpReleaseResourcesInternal(DeviceNode);
  ExAcquireFastMutex(&PiResourceListLock);
  v2 = (void *)*((_QWORD *)DeviceNode + 52);
  if( v2 )
  {
    ExFreePoolWithTag(v2, 0);
    *((_QWORD *)DeviceNode + 52) = 0i64;
  }
  v3 = (void *)*((_QWORD *)DeviceNode + 53);
  if( v3 )
  {
    ExFreePoolWithTag(v3, 0);
    *((_QWORD *)DeviceNode + 53) = 0i64;
  }
  KeReleaseGuardedMutex(&PiResourceListLock);
  v4 = *((_DWORD *)DeviceNode + 99);
  if( (v4 & 0x10001) == 1 )
  {
    if( (v4 & 0x40) != 0 )
    {
      v6 = (CM_RESOURCE_LIST *)*((_QWORD *)DeviceNode + 68);
      if( v6 )
        IopAllocateBootResourcesInternal(ArbiterRequestPnpEnumerated, *((DEVICE_OBJECT **)DeviceNode + 4), v6);
    }
  }
  else
  {
    PipClearDevNodeFlags(DeviceNode, 0xC0ui64);
    v5 = (void *)*((_QWORD *)DeviceNode + 68);
    if( v5 )
    {
      ExFreePoolWithTag(v5, 0);
      *((_QWORD *)DeviceNode + 68) = 0i64;
    }
  }
}

Referenced by:

IopLegacyResourceAllocation