AlpcpValidateMessage

INT64 __fastcall AlpcpValidateMessage(UINT16 *a1, CHAR a2){
  __int64 v2; 
  UINT16 v4; 
  unsigned __int64 v5; 
  unsigned __int64 v6; 
  v2 = *a1;
  v4 = v2 + 40;
  if( (unsigned __int16)v2 < (unsigned __int16)(v2 + 40) )
  {
    v5 = v2 + 40;
    v6 = a1[1];
    if( a2 )
    {
      if( v5 <= v6 )
      {
        a1[1] = v4;
        return 0i64;
      }
    }
    else if( v5 == v6 )
    {
      return 0i64;
    }
  }
  return 3221225485i64;
}

Referenced by:

AlpcpReplyLegacySynchronousRequest
AlpcpSendLegacySynchronousRequest
AlpcpSendMessage
AlpcpValidateConnectionMessage