Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How do you find a base address?

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
% %
Cheater
Reputation: 1

Joined: 14 May 2011
Posts: 41

PostPosted: Sun Sep 04, 2011 6:44 pm    Post subject: How do you find a base address? Reply with quote

How do you find a base address?
and:
When I tried to write to a pointer using this code you gave me:
PWORD(dword($address)^ +$offset)^:=800

It did not compile and I could not use the code...(Delphi 7)
So can you help me with writing to a pointer and etc...????????

_________________
we are SINful.
we are watching you.
We are coming for you.
we will get you.
Back to top
View user's profile Send private message Send e-mail
atom0s
Moderator
Reputation: 156

Joined: 25 Jan 2006
Posts: 8002
Location: 127.0.0.1

PostPosted: Mon Sep 05, 2011 1:45 pm    Post subject: Reply with quote

@Unbr0ken, no need to be harsh that's not how this section is.

@[GS]HACKER, try to be a little more specific when asking for help.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
% %
Cheater
Reputation: 1

Joined: 14 May 2011
Posts: 41

PostPosted: Mon Sep 05, 2011 7:43 pm    Post subject: Re: How do you find a base address? Reply with quote

I would like to know how to find the base address of a pointer and a address....

Unbr0ken wrote:
[GS]HACKER wrote:
How do you find a base address?


Base address of?... Module?, Pointer?, wtf?... Learn to ask questions.

[GS]HACKER wrote:
and:
When I tried to write to a pointer using this code you gave me:
PWORD(dword($address)^ +$offset)^:=800

It did not compile and I could not use the code...(Delphi 7)
So can you help me with writing to a pointer and etc...????????


If you were not so lammer, you could fix it yourself and stop asking for the job done.

lol I am very new to delphi 7! And I tried Quite a lot in programming using it and I could not write to the fucking pointer(it says "wolfteam.bin"+21212) LOL thats the ice-wolf hack that allows you to be a icer while human or wolf^^

_________________
we are SINful.
we are watching you.
We are coming for you.
we will get you.
Back to top
View user's profile Send private message Send e-mail
atom0s
Moderator
Reputation: 156

Joined: 25 Jan 2006
Posts: 8002
Location: 127.0.0.1

PostPosted: Mon Sep 05, 2011 8:10 pm    Post subject: Reply with quote

For things like 'wolfteam.bin' you can get the base address of that module using the following API:
- CreateToolhelp32Snapshot
- Module32First
- Module32Last

Or using the PSAPI alternatives:
- EnumProcessModules / EnumProcessModulesEx

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Unbr0ken
Advanced Cheater
Reputation: 2

Joined: 10 Aug 2011
Posts: 67

PostPosted: Mon Sep 05, 2011 9:40 pm    Post subject: Reply with quote

Wiccaan wrote:
using the PSAPI alternatives:
- EnumProcessModules / EnumProcessModulesEx


Little example:

PsAPI;

Code:
 function GetModuleBaseAddress(ProcessID: Cardinal; MName: String): Pointer;
 var
   Modules         : Array of HMODULE;
   cbNeeded, i     : Cardinal;
   ModuleInfo      : TModuleInfo;
   ModuleName      : Array[0..MAX_PATH] of Char;
   PHandle         : THandle;
 begin
   Result := nil;
   SetLength(Modules, 1024);
   PHandle := OpenProcess(PROCESS_QUERY_INFORMATION + PROCESS_VM_READ, False, ProcessID);
   if (PHandle <> 0) then
   begin
     EnumProcessModules(PHandle, @Modules[0], 1024 * SizeOf(HMODULE), cbNeeded); //Getting the enumeration of modules
     SetLength(Modules, cbNeeded div SizeOf(HMODULE)); //Setting the number of modules
     for i := 0 to Length(Modules) - 1 do //Start the loop
     begin
       GetModuleBaseName(PHandle, Modules[i], ModuleName, SizeOf(ModuleName)); //Getting the name of module
       if AnsiCompareText(MName, ModuleName) = 0 then //If the module name match with the name of module we are looking for...
       begin
         GetModuleInformation(PHandle, Modules[i], @ModuleInfo, SizeOf(ModuleInfo)); //Get the information of module
         Result := ModuleInfo.lpBaseOfDll; //Return the information we want (The image base address)
         CloseHandle(PHandle);
         Exit;
       end;
     end;
   end;
 end;


Code:
 var
   WHandle : HWND;
   Address: DWORD;
   ProcessID : Cardinal;
 begin
   ProcessID := 0;
   WHandle := FindWindow('Softnyx', 'WolfTeam'); //Maybe should change 'Softnyx' for nil.
   GetWindowThreadProcessId(WHandle, @ProcessID);
   Address := Integer(GetModuleBaseAddress(ProcessID, 'wolfteam.bin')) + Integer($21212);


If only... you search before ask, everything would be great.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
% %
Cheater
Reputation: 1

Joined: 14 May 2011
Posts: 41

PostPosted: Wed Sep 07, 2011 2:11 pm    Post subject: Reply with quote

thanks
_________________
we are SINful.
we are watching you.
We are coming for you.
we will get you.
Back to top
View user's profile Send private message Send e-mail
DrVirus
Cheater
Reputation: 0

Joined: 05 Oct 2013
Posts: 32
Location: Planet Mercury :P

PostPosted: Thu Oct 10, 2013 9:02 am    Post subject: Reply with quote

Post Removed

~ Wiccaan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites