PopDirectedDripsUmDirectedFxRemoveTestDevice

NTSTATUS __stdcall PopDirectedDripsUmDirectedFxRemoveTestDevice(UINT64 a1, INT64 a2){
  int v2; 
  unsigned int v3; 
  unsigned __int64 v4; 
  NTSTATUS v5; 
  int Buffer[2]; 
  INT64 v8; 

  v2 = a1;
  if( (unsigned int)a1 < 0xC )
    return -1073741811;
  v3 = *(_DWORD *)(a2 + 8);
  v4 = 2i64 * v3;
  if( v4 > 0xFFFFFFFF || (unsigned int)v4 > v2 - 12 )
    return -1073741811;
  Buffer[0] = 1;
  v8 = a2 + 12;
  Buffer[1] = v3;
  PopAcquireRwLockExclusive(&PopDirectedDripsUmLock);
  v5 = 0;
  if( (unsigned __int8)RtlDeleteElementGenericTableAvl(&PopDirectedDripsUmTestDeviceTable, Buffer) )
    _InterlockedDecrement(&PopDirectedDripsUmTestDeviceCount);
  else
    v5 = -1073741275;
  PopReleaseRwLock(&PopDirectedDripsUmLock);
  return v5;
}

Referenced by:

PopDirectedDripsUmPowerInformationInternal