Esempio n. 1
0
        public void thread()
        {
            AppDomain currentDomain = AppDomain.CurrentDomain;

            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);

            try
            {
                Graphics graphics = this.CreateGraphics();
                int      numnya;
                int      Adress1, Adress2, num2;
                Bitmap   bitmap        = new Bitmap(this.Width, this.Height);
                Graphics drawnawbrudda = Graphics.FromImage((Image)bitmap);
                Point    bottom        = new Point()
                {
                    X = this.ClientRectangle.Width / 2,
                    Y = this.ClientRectangle.Height / 2 + 200
                };
                int Adress3, num6, name, aa, a2;

                string  str;
                double  num4, num5;
                float   dist;
                bool    Player, Bot, Vehicle, Item, SuplyBox, Plane, weapon;
                Vector2 center = new Vector2();
                while (true)
                {
                    center.X = this.Width / 2;
                    center.Y = (this.Height / 2) + 20;
                    drawnawbrudda.Clear(Color.Black);
                    num1         = Mem.ReadMemory <int>((int)Mem.MainProcedure);
                    numnya       = Mem.ReadMemory <int>((int)Mem.MainProcedure + 34);
                    MyPosition.X = Mem.ReadMemory <float>(num1 + 16);
                    MyPosition.Y = Mem.ReadMemory <float>(num1 + 16 + 4);
                    MyPosition.Z = Mem.ReadMemory <float>(num1 + 16 + 8);
                    if (Z == 0)
                    {
                        X = MyPosition.X;
                        Y = MyPosition.Y;
                        Z = MyPosition.Z;
                    }

                    Adress1 = Mem.ReadMemory <int>(Mem.ReadMemory <int>((int)Mem.MainProcedure));
                    Adress2 = Mem.ReadMemory <int>(Mem.ReadMemory <int>((int)Mem.ReadMemory <int>(Mem.ReadMemory <int>(Adress1))));
                    num2    = Mem.ReadMemory <int>(Adress1 + 4);
                    this.DrawMenu(drawnawbrudda);
                    while (Adress2 != num2 && Adress2 != num1)
                    {
                        Adress3 = Mem.ReadMemory <int>(Adress2 + 12);
                        str     = Mem.ReadString(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Adress3 + 4) + 12), 20);
                        Mem.ReadMemory <int>(Adress3);
                        Mem.ReadMemory <int>(Adress3 + 12);
                        Vector3 EnemyPos = Mem.ReadMemory <Vector3>(Adress3 + 16);

                        num4 = (double)Mem.ReadMemory <float>(Adress3 + 56);
                        num5 = (double)Mem.ReadMemory <float>(Adress3 + 60);
                        num6 = Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Adress3 + 256) + 20) + 152) + 8);
                        name = Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Adress3 + 34) + 0) + 0) + 0);

                        Player   = str.Contains("Avatar");
                        Bot      = str.Contains("Robot");
                        Vehicle  = str.Contains("Land");
                        Item     = str.Contains("DtsProp");
                        SuplyBox = str.Contains("DtsPlayerHeritage");
                        Plane    = str.Contains("Plane");
                        weapon   = str.Contains("ClientWeaponEntity");
                        Adress2  = Mem.ReadMemory <int>(Adress2);
                        Vector2 screen;
                        aa = (Settings.Aimbot) ? 1 : 0;
                        int nk = (nuke) ? 1 : 0;
                        a2 = (Settings.SmartHeight) ? 1 : 0;

                        if (Settings.DEBUG)
                        {
                            Rectangle rect = new Rectangle((int)center.X - Settings.FOV, ((int)center.Y) - Settings.FOV, Settings.FOV * 2, Settings.FOV * 2);
                            drawnawbrudda.DrawEllipse(greenPen, rect);
                        }

                        if ((Maths.WorldToScreen(EnemyPos, out screen, this.Width, this.Height)))
                        {
                            if (Settings.NoGrass)
                            {
                                //NOGRASS
                                int   tes1 = Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>((int)Mem.MainProcedure) + 0) + 304) + 16) + 528);
                                float tes2 = Mem.ReadMemory <float>(tes1 + 44);
                                Mem.WriteMemory <float>(tes1 + 44, 1000000);
                                //NOGRASS END
                            }
                            else
                            {
                                int   tes1 = Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>(Mem.ReadMemory <int>((int)Mem.MainProcedure) + 0) + 304) + 16) + 528);
                                float tes2 = Mem.ReadMemory <float>(tes1 + 44);
                                Mem.WriteMemory <float>(tes1 + 44, 0);
                            }
                            if ((Player ? 1 : (!Bot ? 0 : ((uint)num6 > 0U ? 1 : 0))) != 0)
                            {
                                if (nuke)
                                {
                                    Mem.WriteMemory <Vector3>(Adress3 + 16, MyPosition);
                                }

                                if (Settings.PlayerESP && num6 != 0)
                                {
                                    drawnawbrudda.DrawString("Player", this.font, Brushes.Red, screen.X, screen.Y - 20f);
                                    if (Settings.PlayerLines)
                                    {
                                        drawnawbrudda.DrawLine(Dpen, bottom, pointxx(screen));
                                    }
                                }
                                if (Settings.BOX)
                                {
                                    //2D Box
                                    float   entityHeight = 21.5f;
                                    Vector2 pRoot        = default(Vector2);
                                    Maths.WorldToScreen(EnemyPos, out pRoot, this.Width, this.Height);
                                    Vector3 eHead = default(Vector3);
                                    eHead.X = EnemyPos.X;
                                    eHead.Y = EnemyPos.Y + entityHeight;
                                    eHead.Z = EnemyPos.Z;
                                    Vector2 pHead = default(Vector2);
                                    Maths.WorldToScreen(eHead, out pHead, this.Width, this.Height);
                                    Rectangle rectangle2 = default(Rectangle);
                                    float     dist2      = (float)Helper.GetDistance(Main.MyPosition, EnemyPos, 10);
                                    rectangle2.Width = (int)(700 / dist2);
                                    if (rectangle2.Width > 100)
                                    {
                                        rectangle2.Width = 100;
                                    }
                                    rectangle2.Height = (int)(pRoot.Y - pHead.Y);
                                    rectangle2.X      = (int)pRoot.X - rectangle2.Width / 2;
                                    rectangle2.Y      = (int)pRoot.Y - rectangle2.Height;
                                    if (dist2 > 25f)
                                    {
                                        rectangle2.Y = (int)pRoot.Y - rectangle2.Height + 15;
                                    }
                                    drawnawbrudda.DrawRectangle(new Pen(Color.Purple), rectangle2);

                                    //2D Box
                                }


                                if (Settings.PlayerHealth)
                                {
                                    if (num6 >= 100)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪▪▪▪▪▪▪", this.font, Brushes.Green, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 90)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪▪▪▪▪▪ ", this.font, Brushes.LimeGreen, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 80)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪▪▪▪▪  ", this.font, Brushes.Lime, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 70)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪▪▪▪   ", this.font, Brushes.LawnGreen, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 60)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪▪▪    ", this.font, Brushes.GreenYellow, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 50)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪▪     ", this.font, Brushes.Orange, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 40)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪▪      ", this.font, Brushes.DarkOrange, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 30)
                                    {
                                        drawnawbrudda.DrawString("▪▪▪       ", this.font, Brushes.OrangeRed, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 20)
                                    {
                                        drawnawbrudda.DrawString("▪▪        ", this.font, Brushes.Red, screen.X - 10f, screen.Y + 15f);
                                    }
                                    if (num6 >= 10)
                                    {
                                        drawnawbrudda.DrawString("▪         ", this.font, Brushes.DarkRed, screen.X - 10f, screen.Y + 15f);
                                    }
                                }



                                if (Settings.PlayerDistance)

                                {
                                    if (Helper.GetDistance(MyPosition, EnemyPos, 10) > 100)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Meter]", this.font, Brushes.White, screen.X - 10f, screen.Y + 30f);
                                    }
                                    else
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Meter]", this.font, Brushes.Red, screen.X - 10f, screen.Y + 30f);
                                    }
                                }

                                dist = Helper.GetDistance(MyPosition, EnemyPos, 10);
                                if (dist < Settings.Distance && Settings.Aimbot && num6 > 0 && (Maths.InsideCircle((int)center.X, (int)center.Y, Settings.FOV, (int)screen.X, (int)screen.Y)))
                                {
                                    Vector2 aim;
                                    if (Settings.SmartHeight)
                                    {
                                        Aimbot(MyPosition, EnemyPos);
                                    }
                                    MethodInvoker insv3 = delegate
                                    {
                                        if (Settings.holdkey)
                                        {
                                            if (Main.GetAsyncKeyState(Keys.CapsLock))
                                            {
                                                aim.X           = screen.X + w;
                                                aim.Y           = screen.Y + height;
                                                Cursor.Position = this.PointToClient(new Point((int)aim.X, (int)aim.Y));
                                            }
                                        }
                                        else
                                        {
                                            aim.X           = screen.X + w;
                                            aim.Y           = screen.Y + height;
                                            Cursor.Position = this.PointToClient(new Point((int)aim.X, (int)aim.Y));
                                        }
                                    };
                                    this.Invoke(insv3);
                                }
                            }
                            if (Bot)
                            {
                                if (nuke)
                                {
                                    Mem.WriteMemory <Vector3>(Adress3 + 16, MyPosition);
                                }
                                if (Settings.BotESP)
                                {
                                    drawnawbrudda.DrawString("ROBOT", this.font, Brushes.Chartreuse, screen.X, screen.Y - 20f);
                                }
                                if (Settings.BotHealth)
                                {
                                    drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Meter]", this.font, Brushes.Chartreuse, screen.X - 10f, screen.Y + 30f);
                                }
                                drawnawbrudda.DrawLine(new Pen((Brush) new SolidBrush(colour.newco)), bottom, pointxx(screen));
                            }

                            if (Item)
                            {
                                int    cliententitytable    = Mem.ReadMemory <int>(Adress3 + 0x100);
                                int    cliententitytableptr = Mem.ReadMemory <int>(cliententitytable + 0x14);
                                int    propID = Mem.ReadMemory <int>(Mem.ReadMemory <int>(cliententitytableptr + 0x2C) + 0x8);
                                string itemName;
                                Helper.Items.TryGetValue(propID, out itemName);
                                if (Settings.GOLD)
                                {
                                    if (itemName == "Ghillie Suit" || itemName == "SMG QD-EX-Mag" || itemName == "8x Scope" || itemName == "4x Scope" || itemName == "SR EX-QD-Mag" || itemName == "Rifle EX-QD-Mag" || itemName == "RPG Ammo" || itemName == "SR Ammo" || itemName == "Rifle Ammo" || itemName == "SMG Silencer" || itemName == "SR Silence" || itemName == "Rifle Silencer" || itemName == "AUG Rifle" || itemName == "M110 Sniper Rifle" || itemName == "SVD SR" || itemName == "Thompson SMG" || itemName == "M14EBR Rifle" || itemName == "Lv 3 helmet" || itemName == "Lv 3 Armor" || itemName == "Lv 3 Backpack" || itemName == "First Aid Kit" || itemName == "Med Kit" || itemName == "Bandage" || itemName == "M4A1 Rifle" || itemName == "AKM Rifle" || itemName == "AWM SR" || itemName == "Barett SR")
                                    {
                                        drawnawbrudda.DrawString(itemName, this.drawFont, Brushes.Gold, screen.X - 10f, screen.Y);
                                        drawnawbrudda.DrawString("[ " + Helper.GetDistance(Main.MyPosition, EnemyPos, 10) + "m ]", this.drawFont, Brushes.Gold, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                                else
                                {
                                    if (Settings.ItemESP)
                                    {
                                        drawnawbrudda.DrawString(itemName, this.font, Brushes.Green, screen.X - 10f, screen.Y);
                                    }
                                    if (Settings.ItemDistance)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Meter]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                            }
                            if (weapon)
                            {
                                if (Settings.ItemESP)
                                {
                                    drawnawbrudda.DrawString("Weapon", this.font, Brushes.Blue, screen.X - 10f, screen.Y);
                                }
                                if (Settings.ItemDistance)
                                {
                                    drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Meter]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                }
                            }

                            if (SuplyBox)
                            {
                                if (Settings.SupplyESP)
                                {
                                    if (Helper.GetDistance(MyPosition, EnemyPos, 10) > 500)
                                    {
                                        drawnawbrudda.DrawString("SUPPLY BOX", this.font, Brushes.Pink, screen.X - 10f, screen.Y);
                                    }
                                }
                            }
                            if (Vehicle)
                            {
                                //vehicle name esp - alperhan
                                bool car, bicycle, express, motor, glider;
                                car     = str.Contains("LandCar");
                                bicycle = str.Contains("LandBike");
                                express = str.Contains("LandExpress");
                                motor   = str.Contains("LandMotor");
                                glider  = str.Contains("LandGlider");

                                if (car)
                                {
                                    if (Settings.VehicleESP)
                                    {
                                        drawnawbrudda.DrawString("Car", this.font, Brushes.Gold, screen.X - 10f, screen.Y);
                                    }
                                    if (Settings.VehicleDistance)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Metre]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                                if (bicycle)
                                {
                                    if (Settings.VehicleESP)
                                    {
                                        drawnawbrudda.DrawString("Bicycle", this.font, Brushes.Gold, screen.X - 10f, screen.Y);
                                    }
                                    if (Settings.VehicleDistance)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Metre]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                                if (express)
                                {
                                    if (Settings.VehicleESP)
                                    {
                                        drawnawbrudda.DrawString("Express", this.font, Brushes.Gold, screen.X - 10f, screen.Y);
                                    }
                                    if (Settings.VehicleDistance)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Metre]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                                if (motor)
                                {
                                    if (Settings.VehicleESP)
                                    {
                                        drawnawbrudda.DrawString("Motor", this.font, Brushes.Gold, screen.X - 10f, screen.Y);
                                    }
                                    if (Settings.VehicleDistance)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Metre]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                                if (glider)
                                {
                                    if (Settings.VehicleESP)
                                    {
                                        drawnawbrudda.DrawString("glider", this.font, Brushes.Gold, screen.X - 10f, screen.Y);
                                    }
                                    if (Settings.VehicleDistance)
                                    {
                                        drawnawbrudda.DrawString("[ " + (object)Helper.GetDistance(MyPosition, EnemyPos, 10) + " Metre]", this.font, Brushes.White, screen.X - 10f, screen.Y + 15f);
                                    }
                                }
                            }
                            if (Plane && Settings.PlaneESP)
                            {
                                drawnawbrudda.DrawString("PLANE", this.font, Brushes.Chocolate, screen.X, screen.Y - 20f);
                            }
                        }
                    }
                    graphics.DrawImage((Image)bitmap, 0, 0);
                    Thread.Sleep(Settings.wait);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("Crash Reason2: " + e.Message);
                Process.Start(Application.ExecutablePath);

                //some time to start the new instance.
                Thread.Sleep(2000);

                Environment.Exit(-1); //Force termination of the current process.
            }
        }
