News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Tiniet portable executable

Started by DaviFN, June 05, 2018, 12:23:26 AM

Previous topic - Next topic

felipe

I don't know that game.If you want a challenge what about making a program (doesn't matter the size) that process tiny files that have "the smaller code possible" to tell the program what action to take  :idea:? Now, that's interesting... :biggrin:

Siekmanski

Welcome to the forum.  :t

Quote from: DaviFN on June 05, 2018, 08:39:19 AM
I just got inspired from that .kkrieger game (96 KB) and wanted to dive in this adventure of creating a small, useful executable. The game itself states "macros are allowed", and this specific macro I'll create is the most used one; the so-called "auto potion"; just presses Q, W and E indefinitely.

I understand the suspiction, though. I could quickly code a C program to do that. Just wanted some challenge.

Isn't that the Farbraush production where they tested the first kkrunchy packer?
Creative coders use backward thinking techniques as a strategy.

Jean-Marie

I remember Peter Ferrie had made an article on the smallest possible executable, but I can't find it back.
I found this page which explains where to insert some code in the header section.
http://pferrie.000webhostapp.com/misc/tiny/pehdr.htm
This can be helpful.

zedd151

Quote from: Jean-Marie on June 05, 2018, 06:59:28 PM
.... which explains where to insert some code in the header section.
This can be helpful.
Which will also set off alarm bells from AV software.

aw27

This was all discussed in the AM thread.
It is also not possible to modify PE headers with MASM, you need to use a clone like UASM.
With UASM we can obtain a small .exe of around 200 bytes able to run on win xp, vista, 7 and 10.
We made experiments to make the .exe as small as 103 bytes but it failed to run on more recent OSs.

And we have also explored how small a 64-bit .exe we can obtain.

BTW, we can also make small .exes in C with about 1KB, I think with talked about that as well in the AM thread (or in another).