private void DetectGame()
        {
            for (short i = 0; i < max_games; i++)
            {
                if (Process.GetProcessesByName(currentGame[i]).FirstOrDefault() != null)
                {
                    bool passed = true;
                    if (OriginalDarkSouls2_Index == i) //Dark souls 2 and Darks Souls 2 SOTFS have the same names, therefor I am reading the FileDescription for OG Dark Souls to make sure we are setting up correct DS2
                    {
                        string ds2_FileDescription = Process.GetProcessesByName(currentGame[i]).FirstOrDefault().MainModule.FileVersionInfo.FileDescription;

                        if (ds2_FileDescription != OriginalDarkSouls2_Description)
                        {
                            passed = false;
                        }
                    }

                    if (passed)
                    {
                        currentGameID = i;
                        this.Text     = currentGame[i];
                        this.DeathCounter_Label.BeginInvoke((MethodInvoker) delegate() { this.DeathCounter_Label.Text = "0"; });

                        Base = Process.GetProcessesByName(currentGame[currentGameID]).FirstOrDefault().MainModule.BaseAddress + memoryLocationOfDeathCounter[currentGameID];
                        vam  = new VAMemory(currentGame[currentGameID]);
                        return;
                    }
                }
            }
            this.Text     = "Searching...";
            currentGameID = -1;
        }
예제 #2
0
        private void InjectResolution(int targetWidth, int targetHeight)
        {
            Process[] processes = Process.GetProcessesByName("DEEMO -Reborn-");

            if (processes.Length > 0)
            {
                IntPtr BaseAddress = GetModuleBaseAddress(processes[0], "UnityPlayer.dll");

                if (BaseAddress != IntPtr.Zero)
                {
                    var ResWidthOffsets  = new int[] { 0xD8, 0x28, 0x0, 0x194 };
                    var ResHeightOffsets = new int[] { 0xE0, 0x18, 0x10, 0xC8 };

                    VAMemory vam = new VAMemory("DEEMO -Reborn-");

                    var ResolutionWidthBaseAddr  = vam.ReadInt64((IntPtr)BaseAddress + 0x01604030);
                    var ResolutionHeightBaseAddr = vam.ReadInt64((IntPtr)BaseAddress + 0x01604030);

                    var widthBuffer  = vam.ReadInt64((IntPtr)(ResolutionWidthBaseAddr + ResWidthOffsets[0]));
                    var heightBuffer = vam.ReadInt64((IntPtr)(ResolutionHeightBaseAddr + ResHeightOffsets[0]));

                    for (int offset = 1; offset < ResWidthOffsets.Length - 1; offset++)
                    {
                        widthBuffer  = vam.ReadInt64((IntPtr)(widthBuffer + ResWidthOffsets[offset]));
                        heightBuffer = vam.ReadInt64((IntPtr)(heightBuffer + ResHeightOffsets[offset]));
                    }

                    IntPtr ResolutionWidth  = (IntPtr)(widthBuffer + ResWidthOffsets[ResWidthOffsets.Length - 1]);
                    IntPtr ResolutionHeight = (IntPtr)(heightBuffer + ResHeightOffsets[ResHeightOffsets.Length - 1]);

                    vam.WriteInt32(ResolutionWidth, targetWidth);
                    vam.WriteInt32(ResolutionHeight, targetHeight);
                }
            }
        }
예제 #3
0
        public int buscarCiegaPokerstars()
        {
            Process[] p = Process.GetProcessesByName(process);
            foreach (ProcessModule m in p[0].Modules)
            {
                if (m.ModuleName == "PokerStars.exe")
                {
                    direccionBase = (int)m.BaseAddress;//Leer adress base
                }
                if (m.ModuleName == "THREADSTACK0")
                {
                    direccionBase2 = (int)m.BaseAddress;
                }
            }
            VAMemory vam = new VAMemory();

            vam.processName = process;
            try
            {
                string[] splitMitad = p[0].MainWindowTitle.Split(new char[] { '/' });
                string   splitCiega = splitMitad[1].Split(' ')[0].Replace("$", "");
                return(Convert.ToInt32(splitCiega) * 100);
            }
            catch
            {
                return(0);
            }
        }
