The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: anuradha on July 17, 2007, 06:23:38 AM

Title: Code patching
Post by: anuradha on July 17, 2007, 06:23:38 AM
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
Title: Re: Code patching
Post by: sinsi on July 17, 2007, 06:44:31 AM
 :lol :lol :lol :lol :lol :lol :lol :lol
Title: Re: Code patching
Post by: hutch-- on July 17, 2007, 07:13:52 AM
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.
Title: Re: Code patching
Post by: anuradha on July 17, 2007, 01:06:37 PM
hi
I know it's a stupid question to ask
but any way thanks hutch for reply. :U
Title: Re: Code patching
Post by: emre_tinaztepe on July 20, 2007, 11:15:11 PM
Why not reading mastas tuts? I am sending you a txt which will be very helpful.


[attachment deleted by admin]