PopFxFindAndReferenceAcpiDevice

__int64 __fastcall PopFxFindAndReferenceAcpiDevice(__int64 *a1){
  _ETHREAD *CurrentThread; 
  unsigned int v3; 
  __int64 *i; 
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  v3 = -1073741810;
  --*((_WORD *)CurrentThread + 242);
  ExAcquirePushLockSharedEx((UINT64)&PopFxDeviceListLock, 0i64);
  for( i = (__int64 *)PopFxAcpiDeviceList; i != &PopFxAcpiDeviceList; i = (__int64 *)*i )
  {
    if( i - 25 == a1 )
    {
      v3 = IoAcquireRemoveLockEx((PIO_REMOVE_LOCK)(i + 9), (PVOID)0x66466F50, (PCSTR)File, 1u, 0x20u);
      break;
    }
  }
  if( _InterlockedCompareExchange64((volatile signed __int64 *)&PopFxDeviceListLock, 0i64, 17i64) != 17 )
    ExfReleasePushLockShared((INT64 *)&PopFxDeviceListLock);
  KeAbPostRelease(&PopFxDeviceListLock);
  KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
  return v3;
}

Referenced by:

PopFxAcpiForwardPepAcpiNotifyRequest