예제 #4
0
            public static bool EnsureGame()
            {
                if (Game == null)
                {
                    if (Process.GetProcessesByName("puyopuyotetris").Length != 0)
                    {
                        Game = new VAMemory("puyopuyotetris");

                        _FTX      = new Modules.FTX();
                        _PPS      = new Modules.PPS();
                        _APM      = new Modules.APM();
                        _APC      = new Modules.APC();
                        _KPP      = new Modules.KPP();
                        _Finesse  = new Modules.Finesse();
                        _Rating   = new Modules.Rating();
                        _Duration = new Modules.Duration();
                        _Inputs   = new Modules.Inputs();
                    }
                    else
                    {
                        return(false);
                    }
                }
                else if (Process.GetProcessesByName("puyopuyotetris").Length == 0)
                {
                    Game = null;
                    return(false);
                }

                return(true);
            }
예제 #5
0
        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox4.Checked)
            {
                VAMemory vam = new VAMemory("ac_client");

                IntPtr acBase = Process.GetProcessesByName("ac_client").FirstOrDefault().MainModule.BaseAddress + 0x0003D3A4;
                IntPtr off    = IntPtr.Add((IntPtr)vam.ReadInt32(acBase), 0x108);

                int readEdit = vam.ReadInt32((IntPtr)off);

                vam.WriteInt32((IntPtr)off, 16777472);

                //string showEdit = readEdit.ToString();

                //MessageBox.Show(showEdit);
            }
            else if (checkBox4.Checked == false)
            {
                VAMemory vam = new VAMemory("ac_client");

                IntPtr acBase = Process.GetProcessesByName("ac_client").FirstOrDefault().MainModule.BaseAddress + 0x0003D3A4;

                IntPtr off = IntPtr.Add((IntPtr)vam.ReadInt32(acBase), 0x108);

                int readEdit = vam.ReadInt32((IntPtr)off);

                vam.WriteInt32((IntPtr)off, 0);

                //string showEdit = readEdit.ToString();

                //MessageBox.Show(showEdit);
            }
        }
예제 #6
0
 // Token: 0x0600000D RID: 13 RVA: 0x00002144 File Offset: 0x00000344
 public byte[] ReadByteArray(IntPtr pOffset, uint pSize)
 {
     if (this.processHandle == IntPtr.Zero)
     {
         this.CheckProcess();
     }
     byte[] result;
     try
     {
         uint flNewProtect;
         VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, 4U, out flNewProtect);
         byte[] array = new byte[pSize];
         VAMemory.ReadProcessMemory(this.processHandle, pOffset, array, pSize, 0U);
         VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)pSize, flNewProtect, out flNewProtect);
         result = array;
     }
     catch (Exception ex)
     {
         if (VAMemory.debugMode)
         {
             Console.WriteLine("Error: ReadByteArray" + ex.ToString());
         }
         result = new byte[1];
     }
     return(result);
 }
        public static Angles getCurrentAngles(VAMemory vam, int engine)
        {
            float x = vam.ReadFloat((IntPtr)(vam.ReadInt32((IntPtr)(engine + Offsets.oClientState)) + Offsets.oViewAngles));
            float y = vam.ReadFloat((IntPtr)(vam.ReadInt32((IntPtr)(engine + Offsets.oClientState)) + Offsets.oViewAngles + 4));

            return(new Angles(x, y));
        }
예제 #8
0
        public static void RMain()
        {
            if (bAddress != 0)
            {
                VAMemory mem   = new VAMemory(MainClass.injProc);
                int      fjump = bAddress + Offsets.J;



                int ALocalPlayer = bAddress + Offsets.LP;
                int LocalPlayer  = mem.ReadInt32((IntPtr)ALocalPlayer);

                int AJFlag = LocalPlayer + Offsets.JF;
                while (true && RabbitStatus)
                {
                    while (GetAsyncKeyState(32) != 0)
                    {
                        int JStat = mem.ReadInt32((IntPtr)AJFlag);
                        if (JStat == 257)
                        {
                            mem.WriteInt32((IntPtr)fjump, 6);
                        }
                    }
                }
            }
        }
