private static bool smethod_2(byte byte_0, out Hardware.Class5 class5_0) { int num = 0; int num2 = 0; Hardware.Class2 @class = new Hardware.Class2(); class5_0 = new Hardware.Class5(); int num3; if (Environment.OSVersion.Platform != PlatformID.Win32NT) { num3 = Hardware.CreateFile("\\\\.\\Smartvsd", 0u, 0, 0, 1, 0, 0); } else { num3 = Hardware.CreateFile("\\\\.\\PhysicalDrive" + byte_0, 3221225472u, 3, 0, 3, 0, 0); } if (num3 != -1) { @class.byte_0 = (byte)num; @class.int_0 = Marshal.SizeOf(class5_0); @class.class1_0.byte_5 = (byte)(160 | num << 4); @class.class1_0.byte_6 = 236; @class.class1_0.byte_1 = 1; @class.class1_0.byte_2 = 1; if (Hardware.DeviceIoControl(num3, 508040, @class, Marshal.SizeOf(@class), class5_0, Marshal.SizeOf(class5_0), ref num2, 0) != 0) { return(true); } } return(false); }
private static extern int DeviceIoControl(int int_7, int int_8, [In][Out] Hardware.Class2 class2_0, int int_9, [In][Out] Hardware.Class5 class5_0, int int_10, ref int int_11, int int_12);