flat assembler
Message board for the users of flat assembler.

Index > Windows > patcher

Author
Thread Post new topic Reply to topic
kourin



Joined: 04 Oct 2012
Posts: 4
kourin
Hello,

I just made a program to generate a patcher executable on Win32. I suppose it's not very original but I needed one and wanted to practice fasm so I made one myself. Yet, it's more convenient and powerfull than most patchers I saw, since you can write a patch like this:

Code:
include 'patcher.inc'
file "patchme.exe"
  at 0x100
    db 0x25, 3, 12
    db "hello world!", 0
    dd 0x12345678
    dw -1, 0x2289
  at 23
    mov eax, ecx
    push ecx
    jmp short 5
  at 0x453
    db 15
file "..\metoo.dll"
  at 1387
    dw 1
done    


As you can see, several files are patched, at several positions, and you can write code as well as data. For a single file, single position patch, you can use the alternative syntax:

Code:
include 'patcher.inc'
patch "filename", offset, byte_1, byte_2..., byte_n    


The zip file contains 'patcher.inc' and a 'readme.txt' providing syntax and examples. Have fun! Comments are welcome, regarding the program's functionnality or the code itself. =)

k.


Description: generate a powerfull patcher in no time
Download
Filename: patcher.zip
Filesize: 2.57 KB
Downloaded: 95 Time(s)

Post 04 Oct 2012, 21:19
View user's profile Send private message Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
kourin wrote:
Hello,
Code:
include 'patcher.inc'
file "patchme.exe"
  at 0x100
    db 0x25, 3, 12
    db "hello world!", 0
    dd 0x12345678
    dw -1, 0x2289
  at 23
    mov eax, ecx
    push ecx
    jmp short 5
  at 0x453
    db 15
file "..\metoo.dll"
  at 1387
    dw 1
done    
k.

hi kourin, i find it cool, especially because this snippet tells, to those who understand and all the list of bugreporters together with those who understand, 2 main things:
1) such quirkiness featured from space:address at 1.71.com syntax are perfectly avoidable
2) the fact that you needed to strenghten the AT using a macro... instead of using the quirkiness that apart for the LOAD directive has no other usefulness

thanks for sharing,
Cheers

btw: please, no flaming intention eehh!!! Laughing

_________________
⠓⠕⠏⠉⠕⠙⠑
Post 05 Oct 2012, 18:09
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.