#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
DWORD address = 0x100579C; // This is the address that we want to read from
int value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window
hwnd = FindWindow(NULL,"EpicDuel - PvP MMORPG Play Now - Opera"); //Finds the Window
if(!hwnd) //If none, display an error
{
cout <<"Window not found!\n";
cin.get();
}
GetWindowThreadProcessId(hwnd,&pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_VM_READ,0,pid); //Get permission to read
if(!phandle) //Once again, if it fails, tell us
{
cout <<"Could not get handle!\n";
cin.get();
}
while(1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle,(void*)0x068474A8,&value,sizeof(value),0); //i changed adress with what i found on cheat engine.
cout << value << "\n"; //Display it
Sleep(1000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}
Process.exe + 2B11810
uses Classes, SysUtils, StdCtrls, Windows, JwaTlHelp32;
...
function GetBasePointerOfModule(ProcessId: DWORD; Modulename: string): Int64;
var
FSnapshotHandle: THandle;
FModulEntry32: MODULEENTRY32;
begin
Result := 0;
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, ProcessId);
try
if FSnapshotHandle <> INVALID_HANDLE_VALUE then
begin
FModulEntry32.dwSize := SizeOf(FModulEntry32);
if Module32First(FSnapshotHandle, FModulEntry32) then
repeat
if FModulEntry32.szModule = Modulename then
begin
Result := Int64(FModulEntry32.modBaseAddr);
break;
end;
until (not Module32Next(FSnapshotHandle, FModulEntry32));
end;
finally
closeHandle(FSnapshotHandle);
end;
end;
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
wchar_t *convertCharArrayToLPCWSTR(const char* charArray)
{
wchar_t* wString = new wchar_t[4096];
MultiByteToWideChar(CP_ACP, 0, charArray, -1, wString, 4096);
return wString;
}
int main()
{
DWORD address = 0x100579C; // This is the address that we want to read from
float value = 0; // This will store our value. In my case, its an integer, which is the timer
DWORD pid; //This will store our Process ID, used to read/write into the memory
HWND hwnd; //Finally a handle to our window#
char* WindowName = "Batman™: Arkham Knight";
hwnd = FindWindow(NULL, convertCharArrayToLPCWSTR(WindowName)); //Finds the Window
if (!hwnd) //If none, display an error
{
cout << "Window not found!\n";
cin.get();
}
GetWindowThreadProcessId(hwnd, &pid); //Get the process id and place it in pid
HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); //Get permission to read
if (!phandle) //Once again, if it fails, tell us
{
cout << "Could not get handle!\n";
cin.get();
}
while (1) //Forever, or until you force close the program
{
ReadProcessMemory(phandle, (void*)0x162D9A53C, &value, sizeof(value), 0); //i changed adress with what i found on cheat engine.
cout << value << "\n"; //Display it
Sleep(1000); //I was reading the timer which increases every second, so I made my program go through that loop every second
}
return 0;
}
20.5933 20.5933 20.5933 20.5933 20.5933
ReadProcessMemory(phandle,(void*)(((clienbase + value) + offset1) + offset2), &value, sizeof (value), 0)
char* WindowName = "Batman™: Arkham Knight";
w_char* WindowName = L"Batman™: Arkham Knight";
int value = 0;
int pAddress = 0;
ReadProcessMemory(phandle, (void*)24124125, &pAddress, sizeof(pAddress), 0); // If 24124125 is Hex Value, you need to modify
printf("0x%X Points to -> 0x%X\n", 24124125, pAddress);
ReadProcessMemory(phandle, (void*)(pAddress + 0x14), &value , sizeof(value), 0);
i guess i am not smart.