DXExtract

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

DXExtract is a general DX archive extractor that is generated by DXLibrary if developers choose to do so.

All DX archives follow the same format, except they may have a unique 12-byte encryption key. The purpose of this program is to allow users to maintain a keystore that the program will use to automatically try each key and attempt to decrypt the archive.

If a game is unsupported but you think it is a DX archive, users can try to figure out the key and update the keystore.

Supported Games

*These games are R18+

Preview

DXExtract Preview

Download

DXExtract

Requirements

.NET Framework 2.0 or above

Usage

The program runs in two modes: window-mode and command-line mode.

Window Mode

To start the program in window-mode, double-click on it or launch the program in command-line without any arguments. The following operations are available:

  • Open archive – drag and drop an archive over the program to try to load an archive
  • Export archive – dump the contents of the archive out
  • Save archive – saves a decrypted version of the archive

If you right-click a file in the navigator panel, you can choose to export just that file. If you right-click a folder, you can export the folder and all files within that folder.

Command-line Mode

You can unpack files directly using command-line by specifying the path to the archive as an argument:

DXExtract.exe yourArchive.dxa

This will unpack the contents in the same directory as the archive.

Note that because of this design, you can literally copy the executable onto your desktop and drop archives over it to unpack them.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

49 Responses

  1. Iceflare says:

    I’d like to replace some images in 楽園魔城リピュアリア (Magic Castle RePure Aria)(Key: 55AA2055550655AA55D57C66 ), but I have no idea how to do it. I even downloaded DXArchive, but when I try to use DxEncode or DxDecode the command prompt pops up and disappears again.

    I even tried to go to the directory via manual command prompt, but when I type in DxaEncode.exe it just gives me some gibberish (because my cmd doesn’t support kanji and even if it did I wouldn’t be able to read a single word). I also tried putting the readme into google translate and it only says:
    “1. Drag and drop the folder you want to put the contents into DxaEncode.exe
    2. A DX archive file with the same name as the folder name is created with the extension dxa
    3. Since the DX library regards the DX archive file as a folder, for example”

    Anyone here with a clue how I can put unpacked images back into the archive?

    • Iceflare says:

      Well… I found out how to encrypt and decrypt those dxa files with DxaEncode and DxaDecode now, but it doesn’t work as supposed. When I have a folder, then type in “DxaEncode.exe -K:55AA2055550655AA55D57C66 NameOfMyFolder” it does create a dxa file, but when I try to look at it with DXE that dxa archive is empty. I also tried using the key steveju posted (DxaDecode.exe -K:8P@(rO!p;s5 NameOfMyFolder), but the images still can’t be seen in DXE. What am I doing wrong :/ ?

      • h-sensei says:

        First i want to say Thank you to Steveju, love your work !

        I had the same problem and i got it working somehow. I can’t be sure if it will work for you but i can tell you exactly how i did it.

        I’ll include all the steps, I’m pretty sure you mostly know all this stuff. I want to make it easy as possible if other people might have the same issue.

        Since my post is getting pretty long there is a summary at the end, if you don’t need the whole explanation. Also I’m not a native English speaker, sorry in advance about all my mistakes

        So first i went on this page [http://www.ulmf.org/bbs/showthread.php?t=30720][1]

        You have to create an account and download DxaDecodeDEC, DxaEncodeDEC.zip and tool.zip

        Then you have to switch your non-Unicode language to Japanese here how you do it :

        In search tab type “Region” and press enter.
        In new window select “Administrative”
        then click on “change system locale”
        Select Japanese.

        After this search for cmd in the start menu, right click on it and select run as admin. You need to change for the drive you have the files you want to unpack, you can type the letter of your drive with this after ( : ) so for example its on the D drive i’ll type D: . Then go on the folder your files are in an copy the hole directory and paste it in Command prompt, for example : D:\Game\Test.

        Once you got it in the right directory open tool.jar, in encode string you want to put 8P@(rO!p;s58 , click encode and then decode you want to copy the decoded string in decimals (DxaDecodeDEC). It might be a different number but you should get this number 56 80 64 40 114 79 33 112 59 115 53 56 . Now type in command prompt DxaDecodeDEC the number you got and the name of the file. For example :
        DxaDecodeDEC 56 80 64 40 114 79 33 112 59 115 53 56 nameofmyfile.wolf . It should create a file with the same name and you should get the unpacked files.

        Quick summary for people that don’t need all those info

        Download DxaDecodeDEC, DxaEncodeDEC.zip and tool.zip here: [http://www.ulmf.org/bbs/showthread.php?t=30720][1]
        Change your non-Unicode settings to japanese
        Run Cmd as admin, go to the directory that your files are in Cmd
        Type DxaDecodeDEC 56 80 64 40 114 79 33 112 59 115 53 56 nameofmyfile.wolf

        And then enjoy !

    • Anonymous says:

      In Repure Aria and the later RimuRimu Paradise, extract using DXExtract and rename or delete the original DXA files so the game won’t find them. The game will just use the extracted data. Then you can simply modify the files in-place.

  2. styx says:

    Thanks a lot!

  3. steveju says:

    DxaDecode.exe -K:8P@(rO!p;s5 archive

    You’re welcome :3

    • steveju says:

      For them new Wolf RPG titles. DxaDecode is found inside DX Library.

      All that was needed is the hex key someone provided here, then reversing the encryption and bruteforcing it back to some sort of writeable ascii since the key encryption/decryption hasn’t changed in v1.06 archives, only the way they are decrypted/read with the correct key.

      • Hime says:

        Thanks for sharing. I wasn't aware the author of DXLib already provided stand-alone tools for unpacking. Feels kind of silly for me to have put together this tool that doesn't even do repacking and also doesn't support new versions beyond v4.

        • steveju says:

          Your tool is a lot better than the one that comes with DX Lib, as yours allows us to see the file list. Another good point is that the DxaDecode/Encode tools don’t accept non-ascii characters as input like your tool does, so they’re not nearly as useful as you think. That key just happened to work with the DX Lib tools, but that’s usually not the case. You should definitely update DXExtract (see Tool\DXArchive\Source for the source code for key encryption/usage).

          • Hime says:

            I will update the tool to support the extraction of v5/v6 archives.

            The source code for packing an archive is also available, but I won’t do that part, since the packer is already available and it’s beyond the original scope of the tool, which was to simply extract assets.

            The non-ASCII keys sounds like a problem for those that want to use it for re-packing. I will also update the tool to display the “original” key (alongside the 12-byte key that is used, since that’s pretty much how I’ve been guessing the key) so that people can copy-paste it or something. Or of course, just put it in the key-store file. Any thoughts there?

          • Anon says:

            Hime, make the tool deduce the decryption key of v5/v6 archives while you’re at it. uint64 values in the header have enough null bytes which, when encrypted, give out the key as it is and then have some more repetitions to verify that it’s indeed correct. In Python syntax:

            if (header[0xC:0x10] == header[0x24:0x28]) and (header[0x14:0x18] == header[0x2C:0x30]) and (header[0x1E:0x20] == header[0x2A:0x2C]):

            key = header[0xC:0x10] + header[0x1C:0x20] + header[0x14:0x18]

          • steveju says:

            Showing the original key is fine. Deducing/guessing (or even bruteforcing) the key to the archive, if it’s not already known, sounds like a nice feature to implement too.

          • Anonymous says:

            Hime, you don’t have to bother with packing when DxaEncode.exe and Wolf RPG already do it on their own. Just implement reencryption of their output with a user-supplied key since in our case (byte-wise XOR) decryption and encryption are the same anyway. And allow null key to decrypt the archive without extracting it, it’s a valid key too, technically speaking.

          • steveju says:

            There is no null key.
            if( Source == NULL ) memset( Key, 0xaaaaaaaa, DXA_KEYSTR_LENGTH )
            Which is the same as 55AA2055550655AA55D57C66 楽園魔城リピュアリア

  4. Anarcho says:

    It worked for Repurearia, arigatou!

  5. Vxlle says:

    Hey! Could someone help me decrypting the game Numina from starlit? Please!

  6. Anonymous says:

    Hey if you need more .wolfs for decryption testing here is one from トレジャーハンタークレア~精液を集める冒険家~. It uses the new Wolf RPG encryption so DXExtract doesn’t work on it 🙁 https://mega.nz/#!ooFCGRjK!FI5aaFre8XA6tX_9Jd-tn0jXWjN-6f86bPBidnm0YAY

  7. Anonymous says:

    92F6E4686FCE9032CA1E00A3 Moekuri-Moékuri-1.1.8.9

  8. loveroftehwomens says:

    hello it just says parsing forever game is Moekuri I want to make a mod for this game for others to enjoy. ty for your time as this was the only way I could find to accomplish this task.
    i’ve tried every key inside of keys.ini

    8E57E31998CD9253831E60AF ウワサの宿娘
    F0356B1CFB9BED1D0370E32D Wolf RPG Editor
    8607E9B9CE9ECEB9994E41BC Gensokyo Shiki
    9DF6E8099CC39999914DF0A3 Touhou Labyrinth ~ Special Disk
    55AA2055550655AA55D57C66 楽園魔城リピュアリア
    FFFFFFFFFFFFFFFFFFFFFFFF [Xi] ハイプリアドベンチャー
    9637EF2996D59E52AB0C91A8 Rosenkreuzstilette Freudenstachel
    9DF6E5C88BCE90129B0BF0A3 [Xi] Viocide ~Vore Side Action RPG~
    AD14C4698CEBB077923E32A5 Touhou Labyrinth 2
    760F1A237D5C730C94124E3C Prelude
    B39DA084D737531FF1081880 セックスアイドル48!
    8C57E9C98ACE8A919B0AE0AF [るしまる堂] エロイーター
    CE43C8DC096DA5FECE43BDDC 虚夢の乙女

    • Dogoo says:

      Try adding this to keys.ini – 92F6E4689EC19032CB1E00A – Moekuri

      • Dogoo says:

        Edit: wrong hex code, my mistake, I forgot what I had on the clipboard. Here is the working one for my game – 92F6E4689EC19032CB1E00A3

        • loveroftehwomens says:

          Thank you for the response I really appreciate it. Unfortunately it still just says parsing… at the bottom. I’ve tried to open bmp.dxa, cha.dxa, etc.dxa, basically ANY of the .dxa files. Also when I run it as a command line it doesn’t give me any input just flashes and nothing happens. I’m on Windows 10. My file creation date for these files is from December 17th so I don’t know if that would make a difference for the key. I’m also using japanese locale and running as administrator and it doesn’t matter how large or small the file is it just says Parsing… for a very long time and nothing appears to ever populate in the window.

          • Dogoo says:

            I had it working in the international version V1.00 of the game, I guess you have a newer version of the game and the dev’s are changing the key every time a new update is released, so if you find the key now, you may have to do it all over again when the next update to the game arrives.

            There is a way to find the key if you can read hex, use HxD or Mad Edit and know how to use ollydbg regardless of version.

            Open \Moekuri\Data\etc.dxa directly in a hex editor and try 12 byte long strings starting from offset 00000000 to see if they are the decryption key. (May not be etc.dxa but I’d guess its your best bet for a start clue, the ollydbg method is best for finding the correct file that should hold the correct decryption string.)

            or if have to open the game to dump the key then:

            Attach the running process to ollydbg then go to View -> Handles, then find a open file like \Moekuri\Data\Dat.dxa or \Moekuri\Data\etc.dxa and right click to view the Hex code, if it shows viewable hex code, dump the file to your desktop as a .bin file.

            After dumping the file or files, open it in a program like Mad Edit or HxD and try adding the 12 byte string hex code to keys.ini saving it and repeating until you find the correct string. Remember always start from Offset 00000000.

            I’ve uploaded 2 images of a decrypted version of the International version V1.00 of Moekuri – https://imgur.com/a/gVXq0

            Hopefully I’ve given enough info to help you find the key, it will take a while but you will find it, I won’t be of more help as I didn’t like the game so I won’t be updating it.

            Good luck with your mod and I hope find the key.

        • Tnyx says:

          excuse me, the code is working but how to compress the archive back from extracted file?

  9. Dogoo says:

    Just decrypted Touhoumon Ynk (Shard Of Dreams) and tested opening all the arc files in \dat and it worked.

    The decryption key is – 9B16FE3A98C2A0730B0BB590

  10. Crasharthur says:

    Very interesting, i tried in Mad Father and worked. However the new Mad Father on Steam doesn’t seen to work.
    Any tips that i can do to extract the pictures from there? I want so much the pictures

    • Crasharthur says:

      Answering myself. I know now, the new version of Wolf RPG Editor uses a different decryption. Anyone know the key?

      • Hime says:

        Now I remember. Their archives used to be v3. Now it’s v4. Send a sample (mega or mediafire preferred)

          • Hime says:

            This is a bit interesting. The original algorithm uses a 12-byte key for decryption.

            If we assume the key is broken down into 3 groups of 4 bytes, it looks something like this: AAAA BBBB CCCC

            Now, If I were to apply that to the file and XOR each byte, the header comes out properly, and some files here and there look fine.

            However, if I re-arrange the key to this CCCC AAAA BBBB, suddenly, some other files here and there look fine, and the file entry table appears as well.

            At the very top (after partial decryption), it says it is DX format 6. My tool was written based on format 3, so it is apparent that some things have changed.

            Will need to figure out how the new format works.

          • Hime says:

            Looking a bit closer, we aren’t simply re-arranging them like

            AAAA BBBB CCCC CCCC AAAA BBBB

            Sometimes it’s doing things like this

            CCAA AABB BBCC

            Wondering how it determines when to “shift” the bytes around.

            It may be necessary to treat it as 6 pairs of 2 bytes.

            AA BB CC DD EE FF

            And then from there, shift each one over based on some pattern.

          • Hime says:

            Instead of 32-bit integers, it uses 64-bit integers now. I guess to provide support for archives larger than 2 GB. The overall format has not changed; it’s just the way the data is encrypted that’s a bit weird.

            http://imgur.com/a/UgZ4R

            File table has been parsed. Just need to properly decrypt the data.

          • Crasharthur says:

            Sounds complicate. Are you going to update the Tool anytime soon?

    • Hime says:

      This tool extracts archives that are encrypted using some algorithm that I don’t know.
      I have seen other extractors where the authors have reverse engineered the encryption algorithm, and will attempt to decrypt the archive automatically.

      My tool requires users to supply the decryption key (stored in keys.ini).
      The new Mad Father game may be using a different decryption key, or it may be using a different encryption algorithm, or a completely different archive format.

      If you can provide a sample of the archive you are having trouble with I could take a look. No guarantees though.

      • Anon says:

        9596F8098BDF8A922B1540BE Rosenkreuzstilette

        Also, B39DA084D737531FF1081880 should be renamed to “Wolf RPG Editor v2.10”

        DXv6 archives are created by Wolf RPG Editor v2.20 beta which is available here:
        silsec.sakura.ne.jp/WolfRPGEditor/BBS/BBS_patio.cgi?mode=view2&f=103&no=19

        Transition to uint64 values allows reconstruction of the key from the header (there are enough null bytes) and the last 12 bytes of the file (which are all 0 except one 0x40 byte).
        All files are encrypted with the same key rotated bytewise per file, and the method of rotation can be found from the exe linked above.

        Please update the tool to support DXv6 archives.

        • Anon says:

          C705CA7D8DE3DEF1D90C85F4 Wolf RPG Editor v2.20 beta
          This is the base key used to decrypt the header (first 48 bytes of DXv6 archive). All files and the table of content at the end of the archive are encrypted using variations of this base key, 12 in total (including the key itself), 1 per file and TOC. I forgot to add it to the previous message.

  11. Anon says:

    keys.ini
    95F6EBA9B9EDBDB70B1980A3 Dungeon Town / ダンジョンタウン ~遺跡の森と夢魔の薬~

  12. Aki says:

    hopefully you can expand the program performance to others like RPG, since i mostly play the RPG games, and i want to extract the picture from them

  13. G.W. says:

    download links are down, you should upload them to a better file host site like mega upload or media fire.

  14. Anonymous says:

    Same – Error (429)
    Now I’m sad.

  15. Anonymous says:

    Error (429)
    This account’s links are generating too much traffic and have been temporarily disabled!

  16. mikel says:

    what happen to the download link

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax