// Token: 0x060029FC RID: 10748 RVA: 0x000A1588 File Offset: 0x0009F788 private static bool smethod_8(IntPtr handle, uint processId, IntPtr currentProcess, bool remote, out string token) { Class494 @class = null; Class522 class2 = null; bool result; try { if (remote) { @class = Class265.OpenProcess(Enum72.flag_0, true, processId); if (Class265.DuplicateHandle(@class.DangerousGetHandle(), handle, currentProcess, out class2, 0, false, Enum130.flag_1)) { handle = class2.DangerousGetHandle(); } } result = Class471.smethod_9(handle, out token); } finally { if (@class != null) { @class.Close(); } if (class2 != null) { class2.Close(); } } return(result); }
private void method_2(Stream A_0) { this.stream_0 = A_0; this.stream_0.Position = 0L; this.class522_0 = new Class522(new BinaryReader(this.stream_0, Encoding.Unicode)); this.class917_0 = new Class917(this.stream_0, this.class522_0); this.class917_0.method_6(); this.method_3(); this.class916_0 = new Class916(this.method_10(this.class522_0.uint_3, this.class522_0.method_0(), this.class522_0.method_0(), true)); this.method_9(); }
internal static void smethod_1(Stream A_0, uint A_1, int A_2, Class522 A_3) { uint num = A_1; BinaryWriter writer = new BinaryWriter(A_0, Encoding.Unicode); long position = A_0.Position; A_0.Position = 0x4cL; int num3 = Math.Min(A_2, 0x6d); for (int i = 0; i < num3; i++) { writer.Write(num); num++; } Class967.smethod_2(writer); A_0.Position = position; int num7 = A_2 - num3; if (num7 > 0) { A_3.uint_1 = Class967.smethod_1(A_0.Position, true); A_3.int_4 = 0; while (num7 > 0) { int num6 = Math.Min(num7, 0x7f); for (int j = 0; j < num6; j++) { writer.Write(num); num++; } Class967.smethod_2(writer); num7 -= num6; A_3.int_4++; A_0.Position -= 4L; if (num7 > 0) { uint num8 = Class967.smethod_1(A_0.Position, true) + 1; writer.Write(num8); } else { writer.Write((uint)0xfffffffe); } } } else { A_3.uint_1 = 0xfffffffe; A_3.int_4 = 0; } }
public void method_5(Stream A_0) { if (A_0 == null) { throw new ArgumentNullException(); } Stream stream = null; if (!A_0.CanSeek) { stream = A_0; A_0 = new MemoryStream(); } this.stream_0 = A_0; this.stream_0.Position = 0x200L; this.class522_0 = new Class522(); this.class917_0 = new Class917(this.stream_0, this.class522_0); this.class916_0 = new Class916(); this.memoryStream_0 = new MemoryStream(); this.class410_0 = new Class410(); this.method_6(this.class1089_0, null); if (this.memoryStream_0.Length > 0L) { int num; this.class410_0.method_0(0).uint_4 = this.method_8(this.memoryStream_0, true); this.class410_0.method_0(0).long_2 = this.memoryStream_0.Length; this.class522_0.uint_3 = this.method_7(this.class916_0.method_4(), true, out num); this.class522_0.int_7 = num; } else { this.class522_0.uint_3 = 0xfffffffe; } this.class522_0.uint_2 = this.method_8(this.class410_0.method_7(), true); this.class917_0.method_8(); this.stream_0.Position = 0L; this.class522_0.method_1(new BinaryWriter(this.stream_0, Encoding.Unicode)); this.stream_0.Position = this.stream_0.Length; if (stream != null) { A_0.Position = 0L; ((MemoryStream)A_0).WriteTo(stream); A_0.Close(); A_0 = stream; } }
public static extern bool DuplicateHandle([In] IntPtr hSourceProcessHandle, [In] IntPtr hSourceHandle, [In] IntPtr hTargetProcessHandle, out Class522 lpTargetHandle, [In] int dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)][In] bool bInheritHandle, [In] Enum130 dwOptions);
internal Class917(Stream A_0, Class522 A_1) { this.stream_0 = A_0; this.class522_0 = A_1; }