RtlpGetCorrelationVectorEndPosition

NTSTATUS __stdcall RtlpGetCorrelationVectorEndPosition(_BYTE *a1){
  NTSTATUS CorrelationVectorBufferLength; 
  NTSTATUS v2; 
  __int64 v3; 
  NTSTATUS v4; 
  __int64 i; 
  NTSTATUS result; 

  CorrelationVectorBufferLength = RtlpGetCorrelationVectorBufferLength(a1);
  v4 = CorrelationVectorBufferLength;
  if( CorrelationVectorBufferLength > 0 )
  {
    for( i = 0i64; i < CorrelationVectorBufferLength; ++i )
    {
      if( !*(_BYTE *)(v3 + i + 1) )
        break;
      ++v2;
    }
  }
  result = -1;
  if( v4 > v2 )
    return v2;
  return result;
}

Referenced by:

RtlExtendCorrelationVector
RtlValidateCorrelationVector