Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   Overlay files? (https://forum.exetools.com/showthread.php?t=7988)

Android 08-22-2005 12:35

Overlay files?
 
Hi,
I have got a question.
I faced some PE files that have Overlay.
I want to know how it's possible to compile a PE File to have Overlay properties.

Is it something which is connected to the Compiler or is it depended on the style of Coding?

Thanks in advance.

Regards,
Android.

Newbie_Cracker 08-22-2005 18:06

and how the program reads overlays?
Many programs don't read overlays from a constant offset.
Are they calculate its offset from PE Header (does any body use it? ;) ) or they subtract Overlay_Size from File_Size to calculate its statring offset?

dj-siba 08-22-2005 23:25

use DOS command copy :)

Copy /b Main.EXE + Overlay.OVL

Android 08-24-2005 12:46

Quote:

Originally Posted by dj-siba
use DOS command copy :)

Copy /b Main.EXE + Overlay.OVL

Hi,
Thanks for the reply.
But may I ask you about the way you managed to make this file?

"Overlay.OVL"
The fact is that,the use of this file is unknown to me.

My problem mostly is about the basics of Overlay strcuture and the aim of using it.
Also if someone can cover some information about the principles of Overlay that will be great.

Best Regards,
Android.

oVERfLOW 08-26-2005 21:42

Hi dear Android

As I remember, we've discussed alot about this topic...
But Ican see that you are not familair with it yet.

Overlay files has NO structure and NO standard.
An overlay file is a simple GIF, JPG, TXT or any other file format that is phisically copied at the end of an executable file.

the main executable file opens itself (by CreateFile API NOT from memory) and finds the offset of appended file.
then reads the information inside like the original GIF, JPG, TXT or ... file format
for example a.exe opens itself and finds the header of a gif file and then shows the content on the screen

as you remember I've used the same technic in Alparysoft Lossless Codec Keygen and other newer Keygens...

When Xoex told me that this is not a safe way to hide files in the main executable...

Ba bye.

shyokou 09-03-2005 23:01

Do you mean resource ...
 
afaik overlay is an old way of referring resource, for gui, generally ...

for win32 you may find many ways to deal with the resource, or overlay as you talk about it, including console and gui appz. in ms vs, for instance, you may add resource to a project, like dialog, bitmap, font, icon, any kind of file you can imagine ...

do you mean resource when you say overlay ?

Quote:

Originally Posted by Android
Hi,
I faced some PE files that have Overlay.
I want to know how it's possible to compile a PE File to have Overlay properties.

Is it something which is connected to the Compiler or is it depended on the style of Coding?

Regards,
Android.


oVERfLOW 09-04-2005 02:10

Surely No!

I know he is familiar with resource section and cracking
but Overlay files is not a standard way of storing files
and as he is not a programmer he haven't been working on Overlay technic...

Ba bye

shyokou 09-04-2005 15:03

scope ...
 
well, the "overlay" in large is the parent of resource, counting the non-standard format, etc ...

but i dont think a big difference between overlay and resource, as you know, the resource stuph is in a standard way, right ?

i presumed android wanted a way to incorporate his/her overlay with pe -

Quote:

Originally Posted by Android
Hi,
I faced some PE files that have Overlay.
I want to know how it's possible to compile a PE File to have Overlay properties.

Is it something which is connected to the Compiler or is it depended on the style of Coding?

Android.

i dont see a relationship between these :(

Quote:

Originally Posted by oVERfLOW
Surely No!

I know he is familiar with resource section and cracking
but Overlay files is not a standard way of storing files
and as he is not a programmer he haven't been working on Overlay technic...

Ba bye


Android 09-11-2005 19:44

Hi,
Thansk for the replies and explanations.
But what I really need, is to compile a file which has overlay attributes.
Imagine this very very simple code in C++

Code:

#include <iostream.h>

int main()
{

       
        cout << "Hello World" << endl;
       
        return 0;
}


I want someone to add the commands and instructions that when I compile it
I can get a file with overlay properties.

Frankly,I need an example of coding that the result is an Overlay file.

So show me how you make it practically.

Thanks in advance.
Best Regards,
Android.

oVERfLOW 09-12-2005 01:52

Code:

(VB)

Open App.ExeFileName & ".exe" for binary access read as #1

lngHeaderPos = FindBinaryValue ( "oVERfLOW" , #1 ) 'a user defined function
Get #1, lngHeaderPos + 8&, lngMyNumber

Close #1

OK
We must compile this file with default options
and after that we must create a file with the following contents...

Code:

oVERfLOW1234
then we will go to command prompt and type the following command.

Code:

copy /b oVERfLOW.exe+oVERLAY.ovr OVERLAYED.exe
a file named overlayed.exe will be created that opens itself and reads a long integer value then closes itself

is it clear?
hopefully

have a good time ba bye

Android 09-12-2005 12:38

Hi Overflow.
Thanks for the explanation.
I try to understand the idea but you know I don't know VB.
I wish you could make an example in C++ or ASM.

Also another question.
I want to know if what you said is the only way of making Overlay files.
Is there any other method?

Best regards,
Android.

dj-siba 09-12-2005 17:53

in DOS days there was the limit of memory
so the EXE has it's size limit,
Compiler making big EXE can't fit into memory and can't execute
the was the solution to split the EXE to other modules named .OVL
so only a part of the main EXE are loaded in execution time then
the main modules loads other parts .OVL upon his need... that's All

With Win32 and PE the amont of memory is BIG :) so no need for overlay

but every addition to the EXE is interpreted as Overlay what ever it is Binary or Resource

oVERfLOW 09-13-2005 02:29

Very good explenation.

I'd seen that OVL files but it's the first time that I understand the usage.
Very good!

And for you dear Android
you must compile a default exe file that open itself as a usual file.
then it searches for a header or string... or by getting the original exe file size from PE header and reading information after that...

Ba bye

Android 09-16-2005 18:19

Hi,
Thanks for the info.
Now i'm just curious whether it's possible to attach a DLL file to an EXE file and make it Overlay file!

Then the Exe should call for dll file which is overlayed.
Shall the DLL file be extracted info the Temp folder or not?


@dj-siba's
I want to know how it was possible to make OVL files in OLD DAYS.
Is there any Special Command?

Thanks in davnace.
Regards,
Android.

Unforgiv3N 09-16-2005 19:26

if you have source code you can attach it to your App as a Resource otherwise you can use Appz like MoleBox,Thinstall,PeBundle,.... and attach the *.dll to Root Dir, Your App will read it and run.


All times are GMT +8. The time now is 10:24.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX