PopWakeSourceGetDeviceProperty

VOID __stdcall PopWakeSourceGetDeviceProperty(
        _UNICODE_STRING *String,
        _DEVICE_REGISTRY_PROPERTY Property,
        _DEVICE_OBJECT *Pdo){
  VOID **PoolWithTag; 
  __int64 v7; 
  UINT64 NumberOfBytes; 

  LODWORD(NumberOfBytes) = 0;
  if( IoGetDeviceProperty(Pdo, Property, 0i64, 0i64, &NumberOfBytes) == -1073741789 )
  {
    PoolWithTag = ExAllocatePoolWithTag(1ui64, (unsigned int)NumberOfBytes, 544040269i64);
    if( PoolWithTag )
    {
      if( IoGetDeviceProperty(Pdo, Property, (unsigned int)NumberOfBytes, PoolWithTag, &NumberOfBytes) >= 0 )
      {
        String->MaximumLength = NumberOfBytes;
        v7 = -1i64;
        do
          ++v7;
        while( *((_WORD *)PoolWithTag + v7) );
        String->Buffer = (wchar_t *)PoolWithTag;
        String->Length = 2 * v7;
        PoolWithTag = 0i64;
      }
      if( PoolWithTag )
        ExFreePoolWithTag(PoolWithTag, 0x206D654Du);
    }
  }
}

Referenced by:

PopProcessWakeSourceWork