//////////////SPEED//////////////
#define BasePointer1 0x6C4F24
#define Points6 0x00000004
#define Points7 0x0000066e
DWORD val2 = 0;
bool State2 = false;
void SetSpeedhack(){
HANDLE hProc = OpenProcess(((0x000F0000L) | (0x00100000L) | 0xFFFF), 0xFFFFFF, (unsigned int)GetCurrentProcessId());
DWORD wert1 = 0;
RtlCopyMemory((LPVOID)((void*)(&wert1)), (PVOID*)((int*)((BasePointer1))), sizeof((PDWORD)(BasePointer1)));
if(wert1 > 0){
wert1+= Points6;
RtlCopyMemory((LPVOID)((void*)(&wert1)), (PVOID*)&(*(_Uint32t*)(wert1)), sizeof((PDWORD)(wert1)));
wert1+= Points7;
RtlCopyMemory((LPVOID)((void*)(&wert1)), (PVOID*)&(*(_Uint32t*)(wert1)), sizeof((PDWORD)(wert1)));
DWORD val1 = 16666;
memcpy((PVOID*)(*(int*)(&wert1)), (PWORD*)((void*)&(*(_Uint32t*)&val1)), 2);
}
}

DWORD val1 = 16666; memcpy((PVOID*)(*(int*)(&wert1)), (PWORD*)((void*)&(*(_Uint32t*)&val1)), 2);
WORD val1 = 16666; // WORD = 2 bytes, DWORD = 4 (for microsoft) *(WORD*)wert1 = val1;
#define BasePointer 0x6EBE1C
#define Points0 0x00000008
#define Points1 0x000005dc
#define Points2 0x000002d8
#define Points3 0x00000000
#define Points4 0x0000018c
DWORD val = 0;
bool State = false;
void punkte()
{
if(State)
{
DWORD wert = 0;
HANDLE hProc = OpenProcess(((0x000F0000L) | (0x00100000L) | 0xFFFF), 0xFFFFFF, (unsigned int)GetCurrentProcessId());
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)((int*)((BasePointer))), sizeof((PDWORD)(BasePointer)));
if(wert > 0){
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)((int*)((BasePointer))), sizeof((PDWORD)(BasePointer)));
wert += Points0;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points1;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points2;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points3;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points4;
memcpy((PVOID*)(*(int*)(&wert)), (PWORD*)((void*)&(*(_Uint32t*)&val)), 4);}
}
}
DWORD WINAPI HackThread(LPVOID unused)
{
for(; ;)
{
punkte();
if(GetAsyncKeyState(VK_F2)){
if(State){ State = false; }
else{
State = true;
HANDLE hProc = OpenProcess(((0x000F0000L) | (0x00100000L) | 0xFFFF), 0xFFFFFF, (unsigned int)GetCurrentProcessId());
DWORD wert = 0;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)((int*)(BasePointer)), sizeof((PDWORD)(BasePointer)));
if(wert > 0){
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)((int*)(BasePointer)), sizeof((PDWORD)(BasePointer)));
wert += Points0;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points1;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points2;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points3;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
wert += Points4;
RtlCopyMemory((LPVOID)((void*)(&wert)), (PVOID*)&(*(_Uint32t*)(wert)), sizeof((PDWORD)(wert)));
val = wert;}
}
}
Sleep(2);
}
}




//////////////SPEED//////////////
#define BasePointer1 0x6C4F24
#define Points6 0x00000004
#define Points7 0x0000066e
WORD val2 = 16666;
void SetSpeedhack(){
//HANDLE hProc = OpenProcess(((0x000F0000L) | (0x00100000L) | 0xFFFF), 0xFFFFFF, (unsigned int)GetCurrentProcessId()); // is this even used? remove comment lines if so.
DWORD wert1 = *(DWORD*)BasePointer1; // read 6C4F24 --> gives us some ######
wert1 = *(DWORD*)(wert1 + Points6); // add Points6 to ######, then read that location
wert1 = *(DWORD*)(wert1 + Points7); // add Points7 to ######, then read that location
I kept trying to go up an extra level. I think that was your problem too? Anyway, code.//////////////SPEED//////////////
#define BasePointer1 0x6C4F24
#define Points6 0x00000004
#define Points7 0x0000066e
const WORD NewValue16 = 16666;
void SetSpeedhack(){
DWORD wert1 = *(DWORD*)BasePointer1; // read 6C4F24 --> gives us some ######
if(wert1 > 0){
wert1 = *(DWORD*)(wert1 + Points6); // add Points6 to ######, then read that location
wert1 += Points7;
*(WORD*)wert1 = NewValue16 ; // change value to 16666
}
}
// ^^ there is a syntax to de-reference several pointers + offsets in 1 line of code. However, this way is more clear.
RtlCopyMemory((LPVOID)((void*)(&wert1)), (PVOID*)((int*)((BasePointer1))), sizeof((PDWORD)(BasePointer1)));
if(wert1 > 0){
wert1+= Points6;
RtlCopyMemory((LPVOID)((void*)(&wert1)), (PVOID*)&(*(_Uint32t*)(wert1)), sizeof((PDWORD)(wert1)));
wert1+= Points7;
RtlCopyMemory((LPVOID)((void*)(&wert1)), (PVOID*)&(*(_Uint32t*)(wert1)), sizeof((PDWORD)(wert1)));
DWORD val1 = 16666;
memcpy((PVOID*)(*(int*)(&wert1)), (PWORD*)((void*)&(*(_Uint32t*)&val1)), 2);
}
So many (casts).
