private Dictionary <string, sprἰ> method_31(Dictionary <string, Struct10> A_0) { int num = 8; Dictionary <string, sprἰ> dictionary = new Dictionary <string, sprἰ>(); foreach (KeyValuePair <string, Struct10> pair in A_0) { string key = pair.Key; string str3 = key.Contains(BookmarkStart.b("ȭ", num)) ? key.Substring(key.IndexOf(BookmarkStart.b("ȭ", num))) : string.Empty; Struct10 struct2 = pair.Value; if (struct2.method_4().Families.Length > 0) { string str2 = struct2.method_4().Families[0].Name.ToLowerInvariant() + str3; if (!dictionary.ContainsKey(str2)) { sprἰ sprἰ = new sprἰ(); sprἰ.ᜀ(struct2.method_4()); sprἰ.ᜀ(struct2.method_2()); sprἰ.ᜀ(struct2.method_0()); dictionary.Add(str2, sprἰ); } } } return(dictionary); }
private static HardDiskInfo smethod_2(byte byte_0) { Struct10 struct2 = new Struct10(); Struct12 struct3 = new Struct12(); Struct14 struct4 = new Struct14(); uint num = 0; IntPtr ptr = CreateFile(string.Format(@"\\.\PhysicalDrive{0}", byte_0), 0xc0000000, 3, IntPtr.Zero, 3, 0, IntPtr.Zero); if (ptr == IntPtr.Zero) { throw new Exception("CreateFile faild."); } if (0 == DeviceIoControl(ptr, 0x74080, IntPtr.Zero, 0, ref struct2, (uint)Marshal.SizeOf(struct2), ref num, IntPtr.Zero)) { CloseHandle(ptr); throw new Exception(string.Format("Drive {0} may not exists.", byte_0 + 1)); } if (0 == (struct2.uint_0 & 1)) { CloseHandle(ptr); throw new Exception("Error: IDE identify command not supported."); } if (0 != (byte_0 & 1)) { struct3.struct11_0.byte_5 = 0xb0; } else { struct3.struct11_0.byte_5 = 160; } if (0 != (struct2.uint_0 & (((int)0x10) >> byte_0))) { CloseHandle(ptr); throw new Exception(string.Format("Drive {0} is a ATAPI device, we don''t detect it.", byte_0 + 1)); } struct3.struct11_0.byte_6 = 0xec; struct3.byte_0 = byte_0; struct3.struct11_0.byte_1 = 1; struct3.struct11_0.byte_2 = 1; struct3.uint_0 = 0x200; if (0 == DeviceIoControl_1(ptr, 0x7c088, ref struct3, (uint)Marshal.SizeOf(struct3), ref struct4, (uint)Marshal.SizeOf(struct4), ref num, IntPtr.Zero)) { CloseHandle(ptr); throw new Exception("DeviceIoControl failed: DFP_RECEIVE_DRIVE_DATA"); } CloseHandle(ptr); return(smethod_3(struct4.struct15_0)); }
private static extern int DeviceIoControl(IntPtr intptr_0, uint uint_9, IntPtr intptr_1, uint uint_10, ref Struct10 struct10_0, uint uint_11, ref uint uint_12, [Out] IntPtr intptr_2);