 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Biribahiba Newbie cheater
Reputation: 0
Joined: 09 Jan 2011 Posts: 10
|
Posted: Thu Oct 13, 2011 12:53 pm Post subject: Help on delphi? |
|
|
Well, I was creating another hack yesterday and I discovered a pointer that is quite hard to work with. Take a look.
Pointer: CryPhysics.dll +002BF344 ^708
Offset: 68C
Yup, the pointer have an offset, and then, another offset for the speed hack address. Weird, han?
I am trying to work just like this:
Code: | read(read(read('CryPhysics.dll' +$002BF344)^+$708)^+$68C); | and it gives me 2 errors:
Incopatible tipes: String and Integer;
Left side cannot be assigned to;
what do I do?
|
|
Back to top |
|
 |
Unbr0ken Advanced Cheater
Reputation: 2
Joined: 10 Aug 2011 Posts: 67
|
Posted: Fri Oct 14, 2011 2:11 am Post subject: |
|
|
As Wiccan says:
Wiccaan wrote: | 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 |
Then a example with 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: | read(read(read(GetModuleBaseAddress(ProcessID, 'CryPhysics.dll') + $002BF344)^+$708)^+$68C); |
Do a search before ask dude.
|
|
Back to top |
|
 |
|
|
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
|
|