[C++ & ASM] Write BYTE in ASM, Howto Write / Read BYTE by Read/WriteProcessMemory?
Hello MPGH Com,
New Problem:
I try to write 1 BYTE with your Method.. but it crash again ._.
Cheat Engine:
fessie.exe+508B = 0040508B what means 01 is on 0040508D?
Or am I wrong?
#EDIT:
I try to read just 1 Byte with
But i get This Value: -858993663
I think this is biger then just 1 Byte
I wan't to get the Value as Integer. In this case i need the number 1.
Same at WriteProcessMemory()... how to write 1 Byte.
Greatz
Greatz Benhero
Old Problem -> Solved
I have a Problem with ASM.
I try to Write a Value to a Adress with ASM.
This is what i get:
At second i try to Override a Sub statement.
So i was try to chance
to
I try different ways but i don't found a way to do it..
Hop you unterstand me... <.< I know my english are not the best...
I try to Write a Value to a Adress with ASM.
Code:
int rubish;
DWORD aRubish = 0x421F7C;
ReadProcessMemory(cHandle, (void*)aRubish, &rubish, sizeof(rubish), 0);
Sleep(250);
cout << endl << "Adress: " << aRubish << endl << "Rubish Left: " << rubish << endl;
__asm{
MOV dword ptr [aRubish], 0
CALL endSeqence
}
ReadProcessMemory(cHandle, (void*)aRubish, &rubish, sizeof(rubish), 0);
cout << "Adress: " << aRubish << endl << "Rubish Left: " << rubish << endl;
Code:
Adress:4333436 Rubish Left: 15 Adress: 0 Rubish Left: 15
So i was try to chance
Code:
SUB edx,01
Code:
SUB edx,00
Hop you unterstand me... <.< I know my english are not the best...
New Problem:
I try to write 1 BYTE with your Method.. but it crash again ._.
Code:
DWORD aTime = 0x421908;
DWORD aTimeSub = 0x40508D;
__asm
{
mov eax, dword ptr ds : [aTime];
mov dword ptr ds : [eax], 1;
mov eax, ds : [aTimeSub];
mov byte ptr[eax], 0x00;
}
Code:
fessie.exe+508B - 83 EA 01 - sub edx,01
Or am I wrong?
#EDIT:
I try to read just 1 Byte with
Code:
DWORD aTimeSub = 0x40508D; int timeSub; ReadProcessMemory(cHandle, (void*)aTimeSub, &timeSub, sizeof(BYTE), 0);
I think this is biger then just 1 Byte
I wan't to get the Value as Integer. In this case i need the number 1.
Same at WriteProcessMemory()... how to write 1 Byte.
Greatz
Greatz Benhero


