C++ nop Address

Posts 1–7 of 7 · Page 1 of 1
C++ nop Address
Hi all,

I would know how i can nop a address ?

Via Visual C++ 6

Thank from advance
Use WriteProcessMemory() with the address you want and 90 for each byte you want to nop.
can you give an example of this code pls ?
Pretty simple.

Code:
WriteProcessMemory(hProcess, 0xADDRESS, 0x90, 1, NULL);
That would nop the code at 0xADDRESS (obviously not a real address, replace with the address of the code you want to nop).

hProcess is a handle (HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE,PROCESS_ID)) to the process of the game.

0x90 is the hex code for the nop instruction.

1 is the length of the code to write (nop = 1 byte).

NULL is given because we don't care how much code is written, supply this with a pointer to a DWORD if you want to know how many bytes were actually written (error checking, etc).

If you still don't understand, I think you should get a firmer grasp of the Win32 API.
Note that most funtions are not 1 byte most of the time so you may need to do this byte nop[]={0x90, 0x90, 0x90, 0x90}; this will nop 4 bits...
This works to ...
i think

Code:
unsigned long ulStamina = 1120403456;
memcpy_ex( ( void* )0x7F1110, &ulStamina, sizeof( unsigned long ) );
Quote Originally Posted by Credzis View Post
This works to ...
i think

Code:
unsigned long ulStamina = 1120403456;
memcpy_ex( ( void* )0x7F1110, &ulStamina, sizeof( unsigned long ) );
umm no that will not work....there is no memcpy_ex( you would need ti wright your own call..Next time coping find where the call is to and copy that plus that would have set it to 1120403456 not nop it..
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us