FilterConvertToString

INT64 __fastcall FilterConvertToString(UINT64 a1, INT64 a2, UINT64 a3, WCHAR *a4, UINT64 *a5){
  WCHAR *v5; 
  unsigned int v6; 
  unsigned int v8; 
  unsigned int v9; 
  unsigned int v10; 
  unsigned int v11; 
  INT64 result; 
  UINT64 v13; 
  v5 = a4;
  v6 = a3;
  LODWORD(v13) = 0;
  v8 = a1;
  v9 = a3;
  v10 = 2;
  if( (unsigned int)a3 >= 2 )
    *a4 = 0;
  v11 = 0;
  if( (_DWORD)a1 )
  {
    while( 1 )
    {
      result = ExpressionConvertToString(a2 + 56i64 * v11, v6, v5, &v13);
      if( (int)(result + 0x80000000) >= 0 && (_DWORD)result != -1073741789 )
        break;
      if( v10 + (_DWORD)v13 - 2 < v10 )
        return 3221225621i64;
      v10 += v13 - 2;
      if( v6 >= (unsigned __int64)(unsigned int)v13 - 2 )
      {
        v6 += 2 - v13;
        v5 += ((unsigned __int64)(unsigned int)v13 - 2) >> 1;
      }
      if( ++v11 >= v8 )
        goto LABEL_10;
    }
  }
  else
  {
LABEL_10:
    result = 0i64;
    if( a5 )
      *(_DWORD *)a5 = v10;
    if( v10 > v9 )
      return 3221225507i64;
  }
  return result;
}

Referenced by:

PiDqIrpQueryCreate