Bioruebe / UniExtract2

Universal Extractor 2 is a tool to extract files from any type of archive or installer.
GNU General Public License v2.0
3.61k stars 338 forks source link

Enhance UniExtract with FitGirl Repack #82

Open felipedamata opened 6 years ago

felipedamata commented 6 years ago

FitGirl is one of the most well known encoder and uses very different algorithms for each game she repacks. UniExtract being able to handle her compression, setups, compiled .bin, etc certainly will take UniExtract to another level.

FitGirl site - http://fitgirl-repacks.site/

Note: Everybody says that she uploads clean files BUT I'm not sure... so try to use some sandboxed/isolated environment. (https://www.hybrid-analysis.com/sample/a485678f9d9e4c6614bda8398ae1d8c7832478d645ff77da2474b51c97306100/5ab591297ca3e157e51ea163)

I know almost nothing of code but I can test things for you, just e-mail me ok!

seigneurfuo commented 6 years ago

Adding a "FitGirl repack" extractor will be usefull. I'am also interrested in.

rmenessec commented 6 years ago

@felipedmc, are you sure this isn't just an Inno Setup archive with / without third-party compression?

Supporting such a thing might be within scope (@Bioruebe ?), but what you're describing seems likely to be encrypted using Inno Setup's own DRM or some third-party DRM scheme to prevent someone like you from re-releasing "FitGirl-brand" installers with malware packed in, or just to prevent you from taking credit for the work.

