// Token: 0x0600003C RID: 60 RVA: 0x000038D0 File Offset: 0x00001AD0 public void method_2(IntPtr intptr_3, IntPtr intptr_4, int int_1, string string_1, bool bool_2, uint uint_0, string string_2) { this.method_1("Connecting...", 0); this.string_0 = string_1; if (this.intptr_2 != IntPtr.Zero) { Class5.CloseHandle(this.intptr_2); this.intptr_2 = IntPtr.Zero; } this.bool_0 = true; this.queue_0.Clear(); this.gclass3_0 = new GClass3(intptr_4); this.intptr_2 = intptr_4; this.int_0 = int_1; try { Console.WriteLine("addrt: " + intptr_3.ToString()); this.intptr_0 = this.gclass3_0.method_0 <IntPtr>(intptr_3 + 16); this.intptr_1 = this.gclass3_0.method_0 <IntPtr>(intptr_3 + 16 + 8); Console.WriteLine("horionToInjectorPtr: " + this.intptr_0.ToString()); Console.WriteLine("injectorToHorionPtr: " + this.intptr_1.ToString()); this.bool_1 = true; Class5.Struct4 @struct = default(Class5.Struct4); @struct.mem_CMD_0 = Class5.MEM_CMD.CMD_INIT; @struct.int_1 |= 1; if (this.string_0.Length > 10) { @struct.int_1 |= 2; } if (bool_2) { @struct.int_1 |= 4; } JObject jobject = new JObject(); if (this.string_0.Length <= 10) { jobject["discordAuth"] = "none"; } else { jobject["discordAuth"] = this.string_0; } jobject["invite"] = string_2; jobject["serial"] = uint_0; string s = jobject.ToString(); byte[] bytes = Encoding.ASCII.GetBytes(s); @struct.byte_0 = new byte[3000]; Array.Copy(bytes, 0, @struct.byte_0, 0, bytes.Length); @struct.int_6 = bytes.Length; this.method_3(@struct); this.method_1("Connected", 1); } catch (Exception ex) { Console.WriteLine(ex.Message); this.bool_1 = false; this.method_1("Disconnected", -1); } }
// Token: 0x0600003D RID: 61 RVA: 0x00002274 File Offset: 0x00000474 private void method_3(Class5.Struct4 struct4_0) { struct4_0.short_0 = 1; struct4_0.bool_0 = true; struct4_0.int_0 = this.int_0; struct4_0.bool_1 = true; this.queue_0.Enqueue(struct4_0); }
// Token: 0x06000039 RID: 57 RVA: 0x0000352C File Offset: 0x0000172C private void method_0() { Console.WriteLine("Connection thread started"); DateTime now = DateTime.Now; DateTime now2 = DateTime.Now; while (this.bool_0) { Thread.Sleep(50); DateTime now3 = DateTime.Now; if (this.bool_1) { try { Class5.Struct4 @struct = this.gclass3_0.method_0 <Class5.Struct4>(this.intptr_0); Class5.Struct4 struct2 = this.gclass3_0.method_0 <Class5.Struct4>(this.intptr_1); if ([email protected]_0) { this.bool_1 = false; this.method_1("Disconnected", -1); continue; } if (@struct.bool_1) { @struct.bool_1 = false; now2 = DateTime.Now; switch (@struct.mem_CMD_0) { case Class5.MEM_CMD.CMD_PING: this.method_3(new Class5.Struct4 { mem_CMD_0 = Class5.MEM_CMD.CMD_PONG, int_1 = @struct.int_1 }); break; case Class5.MEM_CMD.CMD_PONG: break; case Class5.MEM_CMD.CMD_OPENBROWSER: { byte[] byte_ = @struct.byte_0; if (byte_.Length > @struct.int_6) { string @string = Encoding.Unicode.GetString(byte_, 0, @struct.int_6); if (@string.StartsWith("http")) { Console.WriteLine("Opening Browser: " + @string); Process.Start(@string); } } break; } default: Console.WriteLine("Unknown message: " + @struct.mem_CMD_0.ToString()); break; } if (this.gclass3_0.method_1 <Class5.Struct4>(this.intptr_0, @struct)) { this.bool_1 = false; this.method_1("Disconnected", -1); continue; } } if ((now3 - now).TotalSeconds > 1.0) { this.method_3(new Class5.Struct4 { mem_CMD_0 = Class5.MEM_CMD.CMD_PING, int_1 = 1193046 }); now = DateTime.Now; } if (this.queue_0.Count > 0 && !struct2.bool_1) { Class5.Struct4 gparam_ = this.queue_0.Dequeue(); if (this.gclass3_0.method_1 <Class5.Struct4>(this.intptr_1, gparam_)) { this.bool_1 = false; this.method_1("Disconnected", -1); continue; } } if ((now3 - now2).TotalSeconds > 5.0) { this.bool_1 = false; this.method_1("Disconnected", -1); } else if ((now3 - now2).TotalSeconds <= 2.0) { this.method_1("Connected", 0); } else { this.method_1("Timing out...", 0); } continue; } catch (Exception ex) { Console.WriteLine("Exception in connection thread: " + ex.Message); this.bool_1 = false; this.method_1("Disconnected", -1); continue; } } if (this.bool_0) { now = DateTime.Now; now2 = DateTime.Now; Thread.Sleep(150); } } Console.WriteLine("Connection thread deleted"); }