Exemple #1
0
        public static int ReadBallByte(IntPtr handle, pointerset ps, int finalAdjust)
        {
            //Start with the base address's value
            var addr = ps.GetBaseAddress();
            //   Console.WriteLine("b:", addr.ToString("X"));
            if (ps.Offsets == null) return 0;
            for (var i = 0; i < ps.Offsets.Length; i++)
            {

                var preOffset = ps.Offsets[i];

                if ((ps.Offsets.Length - 1) == i)
                {
                    preOffset += finalAdjust;

                    string newScore = ReadProcessMemoryByte(handle, addr + preOffset);

                    return Convert.ToInt32(newScore);
                }

                //Get each offset
                // Console.WriteLine((i + 1) + "NextAddr:" + (addr + preOffset).ToString("X"));
                var offset = ReadProcessMemory(handle, addr + preOffset);

                //  Console.WriteLine((i + 1) + "Offset:" + offset.ToString("X"));
                //Set the offset
                addr = offset;
                //Console.WriteLine((i + 1) + "Addr:" + addr.ToString("X"));
            }
            //  Console.WriteLine("Last addr:" + addr.ToString("X"));

            return 0;
        }
Exemple #2
0
        public static int ReadProcessMemoryOffset(IntPtr handle, pointerset ps, int finalAdjust)
        {
            //Start with the base address's value
            var addr = ps.GetBaseAddress(); // ReadProcessMemory(handle, ps.baseAddress);
            Console.WriteLine("b:", addr.ToString("X"));
            for (var i = 0; i < ps.Offsets.Length; i++)
            {

                var preOffset = ps.Offsets[i];

                if ((ps.Offsets.Length - 1) == i)
                {
                    preOffset += finalAdjust;
                }

                //Get each offset
                // Console.WriteLine((i + 1) + "NextAddr:" + (addr + preOffset).ToString("X"));
                var offset = ReadProcessMemory(handle, addr + preOffset);

                Console.WriteLine((i + 1) + "Offset:" + offset.ToString("X"));
                //Set the offset
                addr = offset;
                Console.WriteLine((i + 1) + "Addr:" + addr.ToString("X"));
            }
            Console.WriteLine("Last addr:" + addr.ToString("X"));
            return addr;
        }