|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
mr.moon Newbie cheater Reputation: 0
Joined: 27 Aug 2016 Posts: 12
|
Posted: Thu Aug 31, 2017 5:41 am Post subject: WriteProcessMemory |
|
|
hi i am trying to user ASM from windows application like this
Code: |
Addy_ins = dwBaseAddr + Addy_ins_Offset;
Addy_Call = dwBaseAddr + Addy_Call_Offset;
static _declspec(naked) void ASMFunc(void)
{
_asm
{
push 01
mov ecx, Addy_ins
call Addy_Call
ret
}
}
|
i think to use WriteProcessMemory like that
Code: |
void MyForm::button1_Click(System::Object^ sender, System::EventArgs^ e)
{
LPVOID VirtualAlloc = VirtualAllocEx(hProc, 0, 128, MEM_RESERVE, PAGE_READWRITE);
WriteProcessMemory(hProc, (LPVOID)0x03920000, (DWORD*)ASMFunc, sizeof(ASMFunc ), NULL);
}
|
but didn't work
any idea how can make it work ?
thanks
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Thu Aug 31, 2017 7:01 am Post subject: |
|
|
prototype, must be called from main.
Code: | void WriteToMemory(HANDLE hProcHandle)
{
DWORD AddressToWrite;
if (AmmoStatus)
{
AddressToWrite = FindDMAaddress(3, hProcHandle, AmmoOffsets, AmmoBaseAddress); //'3' is pointer level
WriteProcessMemory(hProcHandle, (BYTE*)AddressToWrite, &AmmoValue, sizeof(AmmoValue), NULL);
}
if (HealthStatus)
{
AddressToWrite = FindDMAaddress(1, hProcHandle, HealthOffsets, HealthBaseAddress); //'1' is pointer level
WriteProcessMemory(hProcHandle, (BYTE*)AddressToWrite, &HealthValue, sizeof(HealthValue), NULL);
}
}
|
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|