flat assembler
Message board for the users of flat assembler.

Index > Main > export functions from an PE exe (?)

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji
hello, Razz

How export functions from an exe file ? (with fasm)

Thanks in advance

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 10 Jun 2012, 20:26
View user's profile Send private message Send e-mail Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
Should be the same as DLLs - add an export section and define the exports. Question
Post 10 Jun 2012, 22:11
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji
indeed, it works.
I didn't think it would be so easy.
thank you cod3b453

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 11 Jun 2012, 06:53
View user's profile Send private message Send e-mail Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
i used it one years ago for an updater. running it as EXE it show
something like "process need to be loaded first". note that

1) you cannot LoadLibrary it
2) loader doesnt relocate anything but stuff in the code segment
3) a silently-managed exception occurs on that module at run-time when loading the parent process;
in all cases DllEntrypoint in it will not be executed !! as if the module were flagged DONT_RESOLVE_DLL_REFERENCES.

i am not sure but perhaps this behaviour is possible after some back-compat
down to win95 (because of some system low dll drivers, named as exe).
anyway reason 3) may be a flaw now and should be fixed by MS.

you may think to mark characteristics of the code section of itas R/W/EXEC.
in any case the loader should be allowed at least an explicit read on the reloc section.
with fasm this way
section '.reloc' fixups data readable discardable
then the rest is done, having a double-face module.

Cheers,

_________________
⠓⠕⠏⠉⠕⠙⠑
Post 02 Sep 2012, 01: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.