C++ & Assembler Problems

I have a Problem with ASM.
I try to Write a Value to a Adress with ASM.
1
2
3
4
5
6
7
8
9
10
11
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;


This is what i get:
1
2
3
4
Adress:4333436
Rubish Left: 15
Adress: 0
Rubish Left: 15


At second i try to Override a Sub statement.
So i was try to chance
 
SUB edx,01

to
 
SUB edx,00

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...

Greatz Dereta
Topic archived. No new replies allowed.