(Unsupported) [KS20] Tool. DZDecrypt v1.0b *alpha release* [10-03-29].

Search This thread

copsfrance

Senior Member
Mar 13, 2008
68
58
Hello guys...

Here is my DZ file decryptor and extractor.
I found DZExtract v0.2 (from jp) too long to extract and needing too many things (NetFramework, zlib dynamic library, ...).
This one is coded in asm with a custom zlib static lib integrated and MD5 hash (from Roy/Fleur).
Hope it will be usefull for any (source code is available if someone is interested).

CUL8R...

Voici mon décrypteur-extracteur de fichier DZ.
Je trouvais DZExtract v0.2 (de jp) trop long à extraire et nécessitant trop d'éléments (NetFramework, zlib dll, ...).
Celui-ci est codé en assembleur avec une dll statique zLib personnalisée intégrée et la fonction de hash MD5 (basée sur celle de Roy/Fleur).
J'espère qu'il sera utile à quelqu'un (le code source en masm est mis à disposition si cela intéresse quelqu'un).

Laurent aka BIGBOSS from COPS...


History
-------

  • 17 Sep 2012 - No more support
    - I'm sorry to inform you that my good OLD KS20 died, so i'm now unable to continue these projects (DzDecrypter and DzCreator).

  • 29 Mar 2010 - Version 1.0b *Alpha*
    - Now memory handled in ini file. / Maintenant, la mémoire est gérée dans un fichier ini.
    - Display some informations for DzCreator. / Affiche quelques informations pour DzCreator.
    - Version alpha seems stable, so sources are provided. / Les sources sont de nouveau fournis car la version semble stable.

  • 18 Mar 2010 - Version 1.0 *Alpha*
    - Sorry for this "late" update. / Désolé pour cette mise à jour tardive.
    - No source this time, want to be sure it works correctly. / Pas de source cette fois, j'attend d'être sur que cela fonctionne correctement.
    - Temporary memory buffer changed to 250Mo / Mémoire du buffer temporaire passée à 250Mo
    - Splitted file joiner (may be buggy!) / Jonction des fichiers splittés (peut bugger!)
    - If splitted file joiner is bugging, let me know./ S'il y a un probleme sur la jonction des fichiers splittés, faites le moi savoir.
    - Working on updating DzCreate for splitting / Je travaille sur DzCreate pour le splitting.

  • 22 Dec 2009 - Version 0.5
    - Temporary memory buffer changed to 160Mo / Mémoire du buffer temporaire passée à 160Mo
    - Thanx to Homero2 to send me BL40 and GM750 DZs / Merci à Homero2 pour les DZ de BL40 et GM750
    - Extraction is correct on these DZs / L'extraction se fait correctement sur ces fichiers
    - I will soon release a DzCreate upgrade, because is seems that unpacked subfiles having a size greater than 160Mo are splitted in files of 160 Mo. I'm explaining: In BL40 Dz, i've got 2 files "cefs_Modem.bin_0" and "cefs_Modem.bin_1" which , I think once merged, are just one file named "cefs_Modem.bin". -> To be checked because it's the first file i have a such case, so i haven't include a merger in the decryptor this time.
    - Je vais bientot réaliser une mise à jour du DzCreate, car il semble que les sous-fichiers ayant une taille décompressée supérieure à 160Mo soient séparés en fichiers de 160 Mo. Je m'explique: Dans le DZ du BL40, j'ai 2 fichiers nommés "cefs_Modem.bin_0" et "cefs_Modem.bin_1" qui, je pense, une fois concatenés, font un seul et même fichier nommé "cefs_Modem.bin". -> A vérifier car c'est la première fois que j'ai ce cas, donc, je n'ai pas inclu de code pour concaténer les fichiers.

  • 26 Jan 2009 - Version 0.4
    - Corrected a bug in MD5 hash prototype (forgot "popad") / Bug sur la fonction de hash MD5 (oubli du "popad")
    - Small MemCmp prototype update / Petite modification sur la fonction MemCmp
    - May be the final release ?/ Peut-être la version finale ?

  • 22 Jan 2009 - Version 0.3
    - Completed more DZ header structure. / - Structure de l'entete DZ complétée
    - Corrected a bug if Main header was invalid / Bug sur entete invalide corrigé
    - Completed header informations / Informations sur l'entête complétée
    - Custom wsprintf prototype / Fonction wsprinf personnalisée

  • 09 Dec 2008 - Version 0.2
    - Command line driven / - Mode ligne de commande
    - Switches added / Paramètres ajoutés
    - MD5 hash check on subheader and mainheader / Vérification hash MD5 sur entête principale et sous-fichiers

  • 02 Dec 2008 - Version 0.1
    - GUI Interface only / Interface graphique seulement
    - Initial release / Version initiale
 

