private static string a(string A_0, bool A_1, bool A_2, bool A_3) { string result; try { if (A_0.Length == 0) { result = ""; } else { A_0 = A_0.Replace("ی", "ي"); string text = ""; int i = 0; List <char> list = new List <char>(A_0.ToCharArray()); list.Reverse(); while (i < list.Count) { string a_ = RTL.a(list, A_1, ref i); text += RTL.b(a_); i++; } List <string> list2 = new List <string>(text.Split(new char[] { ' ' })); list2.Reverse(); new List <string>(); for (i = 0; i < list2.Count; i++) { if (list2[i] == "ﺔﻠﻟﺍ" || list2[i] == "ﺔﻠﻟﺃ" || list2[i] == "ﻪﻠﻟﺍ" || list2[i] == "ﻪﻠﻟﺃ") { list2[i] = char.ConvertFromUtf32(65010) + char.ConvertFromUtf32(65165); } if (list2[i] == "ﻪﻠﻟ" || list2[i] == "ﺔﻠﻟ") { list2[i] = char.ConvertFromUtf32(65010); } } text = ""; bool flag = true; foreach (string current in list2) { if (flag) { for (int j = 0; j < current.Length; j++) { flag &= (RTL.punctuationMarks.IndexOf(current[j]) != -1 || RTL.latinChars.IndexOf(current.ToLower()[j]) != -1); } } } if (!A_2 && !flag) { list2.Reverse(); } for (int k = 0; k < list2.Count; k++) { string a_2 = list2[k]; text += RTL.a(RTL.a(a_2, A_2, A_3), ""); if (k != list2.Count - 1) { text += " "; } } result = text; } } catch (Exception) { result = ""; } return(result); }