Esempio n. 2
0
 public static void WriteMemory <T>(int Adress, object Value) where T : struct
 {
     byte[] byteArray = Mem.StructureToByteArray(Value);
     Mem.WriteProcessMemory((int)Mem.m_pProcessHandle, Adress, byteArray, byteArray.Length, out Mem.m_iNumberOfBytesWritten);
 }
Esempio n. 3
0
 public static T ReadMemory <T>(int Adress) where T : struct
 {
     byte[] numArray = new byte[Marshal.SizeOf(typeof(T))];
     Mem.ReadProcessMemory((int)Mem.m_pProcessHandle, Adress, numArray, numArray.Length, ref Mem.m_iNumberOfBytesRead);
     return(Mem.ByteArrayToStructure <T>(numArray));
 }
Esempio n. 4
0
 public static float[] ReadMatrix <T>(int Adress, int MatrixSize) where T : struct
 {
     byte[] numArray = new byte[Marshal.SizeOf(typeof(T)) * MatrixSize];
     Mem.ReadProcessMemory((int)Mem.m_pProcessHandle, Adress, numArray, numArray.Length, ref Mem.m_iNumberOfBytesRead);
     return(Mem.ConvertToFloatArray(numArray));
 }
Esempio n. 5
0
 public static string ReadString(int address, int _Size)
 {
     byte[] numArray = new byte[_Size];
     Mem.ReadProcessMemory((int)Mem.m_pProcessHandle, address, numArray, _Size, ref Mem.m_iNumberOfBytesRead);
     return(Encoding.ASCII.GetString(numArray));
 }