Notifications
Clear all

PCLib.dll release

Page 3 / 4

xxeviljesusxx
Posts: 0
(@xxeviljesusxx)
New RivalGamer
Joined: 9 years ago

hmm nicely done

Reply
KiLLerBoy_001
Posts: 25
(@KiLLerBoy_001)
Eminent RivalGamer
Joined: 8 years ago

nice does this require andy further base address asigning or is that all achieved at "PC.Game = "DuckGame";"time ?

Reply
Cain532
Posts: 1280
Topic starter
(@cain532)
Noble RivalGamer
Joined: 9 years ago

nice does this require andy further base address asigning or is that all achieved at "PC.Game = "DuckGame";"time ?

Not 100% sure tbh :X the PC.Gme = "DuckGame" hooks to the process name, so are essentially just hooking to the primary process (if I understand it correctly)

this .dll needs a bit more work and I really should update it... Hope that answers your question!

Reply
KiLLerBoy_001
Posts: 25
(@KiLLerBoy_001)
Eminent RivalGamer
Joined: 8 years ago

Well as you might know alot of pc hacking is like BaseAdress + Pointer = Adress

So without the baseadress its kinda useless... Base adress is the adress the game starts at in memory
If your functions alsready include a Calc for that ( although unlikely would kinda not work with pointers (Since they point to original adress and that already includes base adress ))

Example

Game's Base adress = 0x0256465;

If my found pointer = 0x02ACF7C8; That means its actually 0x0256465 + 0x02ACF7C8
This pointer points to 0x258AF00008 and thats the adress we want to alter.

if it did include baseadress on al reads / writes that would mean it would always add 0x0256465 , thats what we dont need.

In short we need a function thats like

Address =PC.Pointer(02ACF7C8);

and adress should in this example result in 0x258AF00008

and its only in this function where is should add the Base Adress

Just add these definers

	
	    using System.Windows.Forms;
	
	    public class Mem
	    {
	        public string Game;
	        protected Process[] MyProcess;
	        protected int processHandle;
	        public ulong BaseAdress;
	
	

and add

	
	
	        [DllImport("kernel32.dll")]
	        public static extern int OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
	        public bool Attach(string ProcessName)
	        {
	            this.Game = ProcessName;
	            if (this.Game != "")
	            {
	                this.MyProcess = Process.GetProcessesByName(this.Game);
	                if (this.MyProcess.Length == 0)
	                {
	                    MessageBox.Show(this.Game + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
	                    return false;
	                }
	                this.processHandle = OpenProcess(2035711, false, this.MyProcess[0].Id);
	                if (this.processHandle == 0)
	                {
	                    MessageBox.Show(this.Game + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
	                    return false;
	                }
	                Process[] processes = Process.GetProcessesByName("MineSweeper");
	                Process mProc = processes[0];
	                IntPtr hProc = mProc.Handle;
	
	                this.BaseAdress = Convert.ToUInt64(processes[0].MainModule.EntryPointAddress.ToInt64());
	                return true;
	            }
	            MessageBox.Show("Define process name first!");
	            return false;
	        }
	
	
	        public ulong ReadPointer(uint offset)
	        {
	            return this.ReadUInt64(Convert.ToUInt32(this.BaseAdress + offset));
	        }
	
	        public long ReadPointer(uint offset)
	        {
	            return this.ReadInt64(this.BaseAdress + offset);
	        }
	

then you can use PC.Attach("GameName")

that wil get the BaseAdress and you can use ReadPointer(0x024354) to use the pointer ontop of the base adress and return the offset you want

Reply
Cain532
Posts: 1280
Topic starter
(@cain532)
Noble RivalGamer
Joined: 9 years ago

Well as you might know alot of pc hacking is like BaseAdress + Pointer = Adress

So without the baseadress its kinda useless... Base adress is the adress the game starts at in memory
If your functions alsready include a Calc for that ( although unlikely would kinda not work with pointers (Since they point to original adress and that already includes base adress ))

Example

Game's Base adress = 0x0256465;

If my found pointer = 0x02ACF7C8; That means its actually 0x0256465 + 0x02ACF7C8
This pointer points to 0x258AF00008 and thats the adress we want to alter.

if it did include baseadress on al reads / writes that would mean it would always add 0x0256465 , thats what we dont need.

In short we need a function thats like

Address =PC.Pointer(02ACF7C8);

and adress should in this example result in 0x258AF00008

and its only in this function where is should add the Base Adress

Just add these definers

	
	    using System.Windows.Forms;
	
	    public class Mem
	    {
	        public string Game;
	        protected Process[] MyProcess;
	        protected int processHandle;
	        public ulong BaseAdress;
	
	

and add

	
	
	        [DllImport("kernel32.dll")]
	        public static extern int OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
	        public bool Attach(string ProcessName)
	        {
	            this.Game = ProcessName;
	            if (this.Game != "")
	            {
	                this.MyProcess = Process.GetProcessesByName(this.Game);
	                if (this.MyProcess.Length == 0)
	                {
	                    MessageBox.Show(this.Game + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
	                    return false;
	                }
	                this.processHandle = OpenProcess(2035711, false, this.MyProcess[0].Id);
	                if (this.processHandle == 0)
	                {
	                    MessageBox.Show(this.Game + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
	                    return false;
	                }
	                Process[] processes = Process.GetProcessesByName("MineSweeper");
	                Process mProc = processes[0];
	                IntPtr hProc = mProc.Handle;
	
	                this.BaseAdress = Convert.ToUInt64(processes[0].MainModule.EntryPointAddress.ToInt64());
	                return true;
	            }
	            MessageBox.Show("Define process name first!");
	            return false;
	        }
	
	
	        public ulong ReadPointer(uint offset)
	        {
	            return this.ReadUInt64(Convert.ToUInt32(this.BaseAdress + offset));
	        }
	
	        public long ReadPointer(uint offset)
	        {
	            return this.ReadInt64(this.BaseAdress + offset);
	        }
	

then you can use PC.Attach("GameName")

that wil get the BaseAdress and you can use ReadPointer(0x024354) to use the pointer ontop of the base adress and return the offset you want

Ok, that is a wealth of great information, can I get with you on Skype and maybe have you help me update this PCLib and make it as amazing as I know it can be?

Reply
Page 3 / 4