Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
11-29-2012, 23:06
(This post was last modified: 11-29-2012, 23:33 by Tomsen1410.)
And one other question: Could you just extract the .iwi file by just saving those bytes from the beginning(0x8000) to the end and create a file with those bytes?
Or is it much more complex?
@kokole:
http://en.wikipedia.org/wiki/Endianness
Posts: 719
Threads: 69
Joined: Nov 2010
Reputation:
76
11-30-2012, 11:25
(This post was last modified: 11-30-2012, 11:55 by master131.)
Also, regarding the IWI format and a little bit on the ipak header format:
http://www.itsmods.com/forum/Thread-no-m...8#pid90998
An additional note, it seems that the IWIs are compressed and are not stored raw data (the data seems too random and do not have repeating bytes) so even if you did write a tool to dump them, they'd be in a compressed state. Also, the IWI header seems to have extra fields this time around (around 0x10 bytes or so) in the header I think. Anyway, I tried repairing the headers and pretending that it was from BO1 and got this:
A casual conversation between barata and I about Nukem.
Posts: 1,519
Threads: 107
Joined: Dec 2011
Reputation:
48
11-30-2012, 15:49
(This post was last modified: 11-30-2012, 16:00 by kokole.)
(11-29-2012, 23:06)Tomsen1410 Wrote: And one other question: Could you just extract the .iwi file by just saving those bytes from the beginning(0x8000) to the end and create a file with those bytes?
Or is it much more complex?
@kokole:
http://en.wikipedia.org/wiki/Endianness
The pointer in the section header that points to iwi data, points to an iwi pre-header which is of 128 bytes size.
This is the pre-header of an iwi file:
The 01 is how many sizes there are...
Its like this:
Code: WORD size;
WORD unknown;
WORD size;
WORD unknown;
If there were 02, the 2nd "size" won't be null, so you need to do 1st size + 2nd size to get total iwi size. Btw an IWI can be separated in segments for perfomance or some shit.
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
Thank you @ kokole but i cannot see your pic.
Posts: 1,519
Threads: 107
Joined: Dec 2011
Reputation:
48
11-30-2012, 16:00
(This post was last modified: 11-30-2012, 16:06 by kokole.)
(11-30-2012, 15:56)Tomsen1410 Wrote: Thank you @kokole but i cannot see your pic.
Fixed xD
Btw, here is the iwi file structure for previous cods if someone wants http://www.callofduty.ru/wiki/%D0%A1%D1%...0%BB%D0%B0 btw the link wont work on firefox, use internet explorer, also its in russian xD
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
11-30-2012, 16:05
(This post was last modified: 11-30-2012, 16:14 by Tomsen1410.)
Thank you, sir!
Well, I dont know russian.
Posts: 801
Threads: 66
Joined: Mar 2011
Reputation:
35
(11-30-2012, 16:00)kokole Wrote: (11-30-2012, 15:56)Tomsen1410 Wrote: Thank you @kokole but i cannot see your pic.
Fixed xD
Btw, here is the iwi file structure for previous cods if someone wants http://www.callofduty.ru/wiki/%D0%A1%D1%...0%BB%D0%B0 btw the link wont work on firefox, use internet explorer, also its in russian xD
Thanks Ignacio, will czech that out.
Posts: 719
Threads: 69
Joined: Nov 2010
Reputation:
76
(11-30-2012, 16:00)kokole Wrote: Btw, here is the iwi file structure for previous cods if someone wants http://www.callofduty.ru/wiki/%D0%A1%D1%...0%BB%D0%B0 btw the link wont work on firefox, use internet explorer, also its in russian xD
Currently, the page has no text. You can search for this page title in other pages, or search the related logs .
A casual conversation between barata and I about Nukem.
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
So, as far as I know now there are multiple .iwi files in one.ipak file?
And there is an .iwi header, where you can see how many .iwi files are in there AND which size each of them has.
So I could just extract the amount of bytes after the header until the size of the first .iwi and I would get the file IF they wouldnt be compressed?
Am i right?
Posts: 1,519
Threads: 107
Joined: Dec 2011
Reputation:
48
12-01-2012, 15:27
(This post was last modified: 12-01-2012, 16:29 by kokole.)
(12-01-2012, 12:06)Tomsen1410 Wrote: So, as far as I know now there are multiple .iwi files in one.ipak file?
And there is an .iwi header, where you can see how many .iwi files are in there AND which size each of them has.
So I could just extract the amount of bytes after the header until the size of the first .iwi and I would get the file IF they wouldnt be compressed?
Am i right?
1. Yes there are multiple .iwi files in one .ipak file, but well there could be only 1, or 100000, its just like .rar
2. Currently I dont think you can directly see how many .iwi files there are, but you could try to find how many "IWi" strings are there. To see the size of the iwi files you should check out the pre-iwi header, which starts at 128 bytes before the iwi header, and is 128 bytes long.
3. Yea just get the size of the iwi file, get the start of the file, and start copying bytes from start to end (you get end by doing start + iwi size)
Oh and there are "segmented" iwi files, its a little complex, so when I make my iwi .ipak extractor I will release the source so you can see what I did.
And I also noticed that there are not only .iwi files in index 02, but I might be wrong.
|