
Originally Posted by
turdsammiches
that won't let me edit bytes though, just values held in addresses? also, even if i comment out the createthread and just make it popup a messagebox, the messagebox never shows on injection, could this be due to using a 64 bit os? idk, every tutorial i follow the results never work no matter what.
Use character pointers to edit the bytes at a particular address. What 258456 meant to say was, because you're in the same address-space as your target process, there is no need to go through the Windows API to alter the address.
For example:
Code:
char* pBytes = 0x40A000
pBytes[0] = 10;
In your case, you can just use the memcpy method in the C++ standard library:
Code:
BYTE pointsON[] = {0x83, 0x05, 0xE8, 0x26, 0x4C, 0x00, 0x80};
BYTE pointsOFF[] = {0x83, 0x05, 0xE8, 0x26, 0x4C, 0x00, 0x19};
//memcpy(void* pDest, void* pSrc, size_t szLen)
//So to turn them on...
memcpy(DEST_ADDRESS, &pointsON[0], sizeof(pointsON);
As for your DLL, first, check if CreateThread fails - if it does, it is safe to log this error with OutputDebugStringA (as it is contained within the kernel32 library...). If it does fail, use GetLastError to figure out what went wrong.