예제 #9
0
        static void Main(string[] args)
        {
            VAMemory vam = new VAMemory(process);

            if (GetModuleAddy())
            {
                int fjump = bClient + aJump;

                aLocalPlayer = bClient + aLocalPlayer;

                int LocalPlayer = vam.ReadInt32((IntPtr)aLocalPlayer);

                int aFlags = LocalPlayer + oFlags;

                while (true)
                {
                    while (GetAsyncKeyState(32) > 0)
                    {
                        int Flags = vam.ReadInt32((IntPtr)aFlags);
                        if (Flags == 257)
                        {
                            vam.WriteInt32((IntPtr)fjump, 5);
                            Thread.Sleep(10);
                            vam.WriteInt32((IntPtr)fjump, 4);
                        }
                    }
                }
            }
        }
        public static bool WorldToScreen(Vector3 from, ref Point point, VAMemory vam, float[][] m_vMatrix, RECT rectangle)
        {
            float w = 0.0f;

            Point to = new Point();

            to.x = m_vMatrix[0][0] * from.x + m_vMatrix[0][1] * from.y + m_vMatrix[0][2] * from.z + m_vMatrix[0][3];
            to.y = m_vMatrix[1][0] * from.x + m_vMatrix[1][1] * from.y + m_vMatrix[1][2] * from.z + m_vMatrix[1][3];
            w    = m_vMatrix[3][0] * from.x + m_vMatrix[3][1] * from.y + m_vMatrix[3][2] * from.z + m_vMatrix[3][3];

            if (w < 0.01f)
            {
                return(false);
            }

            Vector3 temp;

            temp.x = to.x / w;
            temp.y = to.y / w;

            int width  = rectangle.Right - rectangle.Left;
            int height = rectangle.Bottom - rectangle.Top;

            float x = width / 2;
            float y = height / 2;

            x += (float)(0.5 * temp.x * width + 0.5);
            y -= (float)(0.5 * temp.y * height + 0.5);

            to.x = x + rectangle.Left;
            to.y = y + rectangle.Top;

            point = to;
            return(true);
        }
예제 #11
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                checkGame();
                if (gameOn)
                {
                    // start memory object and calculate values
                    vam                 = new VAMemory(procName);                                              // initilize a Memory reader object
                    baseAddress         = (int)Process.GetProcessesByName(procName)[0].MainModule.BaseAddress; // get the Base Address, which we use to get all the other addresses
                    playerBaseAddress   = vam.ReadInt32((IntPtr)baseAddress + playerAddress);                  // the player base address is basically the starting point
                    playerHealthAddress = playerBaseAddress + playerHealthOffset;                              // the player health address is calculated by adding the health offset to the player Base Address

                    //check if any checkbox is checked
                    if (godMode.Checked == true)
                    {
                        vam.WriteFloat((IntPtr)playerHealthAddress, 100); // write to the memory the value 100, so in another words 'unlimited health'
                    }
                }
                else
                {
                }
            }
            catch (Exception)
            {
                throw;
            }
            GC.Collect();
        }
        public void UpdateProcess()
        {
            var procs = Process.GetProcessesByName(GetProcessName());


            if (procs.Length > 0)
            {
                myProcess = procs[0];
            }

            while (myProcess == null)
            {
                if (procs.Length > 0)
                {
                    myProcess = procs[0];
                    continue;
                }
                else
                {
                    myProcess = null;

                    Thread.Sleep(50);
                    FlipProc();
                    procs = Process.GetProcessesByName(GetProcessName());
                }
            }

            UpdateModules(myProcess);
            haloMods.UpdateButtons();

            memory = new VAMemory(myProcess.ProcessName);
        }
