ExpQueryChannelInformation
NTSTATUS __stdcall ExpQueryChannelInformation(VOID *Buffer, UINT64 BufferSize, UINT64 *ReturnSize){
unsigned __int64 v4;
unsigned __int16 ProcessPartitionId;
NTSTATUS ChannelInformation;
unsigned __int64 v8;
unsigned int v10;
__int64 Size[4];
VOID *Src;
v4 = (unsigned int)BufferSize;
Size[0] = 0i64;
Src = 0i64;
if( (unsigned int)BufferSize < 4 )
{
ChannelInformation = -1073741306;
}
else
{
v10 = *(_DWORD *)Buffer;
ProcessPartitionId = MmGetProcessPartitionId((INT64)KeGetCurrentThread()->ApcState.Process);
ChannelInformation = MmGetChannelInformation(ProcessPartitionId, v10, &Src, (UINT64 *)Size);
if( ChannelInformation >= 0 )
{
v8 = Size[0];
*(_DWORD *)ReturnSize = Size[0];
if( v8 > 0xFFFFFFFF )
{
ChannelInformation = -1073741670;
}
else if( v4 < v8 )
{
ChannelInformation = -1073741789;
}
else
{
memmove(Buffer, Src, v8);
ChannelInformation = 0;
}
}
}
if( Src )
ExFreePoolWithTag(Src, 0);
return ChannelInformation;
}Referenced by:
ExpQuerySystemInformation