Solved Found static address but it changes?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
I'm working on my FFXIV bot a little more, I found the XYZ of myself in the game. When I close the game and reopen it the Z address will read the same but the other two wont.

But before i started the game the second time to check if it worked the address was 014b3058, but now it's 024a3058, how do I find the pointer address so I can just read it and +4 bytes to find the Y and -4 bytes to find the X?

ImyCvkw.jpg
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
Then I do "what writes to this address", and I get this.

So thats what points to my Z?

So I can read ffxiv.exe+10D3058 = Z ?

HXHpl4L.jpg
 

Rake

I'm not your friend
Administrator
Jan 21, 2014
12,512
78,998
2,419
ffxiv.exe+10D3058 = Z indeed. Should have no more issues after restarting the game.
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
ffxiv.exe+10D3058 = Z indeed. Should have no more issues after restarting the game.
Awesome, so when I actually create the DWORD in my project how do I actually declare one with ffxiv.exe+dword ? create a char and add it ?
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
19,938
76
Awesome, so when I actually create the DWORD in my project how do I actually declare one with ffxiv.exe+dword ? create a char and add it ?
unsigned int gameBase = (UINT)GetModuleHandleA("ffxiv.exe");
 

Rake

I'm not your friend
Administrator
Jan 21, 2014
12,512
78,998
2,419
You could also do:

C++:
DWORD dGameBase = (DWORD)GetModuleHandleA("ffxiv.exe");
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
You could also do:

C++:
DWORD dGameBase = (DWORD)GetModuleHandleA("ffxiv.exe");
Well how do I get the gamebase like that but add the offset 0x10D3058 to it?

From what I see it's not as simple as

DWORD zPos = dGameBase+0x10D3058;
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
19,938
76
Well how do I get the gamebase like that but add the offset 0x10D3058 to it?

From what I see it's not as simple as

DWORD zPos = dGameBase+0x10D3058;
It's exactly like that
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
It's exactly like that
Maybe you can see what's wrong if I actually post some code.

I pass the values to my float values and they come out wrong if I do it like this.

https://i.imgur.com/FJLbp00.png

C++:
#include <iostream>
#include <Windows.h>


#define Window L"FINAL FANTASY XIV: A Realm Reborn"

using namespace std;

void CurrentPosition();
void SavePosition();
void PrintSaved();
void Teleport();
HANDLE wProcHandle;

DWORD dGameBase = (DWORD)GetModuleHandleA("ffxiv.exe"); 
DWORD zPos = dGameBase + 0x10D3058;
DWORD yPos = zPos + 4;
DWORD xPos = zPos - 4;

//Positions to Save
float xPoss, yPoss, zPoss;
//Positions to Tele
float xTele, yTele, zTele;


int main()
{
	SetConsoleTitle(L"XYZ Position");

	HWND wHANDLE = FindWindow(0, Window); 	//Find WindowNames Window
	HDC hDCArea = GetDC(wHANDLE); //Retrieve DEVICE CONTEXT for the client specified window.
	DWORD ProcessID;
	GetWindowThreadProcessId(wHANDLE, &ProcessID);
	wProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessID);

	//If we obtain okay PID, continue.
	if( ProcessID != 0 ) 
	{ 
		// Get Process Handle 
		wProcHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcessID ); 
		if( wProcHandle == INVALID_HANDLE_VALUE || wProcHandle == NULL ) 
		{ 
			exit(0);
		} 
		else
		{	
		}
	}
	//Start Infinite Loop
	while(1)
	{
		if(GetAsyncKeyState(VK_F1))
		{
		CurrentPosition();
		}

		if(GetAsyncKeyState(VK_F2))
		{
			SavePosition();
		}

		if(GetAsyncKeyState(VK_F3))
		{
			PrintSaved();
		}

		if(GetAsyncKeyState(VK_F4))
		{
			Teleport();
		}

	}
	return 0;
}
void CurrentPosition()
{
		system("cls");
		ReadProcessMemory(wProcHandle,(void*)zPos,&zPoss,sizeof(zPoss),0);
		cout << "Z Position: " << zPoss << "\n";
		ReadProcessMemory(wProcHandle,(void*)yPos,&yPoss,sizeof(yPoss),0);
		cout << "Y Position: " << yPoss << "\n";
		ReadProcessMemory(wProcHandle,(void*)xPos,&xPoss,sizeof(xPoss),0);
		cout << "X Position: " << xPoss << "\n";
}

void SavePosition()
{
	ReadProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
	ReadProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
	ReadProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}

void PrintSaved()
{
	system("cls");
	cout << "Saved Z Position: " << zTele << "\n";
	cout << "Saved Y Position: " << yTele << "\n";
	cout << "Saved X Position: " << xTele << "\n";
}

void Teleport()
{
	WriteProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
	WriteProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
	WriteProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}
 

Rake

I'm not your friend
Administrator
Jan 21, 2014
12,512
78,998
2,419
What does that mean? RPM.. seriously?
ReadProcessMemory. ;)

He was referring to:

C++:
void CurrentPosition()
{
    system("cls");
    ReadProcessMemory(wProcHandle,(void*)zPos,&zPoss,sizeof(zPoss),0);
    cout << "Z Position: " << zPoss << "\n";
    ReadProcessMemory(wProcHandle,(void*)yPos,&yPoss,sizeof(yPoss),0);
    cout << "Y Position: " << yPoss << "\n";
    ReadProcessMemory(wProcHandle,(void*)xPos,&xPoss,sizeof(xPoss),0);
    cout << "X Position: " << xPoss << "\n";
}


void SavePosition()
{
    ReadProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
    ReadProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
    ReadProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
ReadProcessMemory. ;)

He was referring to:

C++:
void CurrentPosition()
{
    system("cls");
    ReadProcessMemory(wProcHandle,(void*)zPos,&zPoss,sizeof(zPoss),0);
    cout << "Z Position: " << zPoss << "\n";
    ReadProcessMemory(wProcHandle,(void*)yPos,&yPoss,sizeof(yPoss),0);
    cout << "Y Position: " << yPoss << "\n";
    ReadProcessMemory(wProcHandle,(void*)xPos,&xPoss,sizeof(xPoss),0);
    cout << "X Position: " << xPoss << "\n";
}


void SavePosition()
{
    ReadProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
    ReadProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
    ReadProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}

My code has no errors, its just the way it's reading my base+offset for my zPos is messed up
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
Anyone know why when i use this code it reads it out like this instead of normal float values?

Maybe you can see what's wrong if I actually post some code.

I pass the values to my float values and they come out wrong if I do it like this.

FJLbp00.png

C++:
#include <iostream>
#include <Windows.h>


#define Window L"FINAL FANTASY XIV: A Realm Reborn"

using namespace std;

void CurrentPosition();
void SavePosition();
void PrintSaved();
void Teleport();
HANDLE wProcHandle;

DWORD dGameBase = (DWORD)GetModuleHandleA("ffxiv.exe"); 
DWORD zPos = dGameBase + 0x10D3058;
DWORD yPos = zPos + 4;
DWORD xPos = zPos - 4;

//Positions to Save
float xPoss, yPoss, zPoss;
//Positions to Tele
float xTele, yTele, zTele;


int main()
{
	SetConsoleTitle(L"XYZ Position");

	HWND wHANDLE = FindWindow(0, Window); 	//Find WindowNames Window
	HDC hDCArea = GetDC(wHANDLE); //Retrieve DEVICE CONTEXT for the client specified window.
	DWORD ProcessID;
	GetWindowThreadProcessId(wHANDLE, &ProcessID);
	wProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessID);

	//If we obtain okay PID, continue.
	if( ProcessID != 0 ) 
	{ 
		// Get Process Handle 
		wProcHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcessID ); 
		if( wProcHandle == INVALID_HANDLE_VALUE || wProcHandle == NULL ) 
		{ 
			exit(0);
		} 
		else
		{	
		}
	}
	//Start Infinite Loop
	while(1)
	{
		if(GetAsyncKeyState(VK_F1))
		{
		CurrentPosition();
		}

		if(GetAsyncKeyState(VK_F2))
		{
			SavePosition();
		}

		if(GetAsyncKeyState(VK_F3))
		{
			PrintSaved();
		}

		if(GetAsyncKeyState(VK_F4))
		{
			Teleport();
		}

	}
	return 0;
}
void CurrentPosition()
{
		system("cls");
		ReadProcessMemory(wProcHandle,(void*)zPos,&zPoss,sizeof(zPoss),0);
		cout << "Z Position: " << zPoss << "\n";
		ReadProcessMemory(wProcHandle,(void*)yPos,&yPoss,sizeof(yPoss),0);
		cout << "Y Position: " << yPoss << "\n";
		ReadProcessMemory(wProcHandle,(void*)xPos,&xPoss,sizeof(xPoss),0);
		cout << "X Position: " << xPoss << "\n";
}

void SavePosition()
{
	ReadProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
	ReadProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
	ReadProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}

void PrintSaved()
{
	system("cls");
	cout << "Saved Z Position: " << zTele << "\n";
	cout << "Saved Y Position: " << yTele << "\n";
	cout << "Saved X Position: " << xTele << "\n";
}

void Teleport()
{
	WriteProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
	WriteProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
	WriteProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}
 

bzh

Newbie
Full Member
Oct 3, 2012
28
292
1
Anyone know why when i use this code it reads it out like this instead of normal float values?