예제 #13
0
    // Token: 0x06000021 RID: 33 RVA: 0x00002A08 File Offset: 0x00000C08
    public bool WriteByteArray(IntPtr pOffset, byte[] pBytes)
    {
        if (this.processHandle == IntPtr.Zero)
        {
            this.CheckProcess();
        }
        bool result;

        try
        {
            uint flNewProtect;
            VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)((ulong)((long)pBytes.Length)), 4U, out flNewProtect);
            bool flag = VAMemory.WriteProcessMemory(this.processHandle, pOffset, pBytes, (uint)pBytes.Length, 0U);
            VAMemory.VirtualProtectEx(this.processHandle, pOffset, (UIntPtr)((ulong)((long)pBytes.Length)), flNewProtect, out flNewProtect);
            result = flag;
        }
        catch (Exception ex)
        {
            if (VAMemory.debugMode)
            {
                Console.WriteLine("Error: WriteByteArray" + ex.ToString());
            }
            result = false;
        }
        return(result);
    }
예제 #14
0
        static void Main(string[] args)
        {
            Random   rnd = new Random();
            VAMemory vam = new VAMemory(process);

            string        driveInstructions;
            StringBuilder sb = new StringBuilder("", 120);

            for (int i = 0; i < 120; i++)
            {
                sb.Append(rnd.Next(9).ToString());
            }
            driveInstructions = sb.ToString();
            driveInstructions = "1111111111111111111111111111111111111111111111111";
            Console.WriteLine("CURRENT INSTRUCTION: " + driveInstructions + "\nRestart the round");
            while (true)
            {
                Thread.Sleep(100);
                if (vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)vam.ReadInt32((IntPtr)TmForeverBaseAdress + 0x0096847C) + 0x100) + 0x5B4) + 0x24) + 0x30C) + 0x4B0) == 0)
                {
                    foreach (char c in driveInstructions)
                    {
                        Console.Write(c);
                        Drive(c, 250);
                    }
                }
            }
        }
        public static Vector3 getPlayerVectorByIndex(VAMemory vam, int bClient, int index)
        {
            float x = 0f, y = 0f, z = 0f;
            //get enemy coords;

            int PtrToPIC = vam.ReadInt32((IntPtr)(bClient + Offsets.oEntityList + (index) * Offsets.oEntityLoopDistance));

            if (PtrToPIC != 0)
            {
                x = vam.ReadFloat((IntPtr)(PtrToPIC + Offsets.vecOrigin));
                y = vam.ReadFloat((IntPtr)(PtrToPIC + Offsets.vecOrigin + 4));
                z = vam.ReadFloat((IntPtr)(PtrToPIC + Offsets.vecOrigin + 8));
                if (x == 0 || y == 0 || z == 0)
                {
                    x = 99999999f;
                    y = 99999999f;
                    z = 99999999f;
                }
                return(new Vector3(x, y, z));
            }
            else
            {
                return(new Vector3(999999f, 999999f, 999999f));
            }
        }
예제 #16
0
        public static void Memory()
        {
            Process[] processes = Process.GetProcessesByName("otpdx_beta");
            if (processes.Length > 0)
            {
                IntPtr  BaseAddress = IntPtr.Zero;
                Process MYProc      = processes[0];
                foreach (ProcessModule module in MYProc.Modules)
                {
                    if (module.ModuleName.Contains("otpdx_beta"))
                    {
                        BaseAddress = module.BaseAddress;
                        //MessageBox.Show(BaseAddres.ToString());
                    }
                }

                if (BaseAddress != IntPtr.Zero)
                {
                    VAMemory memory = new VAMemory("otpdx_beta");
                    //x-y
                    int finalAddress = memory.ReadInt32((IntPtr)BaseAddress + +0x00384810);
                    Setting.chary = memory.ReadInt32((IntPtr)finalAddress + 0x84C);
                    Setting.charx = memory.ReadInt32((IntPtr)finalAddress + 0x848);
                    ////pokehp
                    //int PokeAddr = memory.ReadInt32((IntPtr)BaseAddress + +0x00384810);
                    //Setting.chary = memory.ReadInt32((IntPtr)PokeAddr + 0x84C);
                    //Setting.charx = memory.ReadInt32((IntPtr)PokeAddr + 0x848);
                    ////charhp
                    //int CharAddr= memory.ReadInt32((IntPtr)BaseAddress + +0x00384810);
                    //Setting.chary = memory.ReadInt32((IntPtr)CharAddr + 0x84C);
                    //Setting.charx = memory.ReadInt32((IntPtr)CharAddr + 0x848);
                }
            }
        }
