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 


[delphi]exe name to AddressPointer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
bonparadorn
How do I cheat?
Reputation: 0

Joined: 09 Apr 2012
Posts: 3

PostPosted: Mon Apr 06, 2015 5:24 am    Post subject: [delphi]exe name to AddressPointer Reply with quote

AddressPointer := pdword(pdword(pdword(pdword(pdword("help.exe"+$87A870)^+$3a8)^+$404)^+$160)^+$40)^+$284;

What to do?
Back to top
View user's profile Send private message
snowpatroll
How do I cheat?
Reputation: 0

Joined: 28 Mar 2015
Posts: 4

PostPosted: Tue Apr 07, 2015 3:15 am    Post subject: Reply with quote

only you see how much it will add to addres ..
for example

CE: 87A870
Editing: example.exe + 7A870

then example.exe = 800000
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25817
Location: The netherlands

PostPosted: Tue Apr 07, 2015 5:02 am    Post subject: Reply with quote

use getmodulehandle to get the base of game.exe.
this is an injected dll right? because if not you have to start all over

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
autisticrage85
Newbie cheater
Reputation: 0

Joined: 19 Apr 2015
Posts: 11

PostPosted: Thu Apr 23, 2015 8:02 am    Post subject: Reply with quote

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);
  Win32Check(PHandle <> 0);
  Win32Check(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 matches with the name of module we are looking for...
    begin
      Win32Check(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;


Code:
Useage: GetModuleBaseAddress(ProcessEntry.th32ProcessID, ProcessEntry.szExeFile)


This was posted in a snippet here already by someone else. If your injecting a DLL into the process GetModuleHandle('help.exe') will give you your base address.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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