[TOOL] Metin2 File Extractor + Source

11/10/2009 15:07 Tyrar#76
Quote:
Originally Posted by lolkid2009 View Post
Theoretisch ja
Allerdings musste den code fürs entpacken zu nem coder fürs packen umschreiben und da die suzätzlich verschlüsselt sind den für entschlüsseln zu verschlüsseln soweit ich das jetzt verstanden habe.
Kannst natürlich das packen auch vom client rippen wie der Autor^^
ich glaube der client entpackt nur ;)
wär auch zu geil wenn er irgendwas packt XD
11/10/2009 16:13 GabriPr0#77
I see now... you are the best... I try to create a program to recompress py file in epk file but what IDE was used for compiling this suorce? In Dev there are error.
11/10/2009 17:30 .Alpha.#78
Hm stimmt die Patches suchen ja in den Temporär entpackten dateien nach den bytes und ersetzen sie. RTP Byte Patch wird ja verwendet.
11/15/2009 14:45 tim66613#79
So, ich hab mal nen bisschen Zeit investiert und bin zu folgendem Code gekommen:

Code:
€dit: Code removed!
Bei dem Verschlüsselungsalgorithmus handelt es sich um eine modifizierte Version des XTEA algorithmus.

(PS: Compression auch geknackt, werd code nacher posten + sample app)

MfG Tim66
11/17/2009 14:31 sunjunps#80
hi,tim66613
thanks for your code .have you use this function to decompress the epk file? i can now decrypt the eix, but can't decompress the epk as it is compressed same as LZ code.
11/18/2009 15:52 tim66613#81
@sunjunps The code I've posted above has nothing to do with archive decompression.
11/19/2009 13:46 sunjunps#82
@tim66613
I have try to use below code to decrypt the eix every 8 bytes, but i have no idea to encrypt again. I think you maybe found some way to extract epk and repack the file to epk.

Code:
Dim d As UInteger = Convert.ToInt32(ta.Text.Substring(0, 8), 16)
        Dim c As UInteger = Convert.ToInt32(ta.Text.Substring(8, 8), 16)

        'For eix
        Dim mtKey() As Byte = New Byte() {&HB9, &H9E, &HB0, &H2, &H6F, &H69, &H81, &H5, &H63, &H98, &H9B, &H28, &H79, &H18, &H1A, &H0, _
                                          &H22, &HB8, &HB4, &H4, &H64, &HB2, &H6E, &H1F, &HAE, &HEA, &H18, &H0, &HA6, &HF6, &HFB, &H1C}
        'For item_proto
        Dim mtKey3() As Byte = New Byte() {&HA1, &HA4, &H2, &H0, &HAA, &H15, &H54, &H4, &HE7, &H8B, &H5A, &H18, &HAB, &HD6, &HAA, &H1}

        '解Item_Proto的Key  A1 A4 02 00 AA 15 54 04 E7 8B 5A 18 AB D6 AA 01
        '所有KEY
        'B9 9E B0 02 6F 69 81 05 63 98 9B 28 79 18 1A 00 
        '22 B8 B4 04 64 B2 6E 1F AE EA 18 00 A6 F6 FB 1C
        'A1 A4 02 00 AA 15 54 04 E7 8B 5A 18 AB D6 AA 01



        Dim a As UInteger = &HC6EF3720
        Dim b As UInteger, p As UInteger


        For i As Integer = 0 To 31
            c = c - ((((d >> 5) Xor (d << 4)) + d) Xor (BitConverter.ToUInt32(mtKey3, ((a >> &HB) And 3) * 4) + a))
            a = a + &H61C88647

            d = d - ((((c >> 5) Xor (c << 4)) + c) Xor (BitConverter.ToUInt32(mtKey3, (a And 3) * 4) + a))

        Next
11/20/2009 19:18 tim66613#83
If you want to encrypt it again you only need to call the LZObject::LZEncryptFile method.

Sample Code:
Code:
	const char* sampleData = "Hello World!";
	uint8_t* cryptedBuffer = new uint8_t[1024];
	uint8_t* unencryptedBuffer = new uint8_t[1024];

	uint32_t cryptedSize = LZObject::LZEncryptFile((unsigned long*)cryptedBuffer, (unsigned long*)sampleData, LZObject::EPK_KEY, strlen(sampleData));

	LZObject::LZDecryptFile((unsigned long*)unencryptedBuffer, (unsigned long*)cryptedBuffer, LZObject::EPK_KEY, cryptedSize);

	printf("Is Ok = %s\n", (const char*)unencryptedBuffer);
11/26/2009 09:42 dawid2333#84
Wir freuen uns auf repacker. Dank sehr pushedx.
Außerdem befasst sich mit der Programmierung, aber bis ich lernen.


We look forward to repacker. Thanks very pushedx. In addition, deals with the programming, but until I learn.
11/26/2009 16:09 StreetX128#85
Ich sag nur eins kak programm
12/02/2009 22:16 Shannou06#86
thx, usefull
12/02/2009 23:33 тrαder#87
Das Prog ist mit C++ geschrieben
Nice And thx
12/12/2009 10:04 fertinig#88
wenn ich das ganze mit ner batch starte kommt die meldung: excetion occured!

Permission denied usw

Filename: Source/atlasinfo.txt

gibts dafür schon ne lösung?
12/25/2009 12:52 .::Reaper::.#89
Moin

Mir ist soebend aufgefallen, dass das bei der DE Client 2007 nicht so wirklich geht.

Ich habe das ganze bei Korea und Multiclient ausprobiert ud es klappte einwandfrei.
Doch bei der DE ändert sich garnichts. Laut Extractor wurde erfolgreich entpackt. Doch das ist nciht der Fall. Es ist keinerlei neue Datein da. Nur halt diese standart metin2 datein.

Kann da evtl jemand weiterhelfen oder sogar den bereits den entpackten Client hochladen? Währe echt super.

Gruß
MatriX44
12/29/2009 17:39 Chudy223#90
pls Video Tutorial :)