Attachments

  • DZDecrypter_v0.2.zip
    71.8 KB · Views: 5,347
  • DZDecrypter_v0.3.zip
    74.2 KB · Views: 785
  • DZDecrypter_v0.4.zip
    74.2 KB · Views: 945
  • DZDecrypter_v0.5.zip
    74.3 KB · Views: 3,718
  • DZDecrypter_v1.0alpha.zip
    21.7 KB · Views: 1,796
  • DZDecryptor_v1.0b.zip
    77.2 KB · Views: 27,327
Last edited:

rickou26

Senior Member
Dec 26, 2007
752
55
Thank you for this new tool which comes to complete the range of the KS20 cookers.

Merci pour ce nouvel outil, qui semble bien fonctionner et qu'il est vrai est très rapide ;-)

@+
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Thank you for this new tool which comes to complete the range of the KS20 cookers.

Merci pour ce nouvel outil, qui semble bien fonctionner et qu'il est vrai est très rapide ;-)

@+
Thank for greetings... I'm working on a next release with use of partition table (last DZ subfile section) and MD5 subfile header check.
Perhaps a DZ file creator...

Merci pour le remerciement. Je travaille sur une nouvelle version avec utilisation de la table de partition (dernière section du fichier DZ) et une vérification du MD5 du header dl l'entête du sous-fichier dans le DZ.
Peut être également un créateur de fichier DZ...
(un peu de français; car je suis français avant tout, héhé)

can u explain how to use it?
This one is working like DZExtract (extract a DZ file content), but with a graphical interface. It is faster because it is full asm coded.