예제 #17
0
        private void BloodlossInjuries_Click(object sender, EventArgs e)
        {
            VAMemory heal = new VAMemory(processName);

            heal.WriteFloat((IntPtr)Offset98 + 0x3f0, 0);

            heal.WriteFloat((IntPtr)Offset98 + 0x3ec, 0);
        }
예제 #18
0
        public Memory(IntPtr handle, string processName)
        {
            this.handle = handle;
            vam         = new VAMemory(processName);

            size = 64;
            buf  = Marshal.AllocHGlobal(size);
        }
예제 #19
0
        public int GetPlayerCount(VAMemory vam)
        {
            Int32 enginebaseaddress = GetModuleBaseAddress(process, "engine.dll");
            Int32 playercount       = vam.ReadInt32((IntPtr)enginebaseaddress + a_playercount);

            playercount = vam.ReadInt32((IntPtr)playercount + o_playercount);
            return(playercount);
        } //reading this too often seems to break shit
예제 #20
0
 public bool InGame(VAMemory vam, Int32 localplayeraddr)
 {
     if (vam.ReadInt32((IntPtr)GetModuleBaseAddress(process, modulename) + a_localplayer) != 0x00)
     {
         return(true);
     }
     return(false);
 }
예제 #21
0
        static void Main(string[] args)
        {
            VAMemory vam = new VAMemory("ac_client");

            Base = vam.ReadInt32((IntPtr)Base);

            while (true)
            {
                int Helfaddress = Base + healf;
                if (Helfaddress != 1337)
                {
                    vam.WriteInt32((IntPtr)Helfaddress, 1337);
                }
                int PistalAmmoaddress = Base + pistelammo;
                if (PistalAmmoaddress != 1337)
                {
                    vam.WriteInt32((IntPtr)PistalAmmoaddress, 1337);
                }
                int DPPistelammo = Base + DPpistelammo;
                if (DPPistelammo != 1337)
                {
                    vam.WriteInt32((IntPtr)DPPistelammo, 1337);
                }
                int lmgammoddress = Base + lmgammo;
                if (lmgammoddress != 1337)
                {
                    vam.WriteInt32((IntPtr)lmgammoddress, 1337);
                }

                int Pistalreloadaddress = Base + pistelreload;
                if (Pistalreloadaddress != 88)
                {
                    vam.WriteInt32((IntPtr)Pistalreloadaddress, 88);
                }
                int DPPistelReloadaddres = Base + DPpistelreload;
                if (Pistalreloadaddress != 88)
                {
                    vam.WriteInt32((IntPtr)DPPistelReloadaddres, 88);
                }
                int lmgreloadddress = Base + lmgreload;
                if (lmgreloadddress != 88)
                {
                    vam.WriteInt32((IntPtr)lmgreloadddress, 88);
                }

                int neightsammount = Base + neights;
                if (neightsammount != 1337)
                {
                    vam.WriteInt32((IntPtr)neightsammount, 1337);
                }
                int kevlerammount = Base + kevler;
                if (kevlerammount != 888)
                {
                    vam.WriteInt32((IntPtr)kevlerammount, 888);
                }
                System.Threading.Thread.Sleep(100);
            }
        }
예제 #22
0
        static void Main(string[] args)
        {
            Console.Title = "Terraria fishing bot for verion 1.4.1.1";
            Process[] processes = Process.GetProcessesByName("Terraria");
            if (processes.Length > 0)
            {
                IntPtr  BaseAdress = IntPtr.Zero;
                Process MYProc     = processes[0];

                foreach (ProcessModule module in MYProc.Modules)
                {
                    if (module.ModuleName.ToLower().Contains("asw"))
                    {
                        BaseAdress = module.BaseAddress;
                    }
                }
                if (BaseAdress != IntPtr.Zero)
                {
                    VAMemory memory      = new VAMemory("Terraria");
                    int      finalAdress = memory.ReadInt32((IntPtr)BaseAdress + 0x00159B24);

                    Console.WriteLine("Press enter when you're ready ");
                    Console.ReadLine();
                    Console.WriteLine("starting in:");
                    for (int i = 5; i > 0; i--)
                    {
                        Console.WriteLine(i);
                        Thread.Sleep(1000);
                    }

                    while (true)
                    {
                        catched = false;
                        Click();
                        Console.WriteLine("the rod was thrown");
                        Thread.Sleep(2000);

                        while (catched == false)
                        {
                            byte x = memory.ReadByte((IntPtr)finalAdress + 0x170); //reading value from memory
                            if (x != 0)
                            {
                                Thread.Sleep(100);
                                Console.WriteLine($"you got a fish");
                                Click();
                                catched = true;
                            }
                        }
                        Thread.Sleep(2000);
                    }
                }
            }
            else
            {
                Console.WriteLine("You have to start terraria first.");
                Console.ReadLine();
            }
        }
