WarptenLe 18/03/2013 à 21:35
__asm
{
nop // Filler
nop // Filler
nop // Filler
mov esi, srcAddress // Save the address
mov edi, destAddress // Save the destination address
mov ecx, numBytes // Save the size of the patch
StartPatching:
cmp ecx, 0 // Are we done yet?
jz Exit // If so, go to end of function
mov al, [esi] // Move the byte at the patch into AL
mov [edi], al // Move AL into the destination byte
dec ecx // 1 less byte to patch
inc esi // Next source byte
inc edi // Next destination byte
jmp StartPatching // Repeat the process
Exit:
nop // Filler
nop // Filler
nop // Filler
}