Blocking with Offset to access Memory
Hello everyone,
I'm a new guy into the domain of games hacking but I'm very exciting to do some basics hacks in the first time. But, of course, I'm struggling with probably a small issue. I would like to ask your help
So here I'm, to practice I try to hack The Witcher 3 which is for me a game with a ton of possibilities.
I already find my base address for the health and I try to access this address into C++ but I have some problems to do it.
1) Here is my base address with his offsets where the value is a float.

2) Here is my function to get the value of the address.
DWORD GetProcessThreadID(HANDLE Process)
{
THREADENTRY32 entry;
entry.dwSize = sizeof(THREADENTRY32);
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (Thread32First(snapshot, &entry) == TRUE)
{
DWORD PID = GetProcessId(Process);
while (Thread32Next(snapshot, &entry) == TRUE)
{
if (entry.th32OwnerProcessID == PID)
{
CloseHandle(snapshot);
return entry.th32ThreadID;
}
}
}
CloseHandle(snapshot);
return NULL;
}
DWORD LoopToAddress(int pointerLevel, HANDLE handle, DWORD Offset[], DWORD BaseAddress)
{
DWORD pointer = BaseAddress;
DWORD nextP;
DWORD endAddress;
for (int i = 0; i < pointerLevel; i++)
{
if (i == 0)
{
ReadProcessMemory(handle, (LPCVOID)pointer, &nextP, sizeof(nextP), NULL);
}
endAddress = nextP + Offset[i];
ReadProcessMemory(handle, (LPCVOID)endAddress, &nextP, sizeof(nextP), NULL);
}
return endAddress;
if (GetAsyncKeyState(VK_F1))
{
float valueToTest;
DWORD OffSet[] = { 0xCC4,0x810,0x48 };
DWORD ProcessId = GetProcessThreadID(hProcHandle);
valueToTest = LoopToAddress(3, hProcHandle, OffSet, (ProcessId + 0x02BA2890));
cout << "My value is : " << valueToTest << endl;
}
}
I Assume something goes wrong with my function to loop to the address but what ? and also I search for a float and I'm using a DWORD but I don't know if it's matter or not ?
Anyone who get time to answer to this, the help will be very appreciate
!
I'm a new guy into the domain of games hacking but I'm very exciting to do some basics hacks in the first time. But, of course, I'm struggling with probably a small issue. I would like to ask your help

So here I'm, to practice I try to hack The Witcher 3 which is for me a game with a ton of possibilities.
I already find my base address for the health and I try to access this address into C++ but I have some problems to do it.
1) Here is my base address with his offsets where the value is a float.
2) Here is my function to get the value of the address.
DWORD GetProcessThreadID(HANDLE Process)
{
THREADENTRY32 entry;
entry.dwSize = sizeof(THREADENTRY32);
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if (Thread32First(snapshot, &entry) == TRUE)
{
DWORD PID = GetProcessId(Process);
while (Thread32Next(snapshot, &entry) == TRUE)
{
if (entry.th32OwnerProcessID == PID)
{
CloseHandle(snapshot);
return entry.th32ThreadID;
}
}
}
CloseHandle(snapshot);
return NULL;
}
DWORD LoopToAddress(int pointerLevel, HANDLE handle, DWORD Offset[], DWORD BaseAddress)
{
DWORD pointer = BaseAddress;
DWORD nextP;
DWORD endAddress;
for (int i = 0; i < pointerLevel; i++)
{
if (i == 0)
{
ReadProcessMemory(handle, (LPCVOID)pointer, &nextP, sizeof(nextP), NULL);
}
endAddress = nextP + Offset[i];
ReadProcessMemory(handle, (LPCVOID)endAddress, &nextP, sizeof(nextP), NULL);
}
return endAddress;
if (GetAsyncKeyState(VK_F1))
{
float valueToTest;
DWORD OffSet[] = { 0xCC4,0x810,0x48 };
DWORD ProcessId = GetProcessThreadID(hProcHandle);
valueToTest = LoopToAddress(3, hProcHandle, OffSet, (ProcessId + 0x02BA2890));
cout << "My value is : " << valueToTest << endl;
}
}
I Assume something goes wrong with my function to loop to the address but what ? and also I search for a float and I'm using a DWORD but I don't know if it's matter or not ?
Anyone who get time to answer to this, the help will be very appreciate
!