The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: xroot on April 24, 2009, 05:10:12 PM

Title: Run From Memory
Post by: xroot on April 24, 2009, 05:10:12 PM
I wrote a VB6 program to run an EXE from memory and wanted to convert it to Masm.
I found "PE-in-memory execution" by Comrade and "PeMem" by Vortex to get an idea on how they did it.

My VB6 conversion to Masm did not produce what I hoped for. I am missing something in the conversion.
I have dumped vars, pointers, etc and all seem to match some have little difference.
I get an error message on the last WriteProcessMemory almost to the end of the program, and it says,
"Only part of a ReadProcessMemory or WriteProcessMemory request was completed."
I would think the VB6 logic would work the same in Masm.

I hope someone can take a look to see what I am doing wrong. I would appreciate the help.

[attachment deleted by admin]