flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 17 Feb 2005, 09:40
FASM can use separate sections as well. See for directive "section" in the manual.
|
|||
![]() |
|
RauL 17 Feb 2005, 11:58
yea i do realise that, but now i just want an answer to my previous question..
|
|||
![]() |
|
RauL 19 Feb 2005, 02:16
ok, lemme ask it a simple way, is it possible to change the location of
Code: library kernel,'KERNEL32.DLL',\ user,'USER32.DLL' import kernel,\ GetModuleHandle,'GetModuleHandleA',\ ExitProcess,'ExitProcess' |
|||
![]() |
|
Madis731 20 Feb 2005, 10:46
Simple answer is NO, but if you really want to do that, you'd have to manually change all references to them and about Messages - they tend to be UNICODE
![]() Another thing is that you cannot INSERT strings when file is already assembled, but you must OVERWRITE so all other bytes remain at the same locations. Code: ;An example - you can replace: .H.e.l.l.o...W.o.r.l.d.!...... -with- .1.2.3.4.5.6.7.8.9.l.d.!...... but you can't change the count of letters in it |
|||
![]() |
|
RauL 21 Feb 2005, 07:32
i know its possible. i can add bytes but i couldn't find out the reference to the calls. i know i have to change them but which part shld i change(add 2 to the address). cause the address are not relative to file size....
|
|||
![]() |
|
Kecol 21 Feb 2005, 15:05
Raul,
doing it by hand is not easy, and may be imposible. It depends on each program code (not always). Each program is a different world. You must know PE format very good. You must know hex code very good (or use a good disassembler program). It is easier to add another section, than to modify an existing one. This is an example of code with a text message that can not be expanded in an easy way in same section. Code: ... jmp skip_text my_text db "This is the text",0 skip_text: push my_text call show_msg ; This proc shows the msg mytext ... Just an idea: modify the code of HELLO fasm example, replacing the old text with a new one, and then compile it (with a new file name). Then you can open both files with an hex editor and compare them. Regards. Kecol.- |
|||
![]() |
|
RauL 21 Feb 2005, 16:51
i created two different variations of hello program(a bit simpler so that the file size would be 1 kb). the differences i found were quite simple, they were just the number of bytes after which .idata's MessageBoxA functions occur etc... thanks for the help. though ur idea to add a new section isnt bad atall, it would be better to place a jmp function in the main code and append the code to be added in the end and jmp to it. so i wont face any address problems.
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.