Hello all,

I need some help with corrupted libraries. I am trying to insert an exe inside another.

For this i created a library through the target executable, but the import libraries are all corrupted.

With the generated lib, i inserted it within my little code (in masm), and it worked (i mean compiled ok).

But the import library is all corrupted. I don't want to use an import rebuilder to correct. I want some code that relink the libraries properly.

Let's say that, on the lib file, therer something like this:

jmp_J_ ; It should jmp, to Getmodulehandle.

My question is, how can i if i made a library fix to undetermined jumps. ?

I am trying to make a include file with something like that

jmp_J PROTO

and an asssembler file (to create the library), like this:

jmp_J_ Proc

jmp dword

jmp_J_ end


What can i do to make a fix library ? And if the "J" function is not a word, but an adress ? How can i make an include file for it, or correct the symbols ?


Best regards,

Beyond2000!
Posted on 2002-02-11 20:26:36 by Beyond2000!
I don't know if i made myself clear.

Check out my last post (new included libraries for masm32), in one example i inserted a full dll inside the main code, making the program works fine.
I want to do the same thing, but, instead inseting a dll, i am trying to insert a executable file.

I could be a good thing to analyse how program works. Inserting an executable inside an masmed file, can give more clues about others procedures

for example, let's say that you have an app that has some obfsucation code (made with borland C++, or delphi), with a lot of junk coding .

You you create a file in asm, that has the beginning of the procedure, and insert a library file (full) from this executable, you can be able to analyse how the program works, and bypassing the junk code without too much problem.

It can be done with an library from a dll...but the hard is to make the same with an executable, because the library file, remains corrupted. (Try using dll2lib to convert executable to lib)
Posted on 2002-02-12 00:23:24 by Beyond2000!
Be careful... this topic is balancing on the edge. I can see the usefulness
and legality of placing .DLLs inside your own code (dll2lib style) to
avoid multiple files... but placing EXE files inside your own exe to
"analyze"? This smells a bit. Try to refine your purpose a bit so we
can see this is a "kosher" post and not one that has to go away.


I removed your duplicate post, "coding needed".
Posted on 2002-02-12 09:51:53 by f0dder
I guess i know what you are saying.

Avoying multiples files inserting dlls on it, i did it. My question about inserting a executable is exactly what i said, i am trying to analyse the functionality of programs in order to make a kinda universal converter for masm.

I am using as my target W32dasm from urbanik. I am trying to insert it inside another exe. I inted to rebuild interilly in masm, in order to improve their functions.

The disassembler process can be inserted inside a masm code, in a simple way. So, i analysed the program a lot, and it is very possible to make a complete disassembler.

One that can be able to convert any file to an masmed language (Like sourcer or even IdaPro), but with additional functions, like, a save as asm, removing Visual C; C++; C; Delphi garbage, dumping files from memory to disk; unpacker for several packers;; disassembling obj and other files; using flirt technology etc, enabling compiler options, creating resources etc.

What i am trying to do is create a new disassembler, based on the architecture of w32dasm, IdaPro, Sourcer, Pedasm, PExplorer etc...

I intend to release with open source, so everybody can alter the main code without any problems.


This post is not for viruses creation or illegal rights, it's exactly the opposite.

Insereting an entire executable inside another (Don't matter if it has 1 megabyte or more), can be usefull to exactly analyse their functions, and rebuild any program written in a language different then masm.

Visual C++6.0 programs are relativelly easy to convert, because the Main Function (Winmain) is masmed builded, and after this function (sometimes) all is garbage. So you can transform a program with 100 Kb and recompile it to just 15 kb...etc...

I did it once with a program called Codedasm, i analyse the code and recreate it in masm version, and other little samples in visual c++6.0 too.

The recompilation of other languages is kinda a hard work, but it can be done using flirt recognition inside a disassembler, and a code able to remove junk stuff (Like the exceptions in C++ or C).

I''m sorry if my last post was not clearly enough, my intentions are exaclty these one, in other hands : analysing the functionalitty of a specific program (W32dasm) to rebuild it in masm and recreate another one to fully transform any file (Or at least make the process easier) in masmed version).

.Just like the masm version of wordedit, but for a renewed disassembler.

So, instead a disassembler writes something like:

push dword [121242h]

it can be rewritten as

dd nana (on the data section)
push nana (on the code section)

and many other stuffs like making the calls to api looks like invokable stuff, etc...

Best regards,

Beyond2000!
Posted on 2002-02-12 11:12:43 by Beyond2000!