flat assembler
Message board for the users of flat assembler.

Index > Main > No imports...

Author
Thread Post new topic Reply to topic
M!kro$



Joined: 11 Nov 2004
Posts: 19
M!kro$
I whant create program whithout import section.
Now i heve adress of kernel, how i can take address functions, such as Kernel32.LoadLibrary ????
Post 11 Nov 2004, 09:06
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
polygon7



Joined: 14 Aug 2003
Posts: 62
Location: Poznan, Poland
polygon7
M!kro$ wrote:
I whant create program whithout import section.
Now i heve adress of kernel, how i can take address functions, such as Kernel32.LoadLibrary ????


Look at MASM32 package into EXAMPLES8/MOB/NOIMPORT directory
(http://www.masm32.com/masmdl.htm) or read http://vx.netlux.org/lib/vlj02.html

_________________
best regards
p7
Post 11 Nov 2004, 11:12
View user's profile Send private message Visit poster's website Reply with quote
wanderer



Joined: 18 Jun 2003
Posts: 44
Location: Moldova, Kishinev
wanderer
M!kro$ wrote:
I whant create program whithout import section.
Now i heve adress of kernel, how i can take address functions, such as Kernel32.LoadLibrary ????

Win2K & WinXP require at least one func in import table, otherwise they won't start program

_________________
Best regards,
Antoch Victor
Post 11 Nov 2004, 11:19
View user's profile Send private message Yahoo Messenger Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
M!kro$ wrote:
I whant create program whithout import section.
Now i heve adress of kernel, how i can take address functions, such as Kernel32.LoadLibrary ????

See the sources of my program to deal with PE files. The code is in MASM, but there should be no problem to do it with FASM


Description: Agp is a program that can query and show you all the most important info about every PE file. It obtains information about PE header,sections, imports, exports, resources. It has also many interesting functions like process listing, memory dumping, resour
Download
Filename: AGP.ZIP
Filesize: 53.71 KB
Downloaded: 259 Time(s)

Post 11 Nov 2004, 11:24
View user's profile Send private message Visit poster's website Reply with quote
M!kro$



Joined: 11 Nov 2004
Posts: 19
M!kro$
Thanks polygon7 your sample work. If i use noimport function, my program can work under all windows??? And what for viruses use this tehnolies???
Post 11 Nov 2004, 11:40
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv
It needs to have at least one import for it to work on Windows2000 (not very sure about Windows XP, though) as mentioned by wanderer
Post 11 Nov 2004, 11:45
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav
another way to get executable with minimal imports is using LoadLibrary and GetProcAddress api-calls

ps. kernel32.dll address can be get without any calls
Post 11 Nov 2004, 11:56
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
if you are programming for some specific version of Windows, you can even import by ordinals
Post 11 Nov 2004, 14:30
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
hi reverend,
the agp program doesn't function inside win95 Sad
Post 11 Nov 2004, 17:29
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
vbVeryBeginner wrote:
the agp program doesn't function inside win95 Sad

Weird, because I checked it many times on my xp and my win98 and it worked alright. I don't have win95... so more precisely - what doesn't work for you? Thanks in advance Wink
Post 12 Nov 2004, 10:26
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
i guess pictures worth thousand words Smile


Description:
Download
Filename: agp_captures.rar
Filesize: 30.33 KB
Downloaded: 270 Time(s)

Post 13 Nov 2004, 12:33
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Check this now

P.S: I am sending it the second time. No idea why it didn't work after the first... Question


Description: Fixed version to work under win95
Download
Filename: fixed_agp.zip
Filesize: 13.51 KB
Downloaded: 235 Time(s)

Post 13 Nov 2004, 21:56
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
yup, it works now Smile and could i know what you change in ur code (coz the second version doesn't come along with code Razz)
Post 13 Nov 2004, 22:58
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
I changed code that was to check if some function return -1. I had something like this:

Code:
    test    eax,eax
    js      _eax_equal_minus_one
    


Which was stupid, because on win9x the function returned something like 80xxxxxxh and on NT <7FFFFFFFh

So now: AGP should work for all of you? What do you think about my biggest project Smile ? (Unfortuantely I didn't code in FASM then Crying or Very sad)
Post 13 Nov 2004, 23:12
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
it is great Smile
em, wanna ask your permission, could i convert it to fasm?
Post 13 Nov 2004, 23:28
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
vbVeryBeginner wrote:
it is great Smile

Big thanks Cool

vbVeryBeginner wrote:
em, wanna ask your permission, could i convert it to fasm?

Of course you can. I even thought about doing it myself, but lack of time and some other things made me change decision. This prog has also many things that could be done better, so it's up to you if you change them or not. Also there could be a problem, because some code may be unreadable Smile as it was my first bigger program in asm. Here's the fixed source code

I may say this program is on some kind of GNU License so don't worry and change what you want Smile But please just let me know when you finish Wink


Description: Full fixed source code
Download
Filename: AGP.ZIP
Filesize: 53.9 KB
Downloaded: 244 Time(s)

Post 14 Nov 2004, 17:07
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 GitHub, YouTube, Twitter.

Website powered by rwasa.