Ce programme fonctionne comme DZExtract (extrait le contenu d'un fichier DZ), mais il est en interface graphique. Il est plus rapide car il est codé complètement en assembleur.
 
Last edited:

copsfrance

Senior Member
Mar 13, 2008
68
58
Soon coming v0.2 / Arrivée imminente de la v0.2

Yohoo...
A few day after the first release, DZDecryptor v0.2 will be available in a few days.

Code:
[FONT="Courier New"]Main improvements:
------------------
 * Command line driven (no more GUI, mainly for ROM Kitchen)
 * Check all : - Section "flags" (magic bytes)
               - Section checksum (MD5 hashed)
 * Process is starting from the offset table of DZ file.[/FONT]

Quelques jours seulement après la première version, DZDecryptor v0.2 sera disponible sous peu.

Code:
[FONT="Courier New"]Principales améliorations:
------------------
 * Gestion en ligne de commande (plus d'interface graphique pour la cuisine)
 * Vérifie tout : - "flags" des différentes sections (bytes magiques)
                   - Checksum des sections (hash MD5)
 * Tout le processus commence à partir de la table des offsets du fichier DZ.[/FONT]
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Version 0.2 command-line

Here it is...

DZDecrypt v0.2 (command-line driven) is here, and available to download in the first post...
As promised, the full asm source is provided in the archive.
All *bug reports* or *ideas* are welcome...

Code:
What's New:
-----------
- Command line driven.
- Some switches added. (just type DZDecrypt to see all available options)

La voila...
DZDecrypt v0.2 (dirigé en ligne de commande) est arrivé, et est disponible en téléchargement dans le premier message.
Comme promis, les sources en masm32 sont inclus dans l'archive.
Tous les *rapports de bugs" et les *idées* pour l'amélioration sont les bienvenus.
Code:
What's New:
-----------
- Mode ligne de commande.
- Quelques paramètres ajoutés. (Taper DZDecrypt pour la liste des paramètres disponibles)

Si tu peux me donner ton avis Spocky et Rickou26...
 
Last edited:

ceckin

Member
Nov 29, 2008
15
0
Can you really decrypt the DZ file (cause amss.mbn is kind of encrypted in all DZ files), anyway it works fine on Vista x64, a bit slower for me than DZExtract, but i guess the problem its not in the code.
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Can you really decrypt the DZ file (cause amss.mbn is kind of encrypted in all DZ files), anyway it works fine on Vista x64, a bit slower for me than DZExtract, but i guess the problem its not in the code.

I'm proud to know that it works on Vista x64 (I always use XP SP3, because I think that it is more stable... Perhaps Windows 7 will be better ?).

I'm susprised that it was a bit slower than DZExtract, because unlike DZExtract, I don't use a small buffer (4Ko if i remember right) for zLib decompression. In my decryptor (perhaps should i say extractor), I allocate memory for full zlib compressed one, a 100 Mo buffer (hope it will be enough...) for decompression, i integrate zlib decompression engine with no need of zlib1.dll. Also, I think that assembler is faster than NetFramework.

May be i can speedup it a little ? (I will check cycles when i will have more time, because i am working on the lghflashmuncher assembly conversion..)
 

ceckin

Member
Nov 29, 2008
15
0
I'm proud to know that it works on Vista x64 (I always use XP SP3, because I think that it is more stable... Perhaps Windows 7 will be better ?).

I'm susprised that it was a bit slower than DZExtract, because unlike DZExtract, I don't use a small buffer (4Ko if i remember right) for zLib decompression. In my decryptor (perhaps should i say extractor), I allocate memory for full zlib compressed one, a 100 Mo buffer (hope it will be enough...) for decompression, i integrate zlib decompression engine with no need of zlib1.dll. Also, I think that assembler is faster than NetFramework.

May be i can speedup it a little ? (I will check cycles when i will have more time, because i am working on the lghflashmuncher assembly conversion..)

Well maybe it problem in Vista itself, cause everything releated to writing to the HDD is slower (don't get me wrong the HDD is fast), hopefully you'll be able to write a DZ creator, good luck.
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Version 0.3 is available (may be final release)

The version 0.3 is available. See first post for more informations and download.

La version 0.3 est disponible. Voir le premier message pour des informations et le téléchargement.
 
Last edited:

copsfrance

Senior Member
Mar 13, 2008
68
58
An WIP DZCreator / Un créateur de DZ en cours

Yeah... I've found the correct parameters to add in the deflateInit2_ function of zLib algorithm to pack mbn files like they are stored in a dz-file...
(level, method, memLevel and strategy were default, the hardest to find was windowBits value)
Watch out for a preversion of DZCreator soon...

Ca y est... J'ai trouver les paramètres corrects à placer dans la fonction deflateInit2_ de l'algorithme zLib pour compresser les fichiers mbn de la même façon qu'ils sont stockés dans un fichier dz...
(level, method, memLevel et strategy sont les valeurs par défaut. Le plus dur à trouver a été la valeur de windowBits)
Attendez-vous bientôt à une préversion d'un DZCreator...
 

rickou26

Senior Member
Dec 26, 2007
752
55
Super cool :D

Merci copsfrance pour ton précieux travail.
J'attends avec impatience le fruit de ton travail.

@+
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Version 0.4 *** Final Release ***

The version 0.4 is available. Mainly a bugfix on MD5 hash prototype. See first post for more informations and download.

La version 0.4 est disponible. Principalement une correction sur la fonction de hash MD5. Voir le premier message pour plus d'informations et le téléchargement.
 

ceckin

Member
Nov 29, 2008
15
0
The version 0.4 is available. Mainly a bugfix on MD5 hash prototype. See first post for more informations and download.

La version 0.4 est disponible. Principalement une correction sur la fonction de hash MD5. Voir le premier message pour plus d'informations et le téléchargement.

Nice improvements now its really the fastest DZ decrypter, and just informative is there an unknown fields left in the .dz format?
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Nice improvements now its really the fastest DZ decrypter, and just informative is there an unknown fields left in the .dz format?

All fields are known in MainHeader. In the SubHeader, there is just the dword at offset 004h that meaning is unknown (is it DZ Version or encryption flag).
For more informations on DZ format, just refer to this page.
 

jay_t69

New member
May 19, 2009
3
0
Extract Media + Module bin files u990

Thanks for an excellent tool.

I have successfully extracted files from H3G branded DZ files without problem.

The problem I have now is I would like to extract and re-build the Media and Module bin files. It can be done with LG_KU990_EFSTOOL_By_Yoshihiro_RC2 but only for KU990(non H3G baranded) and not U990(H3G branded), Does anybody know of a tool/s which can do this as I want to create u990 custom firmwares (versions 10b + 10d for uk which are not available for uk cutomers ATM).

Any help would be much appreciated

jay_t69
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Hello jay_t69,

I don't own a U990.
I think, the only way to get this, is to extract media and modules files from another v10d firmwares of U990 with DZDecrypt and to include it in your U990 firmware with DZCreate (support for U990) (respect brand if possible).

For informations, I don't think there are modules/media file extractor, but i don't own a KU990/U990. So I can make a mistake.

Laurent aka BIGBOSS from COPs...
The problem I have now is I would like to extract and re-build the Media and Module bin files. It can be done with LG_KU990_EFSTOOL_By_Yoshihiro_RC2 but only for KU990(non H3G baranded) and not U990(H3G branded), Does anybody know of a tool/s which can do this as I want to create u990 custom firmwares (versions 10b + 10d for uk which are not available for uk cutomers ATM).

Any help would be much appreciated

jay_t69
 

jay_t69

New member
May 19, 2009
3
0
Thanks for your reply. There are things in the media files which need to be changed to get them working for uk. The hunt continues....
Hello jay_t69,

I don't own a U990.
I think, the only way to get this, is to extract media and modules files from another v10d firmwares of U990 with DZDecrypt and to include it in your U990 firmware with DZCreate (support for U990) (respect brand if possible).

For informations, I don't think there are modules/media file extractor, but i don't own a KU990/U990. So I can make a mistake.

Laurent aka BIGBOSS from COPs...
 

copsfrance

Senior Member
Mar 13, 2008
68
58
Soon a version 0.5

Hello...

There are some problems while extracting some DZ firmwares...

Up to now, just Spookymulder62 reports me a file that failed on extraction (GM730 phone model).

The functionnality for this model has been corrected now...

Waiting for more tests before uploading this *new* release...

Laurent aka BIGBOSS from COPs...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Hello guys...

    Here is my DZ file decryptor and extractor.
    I found DZExtract v0.2 (from jp) too long to extract and needing too many things (NetFramework, zlib dynamic library, ...).
    This one is coded in asm with a custom zlib static lib integrated and MD5 hash (from Roy/Fleur).
    Hope it will be usefull for any (source code is available if someone is interested).

    CUL8R...

    Voici mon décrypteur-extracteur de fichier DZ.
    Je trouvais DZExtract v0.2 (de jp) trop long à extraire et nécessitant trop d'éléments (NetFramework, zlib dll, ...).
    Celui-ci est codé en assembleur avec une dll statique zLib personnalisée intégrée et la fonction de hash MD5 (basée sur celle de Roy/Fleur).
    J'espère qu'il sera utile à quelqu'un (le code source en masm est mis à disposition si cela intéresse quelqu'un).

    Laurent aka BIGBOSS from COPS...


    History
    -------

    • 17 Sep 2012 - No more support
      - I'm sorry to inform you that my good OLD KS20 died, so i'm now unable to continue these projects (DzDecrypter and DzCreator).

    • 29 Mar 2010 - Version 1.0b *Alpha*
      - Now memory handled in ini file. / Maintenant, la mémoire est gérée dans un fichier ini.
      - Display some informations for DzCreator. / Affiche quelques informations pour DzCreator.
      - Version alpha seems stable, so sources are provided. / Les sources sont de nouveau fournis car la version semble stable.

    • 18 Mar 2010 - Version 1.0 *Alpha*
      - Sorry for this "late" update. / Désolé pour cette mise à jour tardive.
      - No source this time, want to be sure it works correctly. / Pas de source cette fois, j'attend d'être sur que cela fonctionne correctement.
      - Temporary memory buffer changed to 250Mo / Mémoire du buffer temporaire passée à 250Mo
      - Splitted file joiner (may be buggy!) / Jonction des fichiers splittés (peut bugger!)
      - If splitted file joiner is bugging, let me know./ S'il y a un probleme sur la jonction des fichiers splittés, faites le moi savoir.
      - Working on updating DzCreate for splitting / Je travaille sur DzCreate pour le splitting.

    • 22 Dec 2009 - Version 0.5
      - Temporary memory buffer changed to 160Mo / Mémoire du buffer temporaire passée à 160Mo
      - Thanx to Homero2 to send me BL40 and GM750 DZs / Merci à Homero2 pour les DZ de BL40 et GM750
      - Extraction is correct on these DZs / L'extraction se fait correctement sur ces fichiers
      - I will soon release a DzCreate upgrade, because is seems that unpacked subfiles having a size greater than 160Mo are splitted in files of 160 Mo. I'm explaining: In BL40 Dz, i've got 2 files "cefs_Modem.bin_0" and "cefs_Modem.bin_1" which , I think once merged, are just one file named "cefs_Modem.bin". -> To be checked because it's the first file i have a such case, so i haven't include a merger in the decryptor this time.
      - Je vais bientot réaliser une mise à jour du DzCreate, car il semble que les sous-fichiers ayant une taille décompressée supérieure à 160Mo soient séparés en fichiers de 160 Mo. Je m'explique: Dans le DZ du BL40, j'ai 2 fichiers nommés "cefs_Modem.bin_0" et "cefs_Modem.bin_1" qui, je pense, une fois concatenés, font un seul et même fichier nommé "cefs_Modem.bin". -> A vérifier car c'est la première fois que j'ai ce cas, donc, je n'ai pas inclu de code pour concaténer les fichiers.

    • 26 Jan 2009 - Version 0.4
      - Corrected a bug in MD5 hash prototype (forgot "popad") / Bug sur la fonction de hash MD5 (oubli du "popad")
      - Small MemCmp prototype update / Petite modification sur la fonction MemCmp
      - May be the final release ?/ Peut-être la version finale ?

    • 22 Jan 2009 - Version 0.3
      - Completed more DZ header structure. / - Structure de l'entete DZ complétée
      - Corrected a bug if Main header was invalid / Bug sur entete invalide corrigé
      - Completed header informations / Informations sur l'entête complétée
      - Custom wsprintf prototype / Fonction wsprinf personnalisée

    • 09 Dec 2008 - Version 0.2
      - Command line driven / - Mode ligne de commande
      - Switches added / Paramètres ajoutés
      - MD5 hash check on subheader and mainheader / Vérification hash MD5 sur entête principale et sous-fichiers

    • 02 Dec 2008 - Version 0.1
      - GUI Interface only / Interface graphique seulement
      - Initial release / Version initiale
    5
    Compiled version of previous post.
    2
    Here is patch for version 1.0b for support of subfile numbers over 20h (for example, LG P700):

    Code:
    --- D:/Devel/LG/DZDecrypt_source/DZDecrypt.org	pr mar 29 16:50:36 2010
    +++ D:/Devel/LG/DZDecrypt_source/DZDecrypt.asm	pk mar  1 20:23:24 2013
    @@ -135,8 +135,8 @@
     DZ_SUBFILE                      Struct                                         ; ### SubFile Header ###
      dzsfMagic                        DWORD               ?                        ; Magic code 1 'SSTX'
      dzsfEncryption                   DWORD               ?                        ; Encryption Flag... Seems always 001h
    - dzsfType                         DWORD               ?                        ; Type... See table below
    -                                  DWORD               ?                        ; Unknown... Seems always 000h
    + dzsfType                         DWORD               ?                        ; TypeLow... See table below
    + dzsfTypeHi                       DWORD               ?                        ; TypeHi
      dzsfPackedSize                   DWORD               ?                        ; Subfile packed size
      dzsfFilename                     TCHAR            080h dup (?)                ; Subfile name
      dzsfFiller                       DWORD            004h dup (?)                ; Filler... (filled with 0FFh)
    @@ -242,7 +242,7 @@
     stSystemTime                SYSTEMTIME       < >                               ; DZ-File     : Creation date in SYSTEMTIME format.
     stCSystemTime               C_SYSTEMTIME     < >                               ; DZ-File     : Creation date in custom SYSTEMTIME format.
     hSubFile                    HFILE              ?                               ; Sub-File    : File handle.
    -tbSubFileType               db              020h dup (?)                       ; Sub-File    : Extracted types (used for splitted files).
    +tbSubFileType               db              040h dup (?)                       ; Sub-File    : Extracted types (used for splitted files).
     stSubFileInfo               DZ_SUBFILE       < >                               ; Sub-File    : Info header.
     szSubFileName               db          MAX_PATH dup (?)                       ; Sub-File    : File name (including path).
     szExtractDir                db          MAX_PATH dup (?)                       ; Sub-File    : Directory Name for extraction.
    @@ -290,15 +290,24 @@
           .If                 bOptX == TRUE
            invoke               DZ_UnpackProcess
            xor                  eax, eax
    -       mov                  ecx, sizeof tbSubFileType
    +       mov                  ecx, sizeof tbSubFileType/2
            .Repeat
             shl                 eax, 001h
             .If               tbSubFileType[ecx] == TRUE
              inc                eax
             .EndIf
            .UntilCXZ
    -       invoke               _wsprintf, offset szBuffer, CTEXT(' [ž] SubFiles: 0x%08X. (DzCreator)', 0Dh, 0Ah), eax
    +       invoke               _wsprintf, offset szBuffer, CTEXT(' [ž] SubFiles:   0x%08X. (DzCreator)', 0Dh, 0Ah), eax
            invoke               Write_Console, offset szBuffer
    +       mov                  ecx, sizeof tbSubFileType/2
    +       .Repeat
    +        shl                 eax, 001h
    +        .If               tbSubFileType[ecx+sizeof tbSubFileType/2] == TRUE
    +         inc                eax
    +        .EndIf
    +       .UntilCXZ
    +       invoke               _wsprintf, offset szBuffer, CTEXT(' [ž] SubFilesHi: 0x%08X. (DzCreator, not implemented)', 0Dh, 0Ah), eax
    +       invoke               Write_Console, offset szBuffer
           .EndIf
          .EndIf
         .EndIf
    @@ -556,7 +565,11 @@
       ; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
       mov                       ebx, func(StrRChr, offset szSubFileName, NULL, '.')
       .If                     func(lstrlen, ebx) > 004h
    -   mov                      byte ptr [ebx + 004h], 000h
    +   .If                    byte ptr [ebx + 004h] == '_'
    +    mov                      byte ptr [ebx + 004h], 000h
    +   .Else
    +    mov                      byte ptr [ebx + 005h], 000h
    +   .EndIf
       .EndIf
       mov                       ebx, [esi.DZ_OFFSETTABLE.dzotType]
       mov                       aSubFileCBuff, func(VirtualAlloc, NULL, stSubFileInfo.dzsfPackedSize, MEM_COMMIT, PAGE_READWRITE)
    1
    DzDecrypt v0.5 is here

    Hello dudes...

    Sorry for a long awaiting version, but i've not many opportunity for developping and upgrading due to my job...
    Version 0.5 is arrived (see the first posts for informations)...
    Main improvement: Changed temporary buffer size from 100Mo to 160Mo, which seems the biggest used.
    A new case is appeared in this version... Seems that unpacked subfiles with a size greater than 160Mo are splitted in parts... To be checked...

    Bonjour tout le monde...

    Désolé pour la longue attente de la nouvelle version, mais je n'ai pas beaucoup le temps de développer depuis quelques temps à cause de mon travail...
    La version 0.5 est arrivée (voir le premier message pour plus d'informations)...
    Amélioration principale: La taille du buffer temporaire est passée de 100Mo à 160Mo, qui semble la taille maximale utilisée.
    Un nouveau cas est apparu dans cette version... Il semble que les sous-fichiers décompressés ayant une taille supérieure à 160 Mo sont séparés en morceaux de 160Mo... A vérifier...