Base Addresses are Shit
Okay I discovered a pointer which is like "AVA.exe"+012AB00 and It points to certain address every time i restart the game , so the "AVA.exe" has a base address I discovered it and it's 0x400000 and when i calculated 0x400000+0x012AB00 as an example it gives me an address which is 0x013A1500
When i try to discover it in CE I copy AVA.exe+the addres and i go to memory view then Ctrl + G then paste it and press Enter it gives me the same address which is 0x013A1500 but When i code it in C++ to know what the pointer points to and write to it it points to wrong address.
I tried another things like CreateToolhelp32Snapshot / Process32First / Process32Next to see if the AVA base address is wrong and i saw it's right.
here's my code :
---------- Post added at 02:09 PM ---------- Previous post was at 01:23 PM ----------
I tried to read the pointer which is AVA.exe + 000000 to this
so my code became like this
but when i compile it gives me access error.
When i try to discover it in CE I copy AVA.exe+the addres and i go to memory view then Ctrl + G then paste it and press Enter it gives me the same address which is 0x013A1500 but When i code it in C++ to know what the pointer points to and write to it it points to wrong address.
I tried another things like CreateToolhelp32Snapshot / Process32First / Process32Next to see if the AVA base address is wrong and i saw it's right.
here's my code :
Code:
#include <iostream>
#include <windows.h>
#include <string>
#include <tlhelp32.h>
#include <tchar.h>
using namespace std;
// FindWindow();
// GetWindowsThreadProcessId();
// OpenProcess();
// WriteProcessMemory();
// CloseHandle();
int main()
{
SetConsoleTitleA("Nickname Changer");
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY | COMMON_LVB_UNDERSCORE);
HWND hWnd = FindWindow(0, _T("Alliance of Valiant Arms"));
if(hWnd == 0)
{
cerr << "Unable to find the window" << endl;
}
else{
clog << "Found Window" << endl;
DWORD PId;
DWORD processID = GetWindowThreadProcessId(hWnd, &PId);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, PId);
if (!hProcess){
cerr << "Unable to Open Process" << endl;
}
else{
clog << "Opened Process" << endl;
wchar_t newvalue[19];
DWORD Game = 0x400000;
DWORD Base = 0x000000;
DWORD Pointer = *(DWORD*)(Game + Base);
DWORD Pointed;
DWORD Pointed1;
DWORD Offset[2] = {0x90, 0x24};
char newval[19];
ReadProcessMemory(hProcess, (LPCVOID)Pointer, &Pointed, sizeof(wchar_t), NULL);
ReadProcessMemory(hProcess, (LPCVOID)(Pointed+Offset), &Pointed1, sizeof(wchar_t), NULL);
ReadProcessMemory(hProcess, (LPCVOID)Pointed1, &newval, sizeof(wchar_t), NULL);
cout << "Your current nickname is: " << newval << endl;;
cout << "Enter the new nickname: ";
wcin >> newvalue;
int isSuccessful = WriteProcessMemory(hProcess, (LPVOID)Pointed1, &newvalue , (DWORD)sizeof(newvalue), NULL);
if(isSuccessful > 0){
clog << "Process Memory Written" << endl;
}else{
cerr << "Cannot write process memory." << endl;
}
}
}
char cls;
cout << "Wanna change the Nickname again? (y) or (n)" << endl;
cin >> cls;
while(cls){
switch(cls){
case 'y':
system("CLS");
return main();
break;
case 'n':
return 0;
break;
case 'Y':
system("CLS");
return main();
break;
case 'N':
return 0;
default:
return 0;
break;
}
}
system("PAUSE");
return main();
}
---------- Post added at 02:09 PM ---------- Previous post was at 01:23 PM ----------
I tried to read the pointer which is AVA.exe + 000000 to this
Code:
DWORD address = (DWORD)GetModuleHandle(_T("AVA.exe")) + 0x00FA1500;
address = *(DWORD*)address + 0x90;
address = *(DWORD*)address + 0x24;
so my code became like this
Code:
#include <iostream>
#include <windows.h>
#include <string>
#include <tlhelp32.h>
#include <tchar.h>
using namespace std;
// FindWindow();
// GetWindowsThreadProcessId();
// OpenProcess();
// WriteProcessMemory();
// CloseHandle();
int main()
{
SetConsoleTitleA("Nickname Changer");
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY | COMMON_LVB_UNDERSCORE);
HWND hWnd = FindWindow(0, _T("Alliance of Valiant Arms"));
if(hWnd == 0)
{
cerr << "Unable to find the window" << endl;
}
else{
clog << "Found Window" << endl;
DWORD PId;
DWORD processID = GetWindowThreadProcessId(hWnd, &PId);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, PId);
if (!hProcess){
cerr << "Unable to Open Process" << endl;
}
else{
clog << "Opened Process" << endl;
wchar_t newvalue[19];
DWORD address = (DWORD)GetModuleHandle(_T("AVA.exe")) + 0x00FA1500;
address = *(DWORD*)address + 0x90;
address = *(DWORD*)address + 0x24;
DWORD Pointed;
DWORD Pointed1;
DWORD Offset[2] = {0x90, 0x24};
char newval[19];
ReadProcessMemory(hProcess, (LPCVOID)address, &Pointed, sizeof(wchar_t), NULL);
ReadProcessMemory(hProcess, (LPCVOID)Pointed, &newval, sizeof(wchar_t), NULL);
cout << "Your current nickname is: " << newval << endl;;
cout << "Enter the new nickname: ";
wcin >> newvalue;
int isSuccessful = WriteProcessMemory(hProcess, (LPVOID)Pointed, &newvalue , (DWORD)sizeof(newvalue), NULL);
if(isSuccessful > 0){
clog << "Process Memory Written" << endl;
}else{
cerr << "Cannot write process memory." << endl;
}
}
}
char cls;
cout << "Wanna change the Nickname again? (y) or (n)" << endl;
cin >> cls;
while(cls){
switch(cls){
case 'y':
system("CLS");
return main();
break;
case 'n':
return 0;
break;
case 'Y':
system("CLS");
return main();
break;
case 'N':
return 0;
default:
return 0;
break;
}
}
system("PAUSE");
return main();
}