FJLbp00.png

Maybe you can see what's wrong if I actually post some code.

I pass the values to my float values and they come out wrong if I do it like this.

FJLbp00.png

C++:
#include <iostream>
#include <Windows.h>


#define Window L"FINAL FANTASY XIV: A Realm Reborn"

using namespace std;

void CurrentPosition();
void SavePosition();
void PrintSaved();
void Teleport();
HANDLE wProcHandle;

DWORD dGameBase = (DWORD)GetModuleHandleA("ffxiv.exe"); 
DWORD zPos = dGameBase + 0x10D3058;
DWORD yPos = zPos + 4;
DWORD xPos = zPos - 4;

//Positions to Save
float xPoss, yPoss, zPoss;
//Positions to Tele
float xTele, yTele, zTele;


int main()
{
	SetConsoleTitle(L"XYZ Position");

	HWND wHANDLE = FindWindow(0, Window); 	//Find WindowNames Window
	HDC hDCArea = GetDC(wHANDLE); //Retrieve DEVICE CONTEXT for the client specified window.
	DWORD ProcessID;
	GetWindowThreadProcessId(wHANDLE, &ProcessID);
	wProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessID);

	//If we obtain okay PID, continue.
	if( ProcessID != 0 ) 
	{ 
		// Get Process Handle 
		wProcHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, ProcessID ); 
		if( wProcHandle == INVALID_HANDLE_VALUE || wProcHandle == NULL ) 
		{ 
			exit(0);
		} 
		else
		{	
		}
	}
	//Start Infinite Loop
	while(1)
	{
		if(GetAsyncKeyState(VK_F1))
		{
		CurrentPosition();
		}

		if(GetAsyncKeyState(VK_F2))
		{
			SavePosition();
		}

		if(GetAsyncKeyState(VK_F3))
		{
			PrintSaved();
		}

		if(GetAsyncKeyState(VK_F4))
		{
			Teleport();
		}

	}
	return 0;
}
void CurrentPosition()
{
		system("cls");
		ReadProcessMemory(wProcHandle,(void*)zPos,&zPoss,sizeof(zPoss),0);
		cout << "Z Position: " << zPoss << "\n";
		ReadProcessMemory(wProcHandle,(void*)yPos,&yPoss,sizeof(yPoss),0);
		cout << "Y Position: " << yPoss << "\n";
		ReadProcessMemory(wProcHandle,(void*)xPos,&xPoss,sizeof(xPoss),0);
		cout << "X Position: " << xPoss << "\n";
}

void SavePosition()
{
	ReadProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
	ReadProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
	ReadProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}

void PrintSaved()
{
	system("cls");
	cout << "Saved Z Position: " << zTele << "\n";
	cout << "Saved Y Position: " << yTele << "\n";
	cout << "Saved X Position: " << xTele << "\n";
}

void Teleport()
{
	WriteProcessMemory(wProcHandle,(void*)zPos,&zTele,sizeof(zTele),0);
	WriteProcessMemory(wProcHandle,(void*)yPos,&yTele,sizeof(yTele),0);
	WriteProcessMemory(wProcHandle,(void*)xPos,&xTele,sizeof(xTele),0);
}
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
19,938
76
Cause the value is really small?
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
why you make all so complicated oO ?

C++:
const DWORD_PTR dwMyHackScan = reinterpret_cast<DWORD_PTR>(LoadLibraryA("blabla.dll")) + 0x10E4B0;
if you want to write to it just type:
C++:
*(DWORD_PTR*)dwMyHackScan = 2;
or if you want read it yout, turn it around :D
C++:
float myValue = *(DWORD_PTR*)dwMyHackScan;
I nearly never use rpm or wpm >.< No handles or long code needed here ;D
 
Last edited:

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
19,938
76
bzh your code is not working because you are not in the target process space to use GetModuleHandleA, either inject a dll or walk the modules.

why you make all so complicated oO ?

C++:
const DWORD_PTR dwMyHackScan = reinterpret_cast<DWORD_PTR>(LoadLibraryA("blabla.dll")) + 0x10E4B0;
if you want to write to it just type:
C++:
*(DWORD_PTR*)dwMyHackScan = 2;
or if you want read it yout, turn it around :D
C++:
float myValue = *(DWORD_PTR*)dwMyHackScan;
I nearly never use rpm or wpm >.< No handles or long code needed here ;D
Ehmm no, he needs to call kernel functions to access the data from other process space, look at his code.

And why *(DWORD_PTR*)dwMyHackScan = 2 when you could just do *(DWORD_PTR)dwMyHackScan = 2

You are going through unneeded casting in every snippet you posted. Instead of LoadLibrary use GetModuleHandleA, faster and saves you from trouble when the module isn't loaded
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods