RtlStringVPrintfWorkerA

NTSTATUS __stdcall RtlStringVPrintfWorkerA(
        NTSTRSAFE_PSTR pszDest,
        size_t cchDest,
        size_t *pcchNewDestLength,
        NTSTRSAFE_PCSTR pszFormat,
        va_list argList){
  size_t v5; 
  NTSTATUS v8; 
  int v9; 
  v5 = cchDest - 1;
  v8 = 0;
  v9 = vsnprintf(pszDest, cchDest - 1, pszFormat, argList);
  if( v9 < 0 || v9 > v5 )
  {
    pszDest[v5] = 0;
    v8 = -2147483643;
  }
  else if( v9 == v5 )
  {
    pszDest[v5] = 0;
  }
  else
  {
    v5 = v9;
  }
  if( pcchNewDestLength )
    *pcchNewDestLength = v5;
  return v8;
}

Referenced by:

RtlStringCbPrintfA
RtlStringCbPrintfExA