NtReplyWaitReplyPort

INT64 __fastcall NtReplyWaitReplyPort(VOID *a1, __m256i *a2){
  _ETHREAD *CurrentThread; 
  char v4; 
  int v5; 
  PADAPTER_OBJECT DmaAdapter; 
  CurrentThread = (_ETHREAD *)KeGetCurrentThread();
  --*((_WORD *)CurrentThread + 242);
  v4 = *((_BYTE *)KeGetCurrentThread() + 562);
  DmaAdapter = 0i64;
  v5 = ObReferenceObjectByHandle(a1, 1u, AlpcPortObjectType, v4, (PVOID *)&DmaAdapter, 0i64);
  if( v5 >= 0 )
  {
    if( (*(_DWORD *)&DmaAdapter[26].Version & 6) == 2 )
    {
      v5 = -1073741811;
    }
    else
    {
      if( v4 )
        AlpcpProbeForWriteMessageHeader((UINT64)a2, 0i64);
      v5 = AlpcpProcessSynchronousRequest((INT64)DmaAdapter, 131073i64, a2, 0i64, (UINT64)a2, 0i64, 0i64, 0i64, v4);
      if( v5 == -1073740029 )
        v5 = -1073741769;
      if( v5 == -1073740031 )
        v5 = -1073741229;
    }
  }
  if( DmaAdapter )
    HalPutDmaAdapter(DmaAdapter);
  KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
  return(unsigned int)v5;
}

Referenced by:

No references.