Howdy-do e*pvpers,
I bring to you one diff file for two binaries.
I disabled the fourcc analyse from the client some months ago and now I am publishing.
So the two binary revisions are:
~ r25705(I think this is the most frequent used)
~ r36469(This is a new binary)
I downloaded the r36469 binary from this forum
filename: 'metin2client_r36469.exe__fixed.exe' I think in '.rar' archive.
filesize: 5079040 byte | 4,84 MB
With these diffs you can disable the FourCC analyze.
So, not need MCOZ or any 4 byte character for the beginnig of the packed files(.eix/.epk)
It is a good protection against n00bs. Maybe they get confused.
I tested every two binaries on Windows7 Ultimate x64, and works 100%.
If you have got any problem write about it in this thread.
I do not talk anymore, here is the diff for r25705:
Once upon a time... :awesome:
[Only registered and activated users can see links. Click Here To Register...]
Code:
This difference file is created by The Interactive Disassembler ~ FourCC is gone now (:
metin2client_r25705.bin
001727BA: 3B 8D
001727BB: 05 4B
001727BC: 08 14
001727BD: 07 89
001727BE: 7B 4E
001727BF: 00 0C
001727C0: 74 89
001727C1: 14 5E
001727C2: 68 08
001727C3: 9C 8B
001727C4: 6D 43
001727C5: 74 0C
001727C6: 00 57
001727C7: E8 50
001727C8: E4 B9
001727C9: B9 00
001727CA: FF D0
001727CB: FF 80
001727CC: 83 00
001727CD: C4 89
001727CE: 04 46
001727CF: 5E 04
001727D0: 32 E8
001727D1: C0 2B
001727D2: 5B FE
001727D3: C2 FF
001727D4: 04 FF
001727D5: 00 8B
001727D6: 8D F8
001727D7: 4B 89
001727D8: 14 3E
001727D9: 89 8B
001727DA: 4E 4B
001727DC: 89 8B
001727DD: 5E D1
001727DE: 08 C1
001727DF: 8B E9
001727E0: 43 02
001727E1: 0C 33
001727E2: 57 C0
001727E3: 50 F3
001727E4: B9 AB
001727E5: 00 8B
001727E6: D0 CA
001727E7: 80 83
001727E8: 00 E1
001727E9: 89 03
001727EA: 46 F3
001727EB: 04 AA
001727EC: E8 5F
001727ED: 0F 5E
001727EE: FE B0
001727EF: FF 01
001727F0: FF 5B
001727F1: 8B C2
001727F2: F8 04
001727F3: 89 00
001727F4: 3E 00
001727F5: 8B 00
001727F6: 4B 00
001727F7: 0C 00
001727F8: 8B 00
001727F9: D1 00
001727FA: C1 00
001727FB: E9 00
001727FC: 02 00
001727FD: 33 00
001727FE: C0 00
001727FF: F3 00
00172800: AB 00
00172801: 8B 00
00172802: CA 00
00172803: 83 00
00172804: E1 00
00172805: 03 00
00172806: F3 00
00172807: AA 00
00172808: 5F 00
00172809: 5E 00
0017280A: B0 00
0017280B: 01 00
0017280C: 5B 00
0017280D: C2 00
0017280E: 04 00
001DF8C4: 0F 90
001DF8C5: 85 90
001DF8C6: F9 90
001DF8C7: 01 90
001DF8C8: 00 90
001DF8C9: 00 90
And here is the diff for r36469:
Just click once more ;)
Code:
This difference file is created by The Interactive Disassembler ~ FourCC is gone now (:
metin2client_r36469.bin
0013F31A: 3B 8D
0013F31B: 05 4F
0013F31C: FC 14
0013F31D: 35 89
0013F31E: 6C 4E
0013F31F: 00 0C
0013F320: 74 89
0013F321: 14 7E
0013F322: 68 08
0013F323: 30 8B
0013F324: E0 47
0013F325: 65 0C
0013F326: 00 50
0013F327: E8 B9
0013F328: 64 44
0013F329: E2 31
0013F32A: FF 72
0013F32B: FF 00
0013F32C: 83 89
0013F32D: C4 46
0013F32F: 5F E8
0013F330: 32 7C
0013F331: C0 FF
0013F332: 5E FF
0013F333: C2 FF
0013F334: 04 89
0013F335: 00 06
0013F336: 8D 8B
0013F337: 4F 57
0013F338: 14 0C
0013F339: 89 52
0013F33A: 4E 6A
0013F33B: 0C 00
0013F33C: 89 50
0013F33D: 7E E8
0013F33E: 08 AE
0013F33F: 8B 9A
0013F340: 47 08
0013F341: 0C 00
0013F342: 50 83
0013F343: B9 C4
0013F344: 44 0C
0013F345: 31 5F
0013F346: 72 B0
0013F347: 00 01
0013F348: 89 5E
0013F349: 46 C2
0013F34B: E8 00
0013F34C: 60 00
0013F34D: FF 00
0013F34E: FF 00
0013F34F: FF 00
0013F350: 89 00
0013F351: 06 00
0013F352: 8B 00
0013F353: 57 00
0013F354: 0C 00
0013F355: 52 00
0013F356: 6A 00
0013F358: 50 00
0013F359: E8 00
0013F35A: 92 00
0013F35B: 9A 00
0013F35C: 08 00
0013F35E: 83 00
0013F35F: C4 00
0013F360: 0C 00
0013F361: 5F 00
0013F362: B0 00
0013F363: 01 00
0013F364: 5E 00
0013F365: C2 00
0013F366: 04 00
0018DA74: 0F 90
0018DA75: 85 90
0018DA76: 82 90
0018DA77: 01 90
0018DA78: 00 90
0018DA79: 00 90
*New* r34669:
[Only registered and activated users can see links. Click Here To Register...]
Code:
This difference file is created by The Interactive Disassembler ~ P3NG3R
metin2client_sg_r34669.exe
0013DF5A: 3B 8D
0013DF5B: 05 4F
0013DF5C: AC 14
0013DF5D: 45 89
0013DF5E: 69 4E
0013DF5F: 00 0C
0013DF60: 74 89
0013DF61: 14 7E
0013DF62: 68 08
0013DF63: 40 8B
0013DF64: 6A 47
0013DF65: 63 0C
0013DF66: 00 50
0013DF67: E8 B9
0013DF68: E4 94
0013DF69: E1 2B
0013DF6A: FF 6F
0013DF6B: FF 00
0013DF6C: 83 89
0013DF6D: C4 46
0013DF6F: 5F E8
0013DF70: 32 7C
0013DF71: C0 FF
0013DF72: 5E FF
0013DF73: C2 FF
0013DF74: 04 89
0013DF75: 00 06
0013DF76: 8D 8B
0013DF77: 4F 57
0013DF78: 14 0C
0013DF79: 89 52
0013DF7A: 4E 6A
0013DF7B: 0C 00
0013DF7C: 89 50
0013DF7D: 7E E8
0013DF7E: 08 DE
0013DF7F: 8B 69
0013DF80: 47 08
0013DF81: 0C 00
0013DF82: 50 83
0013DF83: B9 C4
0013DF84: 94 0C
0013DF85: 2B 5F
0013DF86: 6F B0
0013DF87: 00 01
0013DF88: 89 5E
0013DF89: 46 C2
0013DF8B: E8 00
0013DF8C: 60 00
0013DF8D: FF 00
0013DF8E: FF 00
0013DF8F: FF 00
0013DF90: 89 00
0013DF91: 06 00
0013DF92: 8B 00
0013DF93: 57 00
0013DF94: 0C 00
0013DF95: 52 00
0013DF96: 6A 00
0013DF98: 50 00
0013DF99: E8 00
0013DF9A: C2 00
0013DF9B: 69 00
0013DF9C: 08 00
0013DF9E: 83 00
0013DF9F: C4 00
0013DFA0: 0C 00
0013DFA1: 5F 00
0013DFA2: B0 00
0013DFA3: 01 00
0013DFA4: 5E 00
0013DFA5: C2 00
0013DFA6: 04 00
00189E14: 0F 90
00189E15: 85 90
00189E16: 82 90
00189E17: 01 90
00189E18: 00 90
00189E19: 00 90
r34669 other:
Code:
This difference file is created with IDA DIF-File Generator by musicinstructor
metin2client_sg_r34669.exe
Log.txt enable (:
000BD1C3: 00 01
TYPE_ERROR // RunMain error FIX (:
0018ACDC: 3C 90
0018ACDD: 02 90
0018ACDE: 74 90
0018ACDF: 04 90
0018ACE0: 3C 90
0018ACE1: 03 90
0018ACE2: 75 90
0018ACE3: 1A 90
0018ACF6: 39 90
0018ACF7: 86 90
0018ACF8: B4 90
0018ACF9: 00 90
0018ACFA: 00 90
0018ACFB: 00 90
0018ACFC: 75 90
0018ACFD: 78 90
0018B004: 3C 90
0018B005: 02 90
0018B006: 74 90
0018B007: 04 90
0018B008: 3C 90
0018B009: 03 90
0018B00A: 75 90
0018B00B: 1A 90
0018B01E: 39 90
0018B01F: 86 90
0018B020: B4 90
0018B021: 00 90
0018B022: 00 90
0018B023: 00 90
0018B024: 75 90
0018B025: 78 90
*New* r26070:
[Only registered and activated users can see links. Click Here To Register...]
Code:
This difference file is created by The Interactive Disassembler
metin2client_gfhs_r26070_4cc.exe
00173CBA: 3B 8D
00173CBB: 05 4B
00173CBC: 58 14
00173CBD: 57 89
00173CBE: 7C 4E
00173CBF: 00 0C
00173CC0: 74 89
00173CC1: 14 5E
00173CC2: 68 08
00173CC3: 3C 8B
00173CC4: 62 43
00173CC5: 75 0C
00173CC6: 00 57
00173CC7: E8 50
00173CC8: E4 B9
00173CC9: B9 50
00173CCA: FF 2F
00173CCB: FF 82
00173CCC: 83 00
00173CCD: C4 89
00173CCE: 04 46
00173CCF: 5E 04
00173CD0: 32 E8
00173CD1: C0 2B
00173CD2: 5B FE
00173CD3: C2 FF
00173CD4: 04 FF
00173CD5: 00 8B
00173CD6: 8D F8
00173CD7: 4B 89
00173CD8: 14 3E
00173CD9: 89 8B
00173CDA: 4E 4B
00173CDC: 89 8B
00173CDD: 5E D1
00173CDE: 08 C1
00173CDF: 8B E9
00173CE0: 43 02
00173CE1: 0C 33
00173CE2: 57 C0
00173CE3: 50 F3
00173CE4: B9 AB
00173CE5: 50 8B
00173CE6: 2F CA
00173CE7: 82 83
00173CE8: 00 E1
00173CE9: 89 03
00173CEA: 46 F3
00173CEB: 04 AA
00173CEC: E8 5F
00173CED: 0F 5E
00173CEE: FE B0
00173CEF: FF 01
00173CF0: FF 5B
00173CF1: 8B C2
00173CF2: F8 04
00173CF3: 89 00
00173CF4: 3E 00
00173CF5: 8B 00
00173CF6: 4B 00
00173CF7: 0C 00
00173CF8: 8B 00
00173CF9: D1 00
00173CFA: C1 00
00173CFB: E9 00
00173CFC: 02 00
00173CFD: 33 00
00173CFE: C0 00
00173CFF: F3 00
00173D00: AB 00
00173D01: 8B 00
00173D02: CA 00
00173D03: 83 00
00173D04: E1 00
00173D05: 03 00
00173D06: F3 00
00173D07: AA 00
00173D08: 5F 00
00173D09: 5E 00
00173D0A: B0 00
00173D0B: 01 00
00173D0C: 5B 00
00173D0D: C2 00
00173D0E: 04 00
00173D10: 8B 00
00173D11: 44 00
00173D12: 24 00
00173D13: 0C 00
00173D14: 8B 00
00173D15: 4C 00
00173D16: 24 00
00173D17: 08 00
00173D18: 56 00
00173D19: 8B 00
00173D1A: 74 00
00173D1B: 24 00
00173D1C: 08 00
00173D1D: 50 00
00173D1E: 51 00
00173D1F: 8B 00
00173D20: CE 00
00173D21: E8 00
00173D22: 2A 00
00173D23: FE 00
00173D24: FF 00
00173D25: FF 00
00173D26: 8B 00
00173D27: CE 00
00173D28: E8 00
00173D29: 53 00
00173D2A: F7 00
00173D2B: FF 00
00173D2C: FF 00
00173D2D: 5E 00
00173D2E: C2 00
00173D2F: 0C 00
001E0DC4: 0F 90
001E0DC5: 85 90
001E0DC6: F9 90
001E0DC7: 01 90
001E0DC8: 00 90
001E0DC9: 00 90
Here is a diff, for Tim's archiver 2.8 to disable the fourcc analyze in the decrypt function:
With this diff, you will not see this error anymore:
"Bad Pack Index file. FourCC check failed."
Code:
This difference file is created by The Interactive Disassembler ~ FourCC is gone now (:
m28.exe
0000812E: 74 EB
PS1.: I did not make for other binaries, just for these.
PS2.: Sorry for my bad english if it is bad :>
PS3.: Almost I forgot the 4CC renamer.
Code:
#Python|Metin2|FourCC-Randomizer
import os
import sys
from random import randint
win32cls = lambda:os.system("cls")
linuxcls = lambda:os.system("clear")
def generaterandomfourcc(filename):
originalfourcc = "MCOZ"
newfourcc = ''
chs = [chr(i) for i in xrange(256)]
while len(newfourcc) < 4:
newfourcc += '%s' % chs[randint(0, len(chs)-1)]
##opening file for readbinary+
kFile = open(filename,"rb+")
##Going to the beginnig of the file.
kFile.seek(0)
##This write overwrite the first four char and the file size is will not change
##Replace the fourcc to new-generated string.
kFile.write(newfourcc)##originalfourcc if you want to restore the original fourcc
##closing file
kFile.close()
def main():
win32cls()
print('FourCC randomizer in every pack files...\n')
##Must give with dot! (The .eix extension is: .kev)#<-- this is an example!
ext_index = raw_input('The .eix extension is: ')
##Must give with dot! (The .epk extension is: .big)#<-- this is an example!
ext_pack = raw_input('The .epk extension is: ')
win32cls()
print('Generating started...\n')
for file in os.listdir(os.getcwd()):
if file.endswith(ext_index) or file.endswith(ext_pack):
print('Now generating file: %s' % file)
generaterandomfourcc(file)
print('Done!')
if __name__ == '__main__':
main()
PS4(xD).: Here is a little stuff to create a pack folder encryptor xml, this means create a xml wherewith you can
extract every file in the pack folder :>
Code:
import os
import sys
cls = lambda:os.system("cls")
def main():
cls()
print('Extractor XML creator.\n')
ext = raw_input('Give in the .eix extension: ')
cls()
print('XML making begun...\n')
f=open('Ex_all.xml','w')
temp=[]
temp.append('<Buildfile version="1.1">')
for fi in os.listdir(os.getcwd()):
if fi.endswith(ext):
fi=fi.split(ext)[0]
temp.append('\t<Action type="extract" archivePath="%s" outputPath="Source/%s" extractAll="YES" createXML="YES" xmlPath="%s_pack.xml"/>' % (fi,fi,fi))
temp.append('</Buildfile>')
cls()
f.write('\n'.join(temp))
f.close()
print('Finished!\n')
os.system('pause')
sys.exit(-1)
if __name__ == '__main__':
main()
PS5.: Here is a little python script for server_mob_proto translater from client_mob_proto.
Code:
import os
import md5
import sys
#vnum="101" name="µé°ł" gb2312name="Wild dog" type="0" rank="0" battle_type="0" level="1" event_type="0" mob_color="0"
Temp=[]
MobList=[]
class func:
def Finished(self,error=0):
"""0=no errror, 1=not exists"""
if error==0:
print "Finished!\nPress enter to exit..."
raw_input()
elif error==1:
print "Convertion failed, mob_proto_dump is mising!\nPress enter to exit..."
raw_input()
sys.exit()
def CreateTokens(self,line):
line = line.replace('\t<Mob ','')
line = line.replace(' />','')
line = line.replace('" n','"||n')
line = line.replace('" g','"||g')
line = line.replace('" t','"||t')
line = line.replace('" r','"||r')
line = line.replace('" b','"||b')
line = line.replace('" l','"||l')
line = line.replace('" e','"||e')
line = line.replace('" m','"||m')
return line.split('||')
def GetValue(self,string):
from binascii import b2a_hex
if string.count('"')<1:
return 0
data = string.split('"')[1]
if data.isdigit():
return int(data)
return b2a_hex(data).upper()
def CreatSQL(self):
pre = "UPDATE `mob_proto` SET `locale_name`=0x%s WHERE (`vnum`='%d');"
for i in xrange(len(MobList)):
data = MobList[i]
line = pre % (data["LOCALE_NAME"], data["VNUM"])
Temp.append(line)
SQL = open("update_sql.sql", "w")
SQL.write('/*Created by mob_proto translater ~ P3NG3R*/\n')
SQL.write('\n'.join(Temp))
SQL.close()
self.Finished(0)
if not os.path.exists("mob_proto_dump.xml"):
func().Finished(1)
def main():
os.system('cls')
print('server_mob_proto translater from client_mob_proto.\n')
lines = open("mob_proto_dump.xml", "r").readlines()
for line in lines:
line = line.strip()
if line.count('"') == 18 or line.count("'") == 18:
try:
tokens = func().CreateTokens(line)
vnum = func().GetValue(tokens[0])
locale_name = func().GetValue(tokens[2])
except Exception, e:
print("Exception: (%s), Error on line %s" % (e, lines.index(line)+1))
mobData = {
"VNUM" : vnum,
"LOCALE_NAME" : locale_name
}
MobList.append(mobData)
func().CreatSQL()
if __name__ == '__main__':
main()
* All in one .rar in attachment.
With regards,
P3NG3R