Simple Run from PE

Just starting out? Need help? Post your questions and find answers here.
Mike Yurgalavage
Enthusiast
Enthusiast
Posts: 118
Joined: Thu May 17, 2007 8:35 pm
Location: USA

Simple Run from PE

Post by Mike Yurgalavage »

go to this link and read:

viewtopic.php?t=37618


this doesn't seem to work for programs that are compiled with MASM. this code fails to run them.

i have a simple DIALOG.exe program that i can post for testing if needed.

any thoughts appreciated-

the programs created with MASM32 (version 10.0, linker 5.12) don't have a VERSION tab in their properties (right click on the .exe) but they ARE 32 bit programs. also, they don't have a .code section, just the .text section and the other sections.

the simple DIALOG.exe program that comes with the MASM32 will not run using this RunPE code posted here.

best,
Mike
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

dialogs.exe from MASM32 runs just fine here on Windows 7 with the RunPE code at viewtopic.php?t=37618

Its dialogs.exe not dialog.exe. Theres an 's'. They have version information on the 'Details' tab (for dialogs.exe), its just that the info is blank as far as the version because they didn't include that info.
Mike Yurgalavage
Enthusiast
Enthusiast
Posts: 118
Joined: Thu May 17, 2007 8:35 pm
Location: USA

Post by Mike Yurgalavage »

SFSxOI wrote:dialogs.exe from MASM32 runs just fine here on Windows 7 with the RunPE code at viewtopic.php?t=37618

Its dialogs.exe not dialog.exe. Theres an 's'. They have version information on the 'Details' tab (for dialogs.exe), its just that the info is blank as far as the version because they didn't include that info.
thanks for the reply but i notice a few things:

1) the tut at:

http://win32assembly.online.fr/files/tut10-2.zip

if you unzip it, there is only DIALOG.exe. i have no idea what you are talking about with dialogs.exe with an 's'. did you download the program from that link?

2) if you are using masm32, what version? what dialogs tut are you using? are you doing anything special when linking/compiling? are you using the regular masm32 linker or some other linker?

3) the problem i am having is that i have a coder for a project we are working on using masm32 to code the app, and i am using this wrapper around it to run the app from memory. i do not have alot of experience with masm or compiling with it. perhaps we are missing something important when compiling/linking these programs? at any rate, programs created by my coder (and that DIALOG.exe in that tut) do not work with this RunPE code.

i would appreciate you trying again or helping me see the error of my ways! :lol:

best,
Mike
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Post by Thorium »

Mike Yurgalavage wrote: 3) the problem i am having is that i have a coder for a project we are working on using masm32 to code the app, and i am using this wrapper around it to run the app from memory. i do not have alot of experience with masm or compiling with it. perhaps we are missing something important when compiling/linking these programs? at any rate, programs created by my coder (and that DIALOG.exe in that tut) do not work with this RunPE code.

i would appreciate you trying again or helping me see the error of my ways! :lol:
The code that runs standalone PE's from memory is a hack, not a stable solution. It is messing around with the PE loader.

But your problem is easy to solve: Use a DLL.
There is stable code to initialize and run a DLL from memory.

viewtopic.php?t=36250
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Mike Yurgalavage wrote:
SFSxOI wrote:dialogs.exe from MASM32 runs just fine here on Windows 7 with the RunPE code at viewtopic.php?t=37618

Its dialogs.exe not dialog.exe. Theres an 's'. They have version information on the 'Details' tab (for dialogs.exe), its just that the info is blank as far as the version because they didn't include that info.
thanks for the reply but i notice a few things:

1) the tut at:

http://win32assembly.online.fr/files/tut10-2.zip

if you unzip it, there is only DIALOG.exe. i have no idea what you are talking about with dialogs.exe with an 's'. did you download the program from that link?

2) if you are using masm32, what version? what dialogs tut are you using? are you doing anything special when linking/compiling? are you using the regular masm32 linker or some other linker?

3) the problem i am having is that i have a coder for a project we are working on using masm32 to code the app, and i am using this wrapper around it to run the app from memory. i do not have alot of experience with masm or compiling with it. perhaps we are missing something important when compiling/linking these programs? at any rate, programs created by my coder (and that DIALOG.exe in that tut) do not work with this RunPE code.

i would appreciate you trying again or helping me see the error of my ways! :lol:

best,
Mike
I was using the masm from > http://www.masm32.com/masmdl.htm, in that it has the dialogs.exe which I used with the runPE code and it worked fine.
Mike Yurgalavage
Enthusiast
Enthusiast
Posts: 118
Joined: Thu May 17, 2007 8:35 pm
Location: USA

Post by Mike Yurgalavage »

yes you are correct! and thank you again for responding.

that file you linked to (dialogs.exe) does exist in the MASM32 examples directory and it DOES work with the RunPE program.

however, i tested yet again, and the DIALOG.exe program, which is at that location i posted before:

http://win32assembly.online.fr/files/tut10-2.zip

DOES NOT work with the RunPE. it simply seems to terminate before it even opens. This is identical to the problem I am having with my coder's executables. He is using MASM32 version 10 to compile the program. these programs (including that DIALOG.exe) run fine when double clicked normally, but will not execute with the RunPE wrapper.

can you please download that .zip above (it is from trusted site win32assembly.online.fr!) and run the DIALOG.exe progam to see it works then try to use it in the RunPE and see that it doesn't work, and then perhaps we can try to find out why!?! I was hoping it was a simple compiling option or linker option but it doesn't appear to be that-

I realize this has gone back and forth several times but i truly do appreciate the effort. I also understand if you don't want to help any longer. If we do work on this, we should post our findings in the forums here so others can see what/why this is going on-

there is SOME reason why certain executables are not being written to memory correctly and executed correctly.

again i appreciate yours and anyone else's help in this. it's so kind of you to lend a hand to others like this-

thanks,
Mike
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Post by Thorium »

Well, just tell your programer to make a DLL instead of a EXE. It's no problem to make a DLL with MASM.
You can not rely on the RunPE code. It may work now but it may work not with a updated PE loader.
Post Reply