flat assembler
Message board for the users of flat assembler.
Index
> Windows > What's wrong with this PE-File |
Author |
|
Kinex 11 Oct 2005, 21:07
Hey, Can someone help me and figure out why this PE-File doesn't execute? It should execute properly but it just won't work.
If you look at it please don't be scared because the sections are not optimized they have all the same size. Can someone figure this out? I don't get it. Thanks.
Last edited by Kinex on 11 Oct 2005, 23:50; edited 1 time in total |
|||||||||||
11 Oct 2005, 21:07 |
|
decard 11 Oct 2005, 21:25
seems that it has its import section broken:
|
||||||||||
11 Oct 2005, 21:25 |
|
decard 11 Oct 2005, 22:40
Well, I'm not familiar with internal PE structure, but I thought that one dll name can't figure so many times in import section Anyway fileinfo (Total Commander plugin) says that something is wrong with it: "Missing Functions in implict load DLL" (whatever it means).
|
|||
11 Oct 2005, 22:40 |
|
Kinex 11 Oct 2005, 22:51
Yes. That's true. In a normal import section this shouldn't happen that the DLL name appear more than 1 time but.. This should also work.. at least it does with 20+ imports ... Hmm I'll check it.
|
|||
11 Oct 2005, 22:51 |
|
Kinex 11 Oct 2005, 23:52
Ok .. I fixed the imports and now it is correct.. but same problem doesn't execute.. .. I updated the file above to pqp2.zip.. now with gdi32 imports.. It has nothing todo with the imports.. it is another reason because if there are no imports but code section is same size then it also doesn't work..
|
|||
11 Oct 2005, 23:52 |
|
Ancient One 12 Oct 2005, 03:01
the size of image field (offset 0xD0 in ur file) is not correct. u must set it to last section alignment+size of that last section (aligned to section alignment).
|
|||
12 Oct 2005, 03:01 |
|
Kinex 12 Oct 2005, 08:21
Yes you are totally correct! Got it now thanks Ancient One!
|
|||
12 Oct 2005, 08:21 |
|
Ancient One 12 Oct 2005, 12:30
when u run it u will get exception coz ur code write to code section which don't have the write attribute.
|
|||
12 Oct 2005, 12:30 |
|
Kinex 12 Oct 2005, 15:09
Yes I know I made this exception to see if the PE File is executed.. but it was always a "not valid win32 executable" .. and didn't raise this exception! anyway it works nice now Thank you again!
|
|||
12 Oct 2005, 15:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.