News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Code patching

Started by anuradha, July 17, 2007, 06:23:38 AM

Previous topic - Next topic

anuradha

hi people

how can I write a programme to patch a code??
(like hutch's "TheGun editor" )
if any example will help me lot

Thanks :bg

sinsi

 :lol :lol :lol :lol :lol :lol :lol :lol
Light travels faster than sound, that's why some people seem bright until you hear them.

hutch--

anuradha,

Its very simple as long as you know WHERE to write the patch. In TheGun and TopGun its easy as I store the settings in unused space in the header of the EXE file.

Basically what you do is know the absolute offset of the location you want to write to, load the entire file into memory, write the data you wish to change to that offset from the start of the file then save it back to disk.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

anuradha

hi
I know it's a stupid question to ask
but any way thanks hutch for reply. :U

emre_tinaztepe

Why not reading mastas tuts? I am sending you a txt which will be very helpful.


[attachment deleted by admin]