예제 #23
0
 /// <summary>
 /// Initialize a new Process. May return <see cref="ProcessNotFoundException"/> if it could not locate the process specified by its window's title.
 /// </summary>
 /// <param name="window_title"></param>
 public Process(string window_title)
 {
     if (!SethWnd(window_title)) // true if succeeded
     {
         throw ProcessNotFoundException;
     }
     memory      = new VAMemory(window_title);
     WindowTitle = window_title;
 }
예제 #24
0
        public static IntPtr PointRead(IntPtr baseAddres, int[] offsets)
        {
            VAMemory vam = new VAMemory(LordsMobileAPI.Settings.GetProcess);

            for (int i = 0; i < offsets.Count() - 1; i++)
            {
                baseAddres = (IntPtr)vam.ReadInt64(IntPtr.Add(baseAddres, offsets[i]));
            }
            return(baseAddres + offsets[offsets.Count() - 1]);
        }
            public static IntPtr PointRead(IntPtr baseAddres, int[] offsets)
            {
                VAMemory vam = new VAMemory(Process.GetProcessesByName("Lords Mobile").FirstOrDefault());

                for (int i = 0; i < offsets.Count() - 1; i++)
                {
                    baseAddres = (IntPtr)vam.ReadInt64(IntPtr.Add(baseAddres, offsets[i]));
                }
                return(baseAddres + offsets[offsets.Count() - 1]);
            }
예제 #26
0
 public MemoryManager(string process)//, Int32 baseAddress)
 {
     this.vam     = new VAMemory(process);
     this.process = Process.GetProcessesByName(process).FirstOrDefault();
     //var baseAddress = (IntPtr)vam.ReadInt32(GetAddressSigScan(@"\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x83\xc4\x00\x8b\xe5\x5d\xc3\xcc\xcc\xcc\xcc\xcc\xcc\x55\x8b\xec\x83\xec\x00\x8d\x45\x00\xb9\x00\x00\x00\x00\x50\x8d\x45\x00\x50\x6a\x00\xe8\x00\x00\x00\x00\x8d\x45\x00\xb9\x00\x00\x00\x00\x50\x50\xe8\x00\x00\x00\x00\x8a\x45\x00\x88\x45\x00\x8d\x45\x00\x50\x8d\x45\x00\xc7\x45\x00\x00\x00\x00\x00\x50\x68\x00\x00\x00\x00\x68\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x83\xc4\x00\x3d\x00\x00\x00\x00\x75\x00\x83\xe8\x00\x8b\x00\x68\x00\x00\x00\x00\xa3\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x83\xc4\x00\x8b\xe5\x5d\xc3\xcc\xcc\xcc\xcc\xcc\xcc\xb9\x00\x00\x00\x00\xe8\x00\x00\x00\x00\xb9\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x05\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x68\x00\x00\x00\x00\xa3\x00\x00\x00\x00\xe8\x00\x00\x00\x00\x59\xc3\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xb9",
     //                                "xx????????xx????????xx????????xx????????x????xx?xxxxxxxxxxxxxxx?xx?x????xxx?xx?x????xx?x????xxx????xx?xx?xx?xxx?xx?????xx????x????x????xx?x????x?xx?xxx????x????xx????????xx????????xx????????xx????????x????xx?xxxxxxxxxxx????x????x????xx????????xx????????x????x????x????x????xxxxxxxxxx")
     //                                + 0x2) + 0x540;
     //Console.WriteLine("Read Address: 0x" + this.baseAddress.ToString("X"));
     //Console.WriteLine("Value at address: " + vam.ReadInt32(this.baseAddress).ToString("X"));
 }
        public static bool isAlive(int index, VAMemory vam, int bClient)
        {
            int baseentity = vam.ReadInt32((IntPtr)(bClient + Offsets.oEntityList + (index) * Offsets.oEntityLoopDistance));

            if (vam.ReadInt32((IntPtr)(baseentity + Offsets.oHealth)) > 0 && vam.ReadInt32((IntPtr)(baseentity + Offsets.oHealth)) <= 100)
            {
                return(true);
            }
            return(false);
        }
        public static Vector3 getLocalPlayerPosition(VAMemory vam, int bClient)
        {
            int   playerIndex = vam.ReadInt32((IntPtr)(vam.ReadInt32((IntPtr)(bClient + Offsets.oLocalPlayer)) + 0x64));
            int   start       = vam.ReadInt32((IntPtr)(bClient + Offsets.oEntityList + (playerIndex - 1) * Offsets.oEntityLoopDistance));
            float x           = vam.ReadFloat((IntPtr)(start + Offsets.vecOrigin));
            float y           = vam.ReadFloat((IntPtr)(start + Offsets.vecOrigin + 4));
            float z           = vam.ReadFloat((IntPtr)(start + Offsets.vecOrigin + 8));

            return(new Vector3(x, y, z));
        }
