Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request unpack base.ipak
#21
(12-01-2012, 15:27)kokole Wrote:
(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?
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 iwi header, which starts at 128 bytes before the iwi header, and is 128 bytes long.

LOL
[Image: compiling.png][Image: aLKA8og_460sa.gif]
Reply

#22
(12-01-2012, 15:27)kokole Wrote: 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 iwi header, which starts at 128 bytes before the iwi header, and is 128 bytes long.

What do you mean with that?

"you should check out the iwi header, which starts at 128 bytes before the iwi header"
[Image: ctoc.jpg]
Reply

#23
(12-01-2012, 15:48)Tomsen1410 Wrote:
(12-01-2012, 15:27)kokole Wrote: 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 iwi header, which starts at 128 bytes before the iwi header, and is 128 bytes long.

What do you mean with that?

"you should check out the iwi header, which starts at 128 bytes before the iwi header"

Sorry lol my mistake, iwi pre-header, or it might be a file pre-header, that tells what type of file it is and its size

you should check out the iwi pre-header, which starts at 128 bytes before the iwi header
Reply

#24
Hey, I just noticed that if you divide the length of section 1 by 16, you will get how many iwi's (or files) are in the .ipak. That's because section 1 is some array of structures of 16 bytes for each file.

EDIT: lol much easier way, the 4th dword of a section header (that was unknown when I posted the header structures) is numOfEntries, which can be, number of files for example. In section index 2 numOfEntries means how many files there are in the .ipak, and in section index 1 numOfEntries means how many file descriptor structures are there.
This is all what I know about the file descriptor structures (they are located in section index 1):
Code:
typedef struct _ENTRY_DESCRIPTOR
{
    DWORD checksum; // not sure what type of checksum
    DWORD unknown2; // probably file index, like file n1, file n2
    DWORD fileOffset; // to get offset in file, you must do section start + fileOffset
    DWORD fileSize; // including pre-headers and padding
} ENTRY_DESCRIPTOR; // 16 bytes
Reply

#25
Lets keep this thread as official iwi reversing thread Troll

I've found this string in black ops II exe "Interlace handling should be turned on when using png_read_image" near other strings about textures and compression so I think they are using png instead of dds now on some iwi files
Reply

#26
(12-04-2012, 21:21)kokole Wrote: Lets keep this thread as official iwi reversing thread Troll

I've found this string in black ops II exe "Interlace handling should be turned on when using png_read_image" near other strings about textures and compression so I think they are using png instead of dds now on some iwi files

Black Ops II seems to use libPNG for PNG operations.

The function containing the string "Image is too high to process with png_read_png()" is png_read_png in libPNG. Use that as a reference for diassembly. Also, the game uses libPNG version 1.5.12, as specified from the game's executable.

Taken from Black Ops II Zombies:
Code:
if ( !dword_244D5FC
    || (v0 = sub_5B2890("1.5.12", 0, nullsub_3, nullsub_3, 0, sub_85C590, sub_85C5B0), (dword_244D5F8 = v0) == 0) )
    return 0;

Code:
char __cdecl sub_6747E0(int a1)
{
  int v2; // esi@6
  int v3; // edi@6
  int v4; // ebx@6
  int v5; // ebp@6
  int v6; // eax@6

  dword_244D5E0 = *(_DWORD *)a1;
  dword_244D5E4 = *(_DWORD *)(a1 + 4);
  dword_244D5EC = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(a1 + 12);
  dword_244D5F0 = *(int (__cdecl **)(_DWORD))(a1 + 16);
  dword_244D5E8 = *(_DWORD *)(a1 + 8);
  if ( !sub_85C660() )
  {
    if ( dword_244D5F0 )
      dword_244D5F0(dword_244D5E8);
    return 0;
  }
  sub_481CB0(dword_244D5F8, 0, sub_85C5C0);
  sub_54D960(dword_244D5F8, 1);
  // 1st param is png_structp, 2nd param is png_infop and 3rd param is int
  png_read_png((void *)dword_244D5F8, (void *)dword_244D5F4, 0);
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#27
@master131 png uses zlib compression, you can get raw pixel data from a png applying "offzip" (a tool), but I've tried it with iwi's and it didnt work
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Menu base EliTeEishiii 1 2,881 04-17-2013, 16:10
Last Post: Nekochan
  TomBMX IPAK exporter 1.1 (export texture files) JariZ 34 22,001 12-23-2012, 21:10
Last Post: kokole
  Help How to know weapon's base ServerClient.Ammo.PrimaryAmmoClip narkos 3 2,723 07-18-2012, 16:42
Last Post: narkos
  Source SDK (CS:GO base 2012) Arteq 3 3,193 06-14-2012, 18:02
Last Post: Arteq
  [Tutorial] Mw3 C# Base Trainer barata 11 8,674 04-22-2012, 21:00
Last Post: R3dbrnu
Big Grin [News] My first game base in C# XNA Nekochan 22 10,659 03-16-2012, 18:45
Last Post: Yamato
  ALL YOUR BASE ARE BELONG TO US HA HA HA!! 4FunPlayin 4 2,558 11-10-2011, 20:58
Last Post: Pozzuh
  Default Base Mod. Boomshay 1 1,625 07-03-2011, 13:17
Last Post: surtek
  Help Pack/Unpack FF. files TechnoX 1 3,712 06-04-2011, 09:57
Last Post: Pozzuh
  [Release] Mod Menu Base d0h! 13 9,850 05-22-2011, 23:37
Last Post: FUCK0FF

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.