NtAlpcQueryInformationMessage
INT64 __fastcall NtAlpcQueryInformationMessage(
HANDLE Handle,
INT64 rdx0,
INT64 r8_0,
LUID *a4,
UINT64 Length,
UINT64 a6){
int v7;
_ETHREAD *CurrentThread;
KPROCESSOR_MODE v10;
UINT64 *v11;
UINT64 v12;
unsigned int v13;
int v14;
INT64 v15;
struct _DMA_ADAPTER *v16;
ULONG_PTR v17;
int v18;
int v19;
int TokenModifiedIdMessage;
unsigned int a2;
unsigned int a3;
PVOID Object;
__int64 BugCheckParameter2[2];
v7 = r8_0;
a3 = 0;
BugCheckParameter2[0] = 0i64;
a2 = 0;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
--*((_WORD *)CurrentThread + 242);
v10 = *((_BYTE *)KeGetCurrentThread() + 562);
AlpcpCaptureIdMessage(rdx0, &a2, &a3);
if( v10 )
{
ProbeForWrite(a4, (unsigned int)Length, 4ui64);
v11 = (UINT64 *)a6;
if( a6 )
{
v12 = 0x7FFFFFFF0000i64;
if( a6 < 0x7FFFFFFF0000i64 )
v12 = a6;
*(_DWORD *)v12 = *(_DWORD *)v12;
}
}
else
{
v11 = (UINT64 *)a6;
}
v13 = a2;
if( !a2 )
{
v14 = -1073741811;
goto LABEL_20;
}
Object = 0i64;
v14 = ObReferenceObjectByHandle(Handle, 0x20000u, AlpcPortObjectType, v10, &Object, 0i64);
if( v14 >= 0 )
{
v16 = (struct _DMA_ADAPTER *)Object;
v14 = AlpcpLookupMessage((INT64)Object, v13, a3, v15, (UINT64 *)BugCheckParameter2);
if( v14 < 0 )
{
LABEL_19:
HalPutDmaAdapter(v16);
goto LABEL_20;
}
v17 = BugCheckParameter2[0];
if( !*(_QWORD *)(BugCheckParameter2[0] + 24) )
{
v14 = -1073740029;
goto LABEL_18;
}
if( v7 )
{
v18 = v7 - 1;
if( !v18 )
{
TokenModifiedIdMessage = AlpcpQueryTokenModifiedIdMessage(
(_ALPC_PORT *)v16,
(_KALPC_MESSAGE *)BugCheckParameter2[0],
a4,
(unsigned int)Length,
v11);
goto LABEL_17;
}
v19 = v18 - 1;
if( v19 )
{
if( v19 == 1 )
{
TokenModifiedIdMessage = AlpcpQueryHandleInformationMessage(
(_ALPC_PORT *)v16,
(_KALPC_MESSAGE *)BugCheckParameter2[0],
a4,
(unsigned int)Length,
v11);
LABEL_17:
v14 = TokenModifiedIdMessage;
LABEL_18:
AlpcpUnlockMessage(v17);
goto LABEL_19;
}
}
else if( !a4 && !(_DWORD)Length && !v11 )
{
v14 = (*(_DWORD *)(BugCheckParameter2[0] + 40) & 7) != 4 ? 0x103 : 0;
goto LABEL_18;
}
v14 = -1073741811;
goto LABEL_18;
}
TokenModifiedIdMessage = AlpcpQuerySidMessage(
(_ALPC_PORT *)v16,
(_KALPC_MESSAGE *)BugCheckParameter2[0],
a4,
(unsigned int)Length,
(INT64)v11);
goto LABEL_17;
}
LABEL_20:
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
return(unsigned int)v14;
}Referenced by:
No references.