예제 #29
0
        public List <EnemigosGedientos> buscarEnemigos()
        {
            Process[] p = Process.GetProcessesByName(process);
            foreach (ProcessModule m in p[0].Modules)
            {
                if (m.ModuleName == "PokerStars.exe")
                {
                    direccionBase = (int)m.BaseAddress;//Leer adress base
                }
                if (m.ModuleName == "THREADSTACK0")
                {
                    direccionBase2 = (int)m.BaseAddress;
                }
            }
            VAMemory vam = new VAMemory();

            vam.processName = process;
            int read  = vam.ReadInt32((IntPtr)direccionBase + offsetBase);
            int read2 = vam.ReadInt32((IntPtr)read + 0x10);
            int read3 = vam.ReadInt32((IntPtr)read2 + 0x0);
            List <EnemigosGedientos> lista = new List <EnemigosGedientos>();

            //            0x30 para bit de vida o no
            for (int i = 0; i < 6; i++)
            {
                EnemigosGedientos enemigo = new EnemigosGedientos();
                int multiplicador         = i * 0x138;
                #region buscarCartas
                string carta1 = vam.ReadByte((IntPtr)read3 + 0xF54 + multiplicador).ToString();
                string palo1  = vam.ReadByte((IntPtr)read3 + 0xF58 + multiplicador).ToString();
                string carta2 = vam.ReadByte((IntPtr)read3 + 0xF5C + multiplicador).ToString();
                string palo2  = vam.ReadByte((IntPtr)read3 + 0xF60 + multiplicador).ToString();
                carta1 = convertirCarta(carta1, palo1);
                carta2 = convertirCarta(carta2, palo2);
                string cartas = carta1 + " " + carta2;
                #endregion
                enemigo.ID         = i;
                enemigo.carta1     = carta1;
                enemigo.carta2     = carta2;
                enemigo.pozo       = vam.ReadInt32((IntPtr)read3 + 0x0F10 + multiplicador);
                enemigo.apuesta    = vam.ReadInt32((IntPtr)read3 + 0xF20 + multiplicador);
                enemigo.cuantoGano = vam.ReadInt32((IntPtr)read3 + 0x0F28 + multiplicador);
                enemigo.cartas     = cartas;
                if (vam.ReadByte((IntPtr)read3 + 0x0F40 + multiplicador) == 1)
                {
                    enemigo.vivo = true;
                }
                else
                {
                    enemigo.vivo = false;
                }
                lista.Add(enemigo);
            }
            return(lista);
        }
예제 #30
0
        public Form1()
        {
            InitializeComponent();

            Vam = new VAMemory("psychonauts");
            if (!Vam.CheckProcess())
            {
                Environment.Exit(0);
            }
            _hookID = SetHook(_proc);
        }