Evading Inno Setup's default DRM probably isn't hard (although it's illegal or questionably legal at best in some countries—including the United States), and I'd be unsurprised to find extant code elsewhere to do it... but trying to account for unknown third-party DRM seems out of scope to me.

Unless you really think FitGirl archives or similar archives really are packing in malware, you're probably best off just running the installer. I haven't experimented with UltraARC, but, from the look of it, you're probably wasting time and a lot of electricity trying to better the compression. If you just want the files, the only downside of the installer is—I assume—an uninstaller entry you'll just have to remember to remove (or run?) when you're done with the files.

From a look at the FitGirl file manifests out there, the installer .EXE itself is at least small enough to upload to VirusTotal, if that's your concern. Taking into account unknown code inside the archives themselves: any reputable antimalware product you can buy or download for free should be able to detect and extract an Inno Setup archive that isn't wrapped in DRM or other surprises. I've watched Windows Defender unpack and analyze quite large Inno Setup archives, including the ones I've created, and I'd be quite startled to hear that Avast! or COMODO or the like can't do the same.

rmenessec commented 6 years ago

Follow-on thought: I would not mind seeing basic support for Inno Setup archives packed with UltraARC; it could be useful for some of my research. If I find the time, I may experiment with the tools posted in the thread I linked to see if they alone are enough to do the job.

zaphod77 commented 5 years ago

"Q: How do you compress games? With what tools? A: I use mostly FreeArc for compression and Inno Setup as an installer. Some games require other compressors, but in 99.9% of cases it’s FreeArc."

fitgirl has spoken. InnoSetup+UltraArc using Freearc compression.

There is no encryption. it is only used when a password is required for setup, to force people to actually need the password. So there's no "InnoSetup DRM" to worry about.

the bin is a split file format, with the compressed files stored in it. i'm going to try and throw freearc at one of them.

okay the setup contains the tools to decompress the bin files. it is nearly always freearc with srep, and an ARC.INI telling it how to do it. you can unpack the setup with innounp.exe, which will get you the installscript and all the files needed to unpack the bin files.

https://encode.ru/threads/43-FreeArc/page81 info might be useful here.

You should be able to bypass the setup.exe and extract the bin files directly with a copy of unarc.exe, srep.exe, and an arc.ini configuring SREP.EXE as an external compressor. you can extract the ini and srep.exe from her installer. Note that this will bring your computer to it's knees just like the installer does, as srep is a ridonkulously huge dictionary compressor, capable of using dictionaries larger than your RAM (!).

zaphod77 commented 5 years ago

The setups are clean. the ability to reboot the OS is a common feature to have in setups, the url is to her site, the suspicious api is ultrarc. They are bog standard innosetups with ultraarc's freearc module and dll and srep. Extraction with the innosetup extractor backs this up.

eadmaster commented 5 years ago

recently they switched to another compression algo called Lolly, do you know how to extract it?

The-SamminAter commented 4 years ago

@eadmaster the compression algorithm switch was made back in 2017 I believe (looking at the timestamp), and it was mentioned here, that the (lolly) compression algorithm isn't public.

I don't know if this is useful or not, but while setups are running, a folder with the extractors is created in the Temp directory. This gets deleted when the application is closed, but you can duplicate the folder to get the extractors.

I suggest checking that out, as it may be a simple, out-of-the-box way to decompress FitGirl Repacks, though I doubt that it'll work.

felipedamata commented 4 years ago

@rmenessec I'm newbee at this point so I can't say if there are any illegal involved in this situation, but as @zaphod77 says (from what I understood), it seems to not use free tools and no encryption.

@zaphod77 The point is that I still not know if their repacks are safe or not, as you suggested the ultrarc maybe suspicious.

Even reading the responses I still do not understand if it is possible or not to make UniExtract support thoser repacks.

More explanation?

piratesephiroth commented 4 years ago

Looking at the recent GTA V repack, I see that they're using xtool

https://fileforums.com/showthread.php?t=101729

The-SamminAter commented 4 years ago

@felipedmc FitGirl Repacks are ultrarc are both known to be safe.

felipedamata commented 4 years ago

Any updates here?

Just to clarify the possibilities to enhance the uniextract:

What could possible?

Obs.: Reading people comments it is notable we are not sure if it is safe or not. Any security professional here to tell us?

The-SamminAter commented 4 years ago

Has any progress been made on this?

ghost commented 4 years ago

Hi, do anybody know how FitGirl add a Music to her Repacks? [I'm new Here]

pratikpatel8982 commented 4 years ago

Hi, I finally found a way to extract repacks. Today I'm going to show a way to extract repacked game without installing them.

PREREQUISITES:

  1. FreeArc
  2. InnoUnp
  3. Repacked Game

This method will work with some of the simple repacks but we are using Watch Dogs DODI repack for example.

STEPS:

I. Obtaining the Specialized decompressors that repacks use.

  1. Extract innounp somewhere in your computer.
  2. Obtain the setup file of your repack.
  3. Copy the setup file to the directory where innounp is located and rename it to "setup.exe" without the quotes.
  4. Open Command Prompt as Admin.
  5. cd to the location where innounp is located. (here it is D:\innounp049) cd /d D:\innounp049
  6. Type the following command: innounp -x -m setup.exe -doutput
  7. The setup files are extracted in the "output" folder

II. Integrating them in FreeArc.

  1. Extract FreeArc Somewhere.
  2. Navigate to the output folder and open {tmp} folder.
  3. Copy all the files from this folder (except the .png and jpg files) and paste them into FreeArc\bin folder and overwrite if asked.

III. Extracting the Repack.

  1. Open FreeArc.exe as administrator. [IMPORTANT]
  2. Navigate to the setup files and extract them one by one.

HURRAY!! YOU HAVE SUCCESFULLY EXTRACTED THE REPACKS.

Redleprechaun97 commented 4 years ago

@pratikpatel8982 I made an account just for this.. You've done a fantastic job up until the slight vagueness of the final steps(IMO).

I assume when you say navigate to setup files you mean the fitgirl repacked game bin files? and if so, freearc's error at the bottom says it isnt an archive or corrupt ( I've verified the files several times with tixati and quicksfc) and i'm guessing this is because it isn't an .arc archive.

Could you help me understand what i'm doing wrong? Google says you're the only one posting instructions on unpacking fitgirls games. If it helps i'm trying to uncompress DCS world (250gb uncompressed) as I only ever have issues with her very large games and cant get this one installed.

Your guidance is appreciated :D

Redleprechaun97 commented 4 years ago

Can anyone be of help?

piratesephiroth commented 4 years ago

This just won't work. Those repacks don't follow a simple unpacking routine. Many of them do all sorts of tricks to reduce the final file size like splitting and rejoining.

The-SamminAter commented 4 years ago

The custom tools used to extract the files are present in her repacks, would it be possible to figure out how they work or how to use them?

Thinking it might be helpful, a while ago I tried running every executable in the temp folder created during the installation of a repack, here's what I found:


bcm.exe, prints out the following:

BCM - A BWT-based file compressor, v1.25
Copyright (C) 2008-2016 Ilya Muravyov

Usage: D:\Documents\FitGirl Extraction\bcm.exe [options] infile [outfile]

Options:
  -b#[k] Set block size to # MB or KB (default is 32 MB)
  -d     Decompress
  -f     Force overwrite of output file

cls-lolly_x64.exe, prints out the following:

                              .B22SSS2S222X8MM@@W7
                              0M2aSXaSSSS222X8M@@@@Mi
                              B0S2772XXXaSSaSXMB@@@@@M.
                             :@aX777772000000XX88BB@BBBXS27i:                       :72aX0XXXX27
                             7BX272222777i:..          ::r722S00X2i.          i2XWMMMMM8WWWZW8@@@
                             2@X77r:.                          .:2ZB@0r  .2XMMM8Z0XaSSSSSSSS22ZBB
                             2S.                                    :2M@@@B0XSSSSSSSS2SSS22222ZM@.
                           .                                           :XBB0S2SSXaXXXaaSSS22228B@:
                         .                                               .X@MX22S222SSaaS2S2208B@:
                       . . .   .       ..                                  iBBSr;7777772XS2228MB@.
                     ..  .. ...     ...  .                                   8@07r7777r2XS2208@@@
                   ..... ... ...  .i:         ..                              M@87;77772a22X8BB@M
                  ............   77   ...      ..               .:             BBM2r7772S2S8M@@B2
                 ......... ..  .S7 .....   .....       i:       2.             :@MM7r7722S8M@BB@
                 :....... ::  :X7  ..   .:i:.       .rX7       7a       .       2@8M7i72XWMB@@@:
                .. ..... .7  rX2      :77i.    .:i72XZ7       2W:                BMM8i2Z8BB@@@2
                ........ 2i 72Xi77. :22r  .:r722220Z2.     .7XZ7                 7@ZM88MB@@BBX
                ..i.... :2 7207  .22227722222SS2SX2.     :2aS87   ...    :        M80M@@@B@@S
                .:7: .. 27r22S.  i2X2222SSaS22777.  ..:7SS27a7   .. .   r.        2@XM@@@@B2
                 i72 ...272277  722SSS2227:  ..  :2X080W8a2Si  .....   22  .. .   :@0BB@B@:
                 .727  .22Xr:7.2S277i:.   :r7rr7222227;i.2S77i. .    :X0.  ....    MMB@B07
                  7227 .2Z72BBB@Si.      :77rrrr:.      :7  .:i:   :2WS;   ..  ..  M@BZ772.
                  .S72r:WXX@8i7ZB7               :.    ::      :i7220S7  .......   8@@iii:
               ..ii22227XXB7  2@@M              .:7i2S7::;77722227;Sai  ........   @Bi    .
               .X7.iX777aX2  7 MBB              7B@@@BW27.:r;i:. iX2.  .... ..... :@:     .
                ::722X27X2  0@B@@2             .7r.i28@@@S.     ;2:  ...  .:..... i:      .
               :r2277722S: .a0B@@                  S@@B@@B@X:  77       :77.......   ...  .
              r72277777aS. 07207i                 . :@M8MB@@@77: ....i7SX7.............. ..
             :222227722.   M2:Sr                 7M27ZMBMMBB@82222770aX2: .............  .
             22222272X:    .72:                  87W@X@BZMB@BM7  :rXS2i. ........... ... i
            .227 r22X:iii                       i8iM@WBW0@@@@@7  rX2i. .......... i7 .  7.
            .7.  S.27 ... . ..                  7M:7Z8WMM2M@@M  iSi  ......... :. 22   77
                   r.    .  .                    BS. ..i2 22:7 :2. .......... :2. 2Si 7X
                  .7r                             72X0X27     :7............ .Xr  7a22X:
                 .:22                                        :r............ :S2....S227
                ::22S.                            :r...    .r:.........:: .7S22. . iX2
                :22222                            .r7r7.  :r.........:;: i72222:... 7i
                722272r      ..                     ... :r:....  .:ir:.:722 :227 ... .
               :222727S.   'r2X027                   .:.  .. .i727;:;727ri. 722. ....:.
              .72272722X     777                  i27777777SX0277777r:..i772S22:.........
lolly v19j

cls-lolly_x86.exe, prints out message identical to cls-lolly_x64.exe cls-lollypop_x64.exe, prints out lolz v20d3 [Oct 30 2017 17:30:22] cls-lollypop_x86.exe, prints out message similar to cls-lollypop_x64.exe (time differs) cls-lollypop2_x64.exe, prints out lolz v21a7 [Jan 2 2018 13:04:16] cls-lollypop2_x86.exe, prints out message similar to cls-lollypop2_x64.exe (time differs) cls-lolzi_x64.exe, prints out nothing cls-lolzi_x86.exe, prints out nothing cls-lolzx_x64.exe, prints out lolz test17g cls-lolzx_x86.exe, prints out the same as cls-lolzx_64.exe cls-magic_x64.exe, prints out lolz v22b8o [Jul 24 2018 12:57:28] cls-magic2_x64.exe, prints out the following:

lolz v22c4b [Dec 30 2018  16:44:57]

available options:
 transfer data options: -Bufsize, -transfer_ReadBufSize, -transfer_WriteBufSize
 for mtt1:  -MaxThreadsUsage, -MaxMemoryUsage
 for ldmf1: -ldmfTempPath, -ldmfMaxMemoryUsage, -ldmfDeleteTmp

cls-magic2_x86.exe, prints out message similar to cls-magic2_x64.exe (time differs) cls-magic2l_x64.exe, prints out message identical to cls-magic2_x64.exe cls-magic2l_x86.exe, prints out message identical to cls-magic2_x86.exe cls-magicl_x64.exe, prints out message identical to cls-magic_x64.exe cls-srep_x64.exe, prints out nothing cls-srep_x86.exe, prints out nothing FlushFileCache.exe, prints out the following:

FlushFileCache v1.0 - www.DelphiTools.info

Failed to obtain IncreaseQuotaPrivilege
Failed to obtain ProfileSingleProcessPrivilege

lolz_x64.exe, prints out nothing lolz_x86.exe, prints out nothing rz.exe, prints out the following:

 *** RAZOR Archiver 1.00 (2017-09-08) - DEMO/TEST version ***
 *** (c) Christian Martelock (christian.martelock@web.de) ***

 Syntax: rz [-<option>...] <command> <archives> [<files>...]

 Commands...
        l       List    archive
        e       Extract archives using no   paths
        x       Extract archives using full paths
        t       Verify  archives (checksums)
        a       Create  archive  (ignores junctions, sym- or hard-links)
                        @file is treated as a listfile (UTF-8)

 Options...
        d N     Window [1M..1023M] (default 64M, decoder uses 1.66N memory)
        o DIR   Target directory
        r       Scan/collect files recursively (except archives)
        n       No  to all queries
        y       Yes to all queries

 Examples...
        rz a -d 1111k archive.rz *.dll c:\dir\*.* @list
        rz e -r -y -o dir   *.rz *.dll

 For compression, a window-size of (1/64/512)M uses ~(55/900/6500)M of memory.
 DO NOT directly or indirectly modify, decompile or otherwise reverse engineer
 this software. Use this demo at your own risk.

rzw.exe, prints out nothing x5.exe, prints out the following:

options count ERROR!
usage: hpatchz [-m|-s[-s-cacheSize]] [-o] oldFile diffFile outNewFile
memory options:
  -m  oldFile all loaded into Memory; fast;
      requires (oldFileSize + 4 * decompress stream size) + O(1) bytes of memory
  -s-cacheSize
      oldFile loaded as Stream, with cacheSize; DEFAULT;
      requires (cacheSize + 4 * decompress stream size) + O(1) bytes of memory;
      cacheSize can like 262144 or 256k or 512m or 2g etc..., DEFAULT 128m
special options:
  -v  output Version info.
  -o  Original patch; DEPRECATED; compatible with "patch_demo.c",
      diffFile must created by "diff_demo.cpp" or "hdiffz -o ..."

xtool.exe, prints out the following:

XTool version 0.9

Created by Razor12911

Commands:
  e - encode
  d - decode

Operations and codecs available:
  precomp - data precompression
    zlib     : loaded
    crilayla : not loaded
    lz4      : not loaded
    zstd     : not loaded
    lzo      : not loaded
    oodle    : not loaded

Options:
  precomp - data precompression
    c# : chunk size (default 16mb)
    t# : number of threads, use p for percentage
    dm#: decoding memory [1(low) .. 3(max)]
    dt#: diff tolerance (default 0.1)
    v  : skip verification

Usage   : XTool [command]:[operation]:[options]:[codecs] [input] [output]
Example : XTool e:precomp:c32mb,t4:zlib,lz4 Textures.tfc Textures.tfc.xtl

Acknowledgement:
  zlib:
  -  Jean-loup Gailly
  -  Mark Adler
  reflate:
  -  Eugene Shelwien
  bdiff:
  -  Peter Johnson
  crilayla:
  -  KenTse
  -  RamiroCruzo
The-SamminAter commented 4 years ago

More possibly (hopefully) useful information:


Contents of the temporary folder in which all of these are stored:

_isetup                cls-lolzi_x64.exe    FlushFileCache.exe
arc.ini                cls-lolzi_x86.exe    hif2raw_dll.dll
BASS.dll               cls-lolzx.dll        idp.dll
bcm.exe                cls-lolzx_x64.exe    innocallback.dll
botva2.dll             cls-lolzx_x86.exe    ISDone.dll
CallbackCtrl.dll       cls-magic.dll        lolz_x64.exe
CLS.ini                cls-magic_x64.exe    lolz_x86.exe
cls-lolly.dll          cls-magic2.dll       music.mp3
cls-lolly_x64.exe      cls-magic2_x64.exe   MusicButton.png
cls-lolly_x86.exe      cls-magic2_x86.exe   raw2hif_dll.dll
cls-lollypop.dll       cls-magic2l.dll      rz.exe
cls-lollypop_x64.exe   cls-magic2l_x64.exe  rzw.exe
cls-lollypop_x86.exe   cls-magic2l_x86.exe  wintb.dll
cls-lollypop2.dll      cls-magicl.dll       x5.exe
cls-lollypop2_x64.exe  cls-magicl_x64.exe   xtool.exe
cls-lollypop2_x86.exe  cls-srep_x64.exe     zlibwapi.dll
cls-lolz.dll           cls-srep_x86.exe
cls-lolzi.dll          cls-zstd.dll

Contents of _isetup:

_setup64.tmp  _shfoldr.dll

Contents of arc.ini:

[External compressor:precomp043]
header = 0
unpackcmd = precomp043 -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

[External compressor:fbz]
header = 0
solid=0
unpackcmd = fbz d $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

[External compressor:nco]
header = 0
solid = 0
packcmd   = nz.exe a -nm {options} $$arcpackedfile$$.nz $$arcdatafile$$.tmp
unpackcmd = nz.exe x $$arcpackedfile$$.nz
datafile   = $$arcdatafile$$.tmp
packedfile = $$arcpackedfile$$.nz

[External compressor:mpz]
header = 0
solid = 0
unpackcmd = mpz.exe d $$arcpackedfile$$.mpz $$arcdatafile$$.mp3
datafile = $$arcdatafile$$.mp3
packedfile = $$arcpackedfile$$.mpz

[External compressor:precomp]
header = 0
unpackcmd = precomp -o$$arcdatafile$$.tmp -r $$arcpackedfile$$.tmp

[External compressor:reflate]
unpackcmd = reflate.exe d -t75p - -o - <stdin> <stdout>

[External compressor:msc]
header = 0
packcmd   = msc c -v {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp

[External compressor:pzlib]
header    = 0
unpackcmd = pZLib d -t100p - -o - <stdin> <stdout>

[External compressor:piggy]
unpackcmd = piggy.dll -c d $$arcpackedfile$$.tmp $$arcdatafile$$.tmp 

[External compressor:lzma2]
header = 0
unpackcmd = lzma2.dll x -txz -an -y -si -so <stdin> <stdout>

[External compressor:uharcx]
mem = 58
default = x
unpackcmd = uharc x $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

[External compressor:bcm]
header = 0
solid = 0
cmem = 1024
unpackcmd = bcm -d $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

[External compressor:woohoo4,woohoo,woohoohoo]
header = 0
solid = 0

[External compressor:lol4]
header = 0
unpackcmd = cls-lolzx_x64.exe $$arcpackedfile$$.tmp $$arcdatafile$$.tmp 

[External compressor:pz3,pz3x,pz3u]
header = 0
unpackcmd   = ztool d:pzlib:t100p:cm0 - - <stdin> <stdout>

[External compressor:plzo]
header = 0
unpackcmd   = ztool d:plzo:t100p:cm0 - - <stdin> <stdout>

[External compressor:exenew]
header    = 0
solid = 0
unpackcmd   = deexe d - - <stdin> <stdout>

[External compressor:rzw]
header = 0
solid = 0
dmem = 213
unpackcmd  = rzw d f2 f1 128 128 
datafile   = f1
packedfile = f2

[External compressor:rzwb]
header = 0
solid = 0
dmem = 700
unpackcmd  = rzw d f2 f1 1023 1023
datafile   = f1
packedfile = f2

[External compressor:mpzz]
header = 0
unpackcmd = oggre_dec.exe {options} $$arcpackedfile$$.tmp $$arcdatafile$$.tmp 

[External compressor:xt,xt4]
header    = 0
unpackcmd = xtool.exe d:precomp:t100p - - <stdin> <stdout>

[External compressor:prelz4]
header    = 0
unpackcmd   = prelz4.exe e - - <stdin> <stdout> -9 -B7 nul nul 

Contents of CLS.ini:

[Srep]
Bufsize=24m
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
Memory=60%-2048m
TempPath={app}

[Precomp]
Memory=128
TempPath={app}

[lolly]
MaxMemoryUsage=75%-10m

[lollypop2]
Bufsize=512k
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
MaxThreadsUsage=100%
MaxMemoryUsage=75%-10m

[magic]
Bufsize=512k
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
MaxThreadsUsage=100%

[magicl]
ldmfMaxMemoryUsage=1024m
ldmfTempPath={app}
Bufsize=512k
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
MaxMemoryUsage=75%-10m
MaxThreadsUsage=100%

[magic2]
Bufsize=512k
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
MaxThreadsUsage=100%
MaxMemoryUsage=75%-10m

[magic2l]
Bufsize=512k
ldmfTempPath={app}
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
MaxThreadsUsage=100%
MaxMemoryUsage=75%-10m
ldmfMaxMemoryUsage=1024m
ldmfDeleteTmp=1
The-SamminAter commented 4 years ago

I do believe that all of this data is from an older repack, so there may be more executables or files present in the latest repacks.

oureveryday commented 4 years ago

The latest repacks also just have these files.

Redleprechaun97 commented 4 years ago

I really appreciate the assistance folks! Compression is not my forte.. I've also been too busy lately to comb through your info but again, I appreciate it!

I hope someone can figure this out. It can't be that difficult!

akshit5230 commented 3 years ago

What if i don't have a setup.exe file. I want to extract all the bin files i downloaded as Windows deleted the setup.exe finding a trojan in it. And since its a trojan i don't want to open the file now by disabling the defender.

Didn't expect fitgirl to put a trojan in setup file. I can't install the game now.

keru1264 commented 3 years ago

@akshit5230 if you don't believe the fact, that any packer/keygen can be in false positive and trust everything defender says, then probably you shouldn't bother installing anything

Redleprechaun97 commented 3 years ago

keru1264 has a bit of a point. Knowing which packages are trustworthy is up to you when it comes to pirated anything. In my opinion this is a basic knowledge when it comes to pirating. Nearly all pirated programs will register a false positive and are usually safe.

We all learned one way or another and trial and error is a bitch. I'd suggest a virtual machine for programs you're unsure of as it will "trap" malware. Or just an old POS lol :p

Any one of the geniuses here figure out fitgirls recipe yet?

akshit5230 commented 3 years ago

anyways i figured out why I got the trojan. The setup file from the repack was modified and infected by attackers. I went to fitgirl's official website and got the setup file from there. It was different and and worked and installed the repack safely without defender detecting any trojan. Beware and only get the repacks from official site. Don't download them from anywhere else as you'll lose your privacy once that malware is in your os.

pratikpatel8982 commented 3 years ago

@pratikpatel8982 I made an account just for this.. You've done a fantastic job up until the slight vagueness of the final steps(IMO).

I assume when you say navigate to setup files you mean the fitgirl repacked game bin files? and if so, freearc's error at the bottom says it isnt an archive or corrupt ( I've verified the files several times with tixati and quicksfc) and i'm guessing this is because it isn't an .arc archive.

Could you help me understand what i'm doing wrong? Google says you're the only one posting instructions on unpacking fitgirls games. If it helps i'm trying to uncompress DCS world (250gb uncompressed) as I only ever have issues with her very large games and cant get this one installed.

Your guidance is appreciated :D

Hi, sorry for delay. I tested this method on several repacks, but it only worked in some of them. I posted the same tutorial on some other forum and fitgirl herself said that it may not work on complex repacks which involve rebuilding of game data. It will only work on simple repacks.

Redleprechaun97 commented 3 years ago

@pratikpatel8982 Thanks for the info! I thought of messaging her but figured it to be futile lol It's Interesting that she came across your tutorial, must've been googling herself 😋 (with good reason of course🙂)

I'll try deconstructing some more games. Appreciate your work 👍

r3sus commented 3 years ago

The method didn't worked for Dead Space 1. There is additional folder, which isn't extracted with innounpack, but used by installer on late stages. Contents:

build01.bat
fart.exe
fgpack.exe
fitgirl01.txt (in fact, .cmd/.bat, utilizing fgpack)
Made by FitGirl.txt (link to fg's site)
run.exe
x4.exe

My purpose was to unpack language files without installation of base. So I got GOG release, open .bin files as archive and unpacked required.

remarked a bit

pratikpatel8982 commented 3 years ago

The method didn't worked for Dead Space 1. There is additional folder, which isn't extracted with innounpack, but used by installer on late stages. Contents:

build01.bat
fart.exe
fgpack.exe
fitgirl01.txt
Made by FitGirl.txt - in fact, .cmd, utilizing fgpack
run.exe
x4.exe

My purpose was to unpack language files without installation of base. So I got GOG release, open .bin files as archive and unpacked required.

If innounpack didn't extract these files, then how did you manage to extract them?? Can you please tell us.

r3sus commented 3 years ago

Sure, these files are extracted during installation in some folder in %Tmp%. The exact destination can be figured with Process Hacker for example: find installer process, go to \Properties - \Handles tab - look in \File.

MrSharpp commented 3 years ago

Hi, I finally found a way to extract repacks. Today I'm going to show a way to extract repacked game without installing them.

PREREQUISITES:

  1. FreeArc
  2. InnoUnp
  3. Repacked Game

This method will work with some of the simple repacks but we are using Watch Dogs DODI repack for example.

STEPS:

I. Obtaining the Specialized decompressors that repacks use.

  1. Extract innounp somewhere in your computer.
  2. Obtain the setup file of your repack.
  3. Copy the setup file to the directory where innounp is located and rename it to "setup.exe" without the quotes.
  4. Open Command Prompt as Admin.
  5. cd to the location where innounp is located. (here it is D:\innounp049) cd /d D:\innounp049
  6. Type the following command: innounp -x -m setup.exe -doutput
  7. The setup files are extracted in the "output" folder

II. Integrating them in FreeArc.

  1. Extract FreeArc Somewhere.
  2. Navigate to the output folder and open {tmp} folder.
  3. Copy all the files from this folder (except the .png and jpg files) and paste them into FreeArc\bin folder and overwrite if asked.

III. Extracting the Repack.

  1. Open FreeArc.exe as administrator. [IMPORTANT]
  2. Navigate to the setup files and extract them one by one.

HURRAY!! YOU HAVE SUCCESFULLY EXTRACTED THE REPACKS.

Thank you for your instructions. But strangely some bin do open and extract, but most of them are not. Can you tell me how can i extract those too?

pratikpatel8982 commented 3 years ago

Hi, I finally found a way to extract repacks. Today I'm going to show a way to extract repacked game without installing them. PREREQUISITES:

  1. FreeArc
  2. InnoUnp
  3. Repacked Game

This method will work with some of the simple repacks but we are using Watch Dogs DODI repack for example. STEPS: I. Obtaining the Specialized decompressors that repacks use.

  1. Extract innounp somewhere in your computer.
  2. Obtain the setup file of your repack.
  3. Copy the setup file to the directory where innounp is located and rename it to "setup.exe" without the quotes.
  4. Open Command Prompt as Admin.
  5. cd to the location where innounp is located. (here it is D:\innounp049) cd /d D:\innounp049
  6. Type the following command: innounp -x -m setup.exe -doutput
  7. The setup files are extracted in the "output" folder

II. Integrating them in FreeArc.

  1. Extract FreeArc Somewhere.
  2. Navigate to the output folder and open {tmp} folder.
  3. Copy all the files from this folder (except the .png and jpg files) and paste them into FreeArc\bin folder and overwrite if asked.

III. Extracting the Repack.

  1. Open FreeArc.exe as administrator. [IMPORTANT]
  2. Navigate to the setup files and extract them one by one.

HURRAY!! YOU HAVE SUCCESFULLY EXTRACTED THE REPACKS.

Thank you for your instructions. But strangely some bin do open and extract, but most of them are not. Can you tell me how can i extract those too?

That's why I said that It'll work on simple Repacks.

MrSharpp commented 3 years ago

How do I know if a repack is simple or not?

pratikpatel8982 commented 3 years ago

How do I know if a repack is simple or not?

If it Extracts with the above method, it's simple. Else it is not

The-SamminAter commented 3 years ago

Some things I found:

With the information from these (and other sources), along with the tools contained in (presumably) all of FitGirl's repacks, one could likely extract the data from any of their repacks, including non-'simple' ones.

pratikpatel8982 commented 3 years ago

Some things I found:

With the information from these (and other sources), along with the tools contained in (presumably) all of FitGirl's repacks, one could likely extract the data from any of their repacks, including non-'simple' ones.

I'm going decode this for you.

How repackers compress their game? Repackers use (fitgirl and other repackers) freearc to compress their games. FreeArc has three main files:

How does this archives are unpacked Most of the repackers don't use vanilla freearc to compress their games. They use a custom version of arc.exe to compress their games and use its corresponding unarc.dll along with arc.ini to decompress them. This custom arc.ini make archive differently so that It'll give error when trying to open without setup. Usually pos discriptor at block (insert a random number here) is corrupt. They also put password to their archives to protect them.

They create a setup file along with the decompress it's that decompress the game. Now with the things you found:

  1. Lolz arguments:- It's useless and not needed because the setup already contains the arc.ini file which has the arguments. (Use innounpack)
  2. This might come in handy. But it's only a visual duplicate of fitgirl setup. Not the actual code one.
  3. I already know this.

Now I've found another way to extract simple repacks with the encryption I mentioned above. Basically you extract the setup, and obtain the files inside it and use another script like (2) and edit the script. You need to edit:

Then you can compile the script and place the output file near the archive and try running it to see if it extracts the file or not. Also not every script will support the pos discriptor archives.

Trust me, I've done Repacks for the past month and unarc.dll is the main file here.

What you need to understand about Installer scripts:

  1. In each script, you need to include your compressors and unarc.dll
  2. Don't include isdone.dll, it's different for every Installer (it will come included in the script you use)
  3. I recommend (I personally use this) using this script. It supports archives with pos discriptor error provided that they do not have a password.
felipedamata commented 3 years ago

So based on last comments I believe it is possible to automate it, right?

But it keeps me curious... why all that protection barriers for compress something that is not suppose to be harmful? I mean, what is the point doing that...

pratikpatel8982 commented 3 years ago

So based on last comments I believe it is possible to automate it, right?

But it keeps me curious... why all that protection barriers for compress something that is not suppose to be harmful? I mean, what is the point doing that...

Because of competition. The Repacks use compression algorithms (commands used to compress the game). Repackers protect their archives to protect their compression algorithms from being stolen. There is always competition between repackers with regards to repack size, and hence they use these methods to protect their algorithms.

The method I posted May be able to extract the archives, but you'll never know what algorithms were used to compress that archive.

Subarasheese commented 3 years ago

Another workaround for this would be some sort of Windows exe hack where it forces the setups to install into a fake location without really rendering the GUI and then just grabbing the extracted files that were "installed". Users of Chocolatey might have some idea on what I am talking about. While the compression algorithms vary, the repack setups do not.

EDOIRDE commented 2 years ago

When I install the game "crysis 3" the installation stops at a certain percentage and a message pops up, which is "cls-magic2l_64x.exe a cassé de fonctionner" please help me I downloaded the game from fitgirl

skylabhalo commented 2 years ago

@EDOIRDE This definetly isn't the right place for support try asking somewhere else like reddit

serg06 commented 1 year ago

@pratikpatel8982 FreeArc link is dead, does anyone have a mirror?

korewatori commented 1 year ago

@pratikpatel8982 FreeArc link is dead, does anyone have a mirror?

FreeArc has been abandonware for some time now. the best way to download it would be through the internet archive. https://en.wikipedia.org/wiki/FreeArc https://web.archive.org/web/20161118235221/http://freearc.org/download/0.666/FreeArc-0.666-win32.exe

john-peterson commented 1 year ago

does anyone know the arguments for unarc.dll?

so far i have


typedef int(__stdcall *f_unarc)(int,int,int,int);
HINSTANCE h = LoadLibrary("unarc.dll");
f_unarc unarc = (f_unarc)GetProcAddress(h, "FreeArcExtract");
unarc(?,?,?,?);
RedSnt commented 1 year ago

@pratikpatel8982

  1. I recommend (I personally use this) using this script. It supports archives with pos discriptor error provided that they do not have a password.

Unfortunately this link is (currently) dead. Your help has been very valuable, and I feel so close to being able to extract the bin file I have from fitgirl, I'm getting the correct arc.ini data when I do arc.exe --print-config, but I'm still getting block descriptor at pos errors.

Rewarrior45 commented 1 year ago

@RedSnt hey man , let me know if you find the link

RedSnt commented 1 year ago

@RedSnt hey man , let me know if you find the link

I've only really tried https://web.archive.org/ so far, but couldn't find that particular thread there unfortunately. So still kind of lost.

Rewarrior45 commented 1 year ago

@RedSnt I don't know much about repacking . But Mini Compressor is so good

BNLOS commented 1 year ago

Hey guys nothing comes out about extracting fitgirl bins its really annoying the installer takes all my laptop's rams just for a small game