flat assembler
Message board for the users of flat assembler.

Index > Windows > Here's a concept...

Author
Thread Post new topic Reply to topic
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
I thought of something and wondered if it were possible. How would one import a DLL into the program compile time (rather than run time) if it's already comipled?
Post 17 Jun 2007, 23:57
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
you can create a DLL loader, append DLL as data, and pass it's address to loader that will load it when exe runs.

next time think about better thread name please Wink
Post 18 Jun 2007, 01:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
I am bad with names. I mean, common, look at my name on the forums. Trust me, you dont' want me to name your kids... Anyway!

As for creating a DLL loader. That would be the fun part. I could easily load the DLL into memory as a file variable. It's finding the address of functions for use with jmp or call that's hard.
Post 18 Jun 2007, 01:35
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
don't forget to load DLL not byte-to-byte same as in file, but as loader does (section align 4096, instead of 512 in file). Then just look through DLL exports, and you can find functions that interest you
Post 18 Jun 2007, 03:11
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
To be honest i really don't know where to start.
Post 18 Jun 2007, 03:15
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
start by reading about PE format, and maybe try writing utility that will dump contents of PE headers, sections, tables etc... That will give you knowledge of PE format you need to manually load DLL

http://en.wikibooks.org/wiki/Reverse_Engineering/PE
Post 18 Jun 2007, 12:33
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22
Interesting concept, but can you give an example of how this would be useful?
Post 18 Jun 2007, 16:40
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
when you want to add code to already existing binary for some reason. For example i did this in copy protector
Post 18 Jun 2007, 19:29
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
Let's say you want to use fmod (for example) in a program but you don't want to go through all the rigamaroo of an installer file.
Post 18 Jun 2007, 19:45
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger 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.