Importing and exporting files with HEX editor tutorial!

kills999

Club Cricketer
Joined
May 19, 2008
Location
Mumbai
Online Cricket Games Owned
I have had many requests from MS_Dhoni and max_dillon2007 to make a HEX editor importing and exporting tutorial.So here it is.

Overview and facts:
(Every box in HEX editor contains 1bit of that file)
1)Any file in HEX format starts with the three letters of its extension.
Here are two examples of DDS and PCM files in their HEX format.
f_Untitled1m_c1ba997.jpg

f_pcmexamm_84726ae.jpg

2)All archive formats i.e .bag , .mng which store other files have two parts.

Part I: Listing section, where all the filenames in the archive can be seen.
f_listsectionm_8c4d57f.jpg

Part II:As soon as the listing of files ends.Files are stored continuously one after the other.

However, since it is very tedious to see a file list in the HEX editor we will use MNG Extractor and Bag Importer to see file lists in MNG and BAG archives respectively.So the listing part is not of much importance to us.

Importing:


Here i will show you how to import Australia logo into Frontend.mng.

1) First we see what is the position of aus_flag.dds which is the australia logo in Frontend.mng.
f_auscountm_7120490.jpg

2)Now we will try to split the Frontend.mng file into two parts such that it excludes file we have to import.
Here we split Frontend.mng into the part before aus_flag.dds and another part after aus_flag.dds.But Remember this does not include the file aus_flag.dds itself!

How to split it:
1) If you have read Overview and facts point 1)you will see that every file starts with its extension in HEX.

2) So we Open Frontend.mng in HEX editor and press Ctrl+F and fill in the box as follows and press enter.
f_searchm_f491982.jpg

And you should be here:
f_1stfilem_e59795b.jpg

This is the start of the 1st DDS file i.e arr_drop.dds

3)We repeat this procedure 8 times to get to the start of the 8th DDS file which is the Australia logo.
f_auslogostarm_819a6cc.jpg

4)Go to Edit-->Delete From Cursor.
f_deletefromm_55ef41d.jpg

5)Now you will be left with the part of the file above the Australia logo.
Go to File-->Save As..
Keep the file name as part1.mng.
6)Open Frontend.mng with HEX editor again and repeat step 3) but instead of searching 8 times do it 9 times.
f_9thonem_1424b60.jpg

7)Now select the box which I have labeled as "Last Bit OF the 8th dds file" and go to Edit-->"Delete to cursor".Now you will be left with the entire MNG file except the Australia logo and the part1.
Go to File-->Save As.. and save this file as part2.mng.
8)Now extract aus_flag.dds from Frontend.mng using lazy_chestnuts MNG extractor and edit it.(Easy Part!!!!!!!)

Now you have Frontend.mng split into three parts.part1.mng before the logo,the new edited logo and part 2.mng after the logo.

Now you have to RECOMPILE the entire MNG file.

How to Recompile:


1)Open part1.mng with HEX editor and go the the bottom and select the last box.Go to Edit-->Insert new string, Press Enter
f_insertm_ae6c6f7.jpg

2)Now comes the tricky part.Once you insert the "0" you will see that it is inserted before the last box as follows.
f_inerm_124d9e4.jpg

Interchange the letters so that the "0" is last.

3)Now select this last "0" go to File-->Insert and select the edited Australia logo it will be inserted before the "0".

4)Again go to File-->Insert and select the part2.mng.It will be inserted before the 0 again.

5)Delete this last "0" and save this file ad Frontend.mng.
 

MS Dhoni

School Cricketer
Joined
May 30, 2008
Location
U.S.A
Online Cricket Games Owned
Yo kills, i have tried this with importing the faces but its not doing it right. I did the same steps it shows in your tutorial but its not working wth Playerheads.bag file. when i was doing the second part of the file(part2) then i had to find it to one more number added to the previous one and i did that but then it selected the second file and i am editing the first file. ill try to do it again with the 8th file like you did in your tutorial and see if it works.

Ok i have tried the 8th file too and its stil not working.
 
Last edited:

Users who are viewing this thread

Top