Cin Files

Join Discord

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
I've made some progress in deciphering them, here is what I know so far so other may begin work on trying to work it out.
-The first four bytes of any cin file contains the encryption key, altering them changes a cins contents dramatically.
-The 5th and 6th byte seem redundant and as of yet, altering them does not change the contents of the cin
-7th Byte is always the beginning of the actual text within a cin file
-Each byte codes for 1 character of a string.
-The same string value such as 'M' does not have the same encrypted value. E.g if you type Matty says hi to Sarah McArthur then the first M of Matty will not have the same value as the M of McArthur.

Anyone good in cryptography? or programming. I have the asm source too but I'm hopeless as reading asm. By asm source I mean i know where the cin file decoding takes place.

Edit = Been working on the file a bit more, I can now see regions which are convserved withing groups. I have successfully written part of a message into a cin file and I am working to write whatever I want into one. So keep an eye out. Help still appreciated.
 
Last edited:

NickAKAVexus

Golden Oldie
Golden Oldie
Apr 16, 2005
1,427
1
145
New york
cin file does what? I have some experience with converting asm-> delphi and other things just ask on msn. :P
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
I have the first 8 bits as the header

Bit 1 > 3 = Always the same (240,57,171)

Bit 4 > 7 = Key (may also contain the length of the file)

Byte 8 = No change for any CIN. (159)


A cin using the chars

44444444444444444444

and a cin using the chars

444444444444444444444 (1 Extra Char)

have the following different headers

240 57 171 155 219 111 222 159
240 57 171 154 5 115 222 159

Hope this helps someone out :D

(sorry if that sounds like a load of tripe)

Nick.. a cin file contains all the connection data for the client.

i.e.

[Initial]
ServerAddr=1.1.1.1
Param1=7000
Param2=http://link to new account page
Param3=http://link to change password page
Param4=
Param5=

[Server]
ServerCount=1
server1caption=MyServer
server1name=MyServer

This is saved in an encryted *.cin file
 
Last edited:

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
It helps me :) I analysed mine in hexadecimal system and it is the same, the first 3 bytes are always teh same and the 4th byte changes BUT if you change any of the first 3 bytes - the whole cin loses structure. So the first four bytes are the encryption key.
The 6th and 7th are length I think as they can be changed and it makes no difference to the contents of the cin.
I'm still working on it, nice to know you are too and we have the same info :D
 

Damian

LOMCN Developer
Developer
Ravagers
Game Master
Jun 13, 2003
1,113
107
310
I saw a few char arrays in the mir3.exe, my guess is it uses
the key with some sorta Base64 encoding/decoding, never
properly looked at it, so i might be way out.
 

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
base64 doesnt take a key :( im getting somewhere with it, just very slowly lol
 

Demonic

LOMCN VIP
VIP
Dec 1, 2003
1,806
2
185
base64 doesnt take a key :( im getting somewhere with it, just very slowly lol

of course it would take Kaori 5 Seconds to post the full Details of how it is worked out - i am very Confused as to why this is kept Secret & On a Web page but each person has there own reasons I guess..

I recall from my time working on it - the first 4 pairs match the same pairs in the client (Hex) - something to do with the next 4 in both client & CIN but thats about as much as i could be bothered to work out.

remember a Chinese Client does not use CIN files, only USA & EuroMir, I betcha you could even hex out the encrtyion in the client to read normal text files - much like Mapinfo etc used to be like.
 

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
i want it for a client im writing, i already made a client that reads ini files not cin ones lol.
The first four are the key, i think it uses bitshift, so far I cna only decrypt half the message but its only a matter of time lol
 

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
That's what my prgoram does. And which source? I just opened a client and looked through its asm. I have a source for a text client I've written, thats all.
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
I know its not strictly cin related, but it is programming and Mir file related so....

I have a part done 3G map editor should anyone wish to finish it off (VB6) So far I have been working on viewing a map (the editor part should not be that complicated once this section is complete as it should be a matter of selecting a Tile Set, selecting a tile and placing it down, then creating the .map file).

It loads up the images (not sure on doing the transparency on certain colours), it still doesn't quite all fit together, but it does tell you what each bit of information does in each byte of the .map file.

What still needs to be done.

Establishing which bytes load which data file up, i.e. 66 = Tilesc (not correct, just an example)

Making it load each image up and putting it in the correct location. I have it working for certain maps, but there is the odd tile that misplaces the map slightly.

The VB coding is not 100% sexy, as I have done alot of messnig around, so it will be a little untidy, but hopefully, someone with good VB knowledge will be able to see what I have done so far and adapt it and fix it. All I am after is a final 3G map editor.

If anyone wants to finish it, give me a shout (I would like a copy of the finished product though :D), I just don't have the time to finish it atm and it would be a shame to waste the work I have done so far.

Screen shot of what I have so far.

1.JPG
untitled.JPG
 

Damian

LOMCN Developer
Developer
Ravagers
Game Master
Jun 13, 2003
1,113
107
310
I know its not strictly cin related, but it is programming and Mir file related so....

I have a part done 3G map editor should anyone wish to finish it off (VB6) So far I have been working on viewing a map (the editor part should not be that complicated once this section is complete as it should be a matter of selecting a Tile Set, selecting a tile and placing it down, then creating the .map file).

It loads up the images (not sure on doing the transparency on certain colours), it still doesn't quite all fit together, but it does tell you what each bit of information does in each byte of the .map file.

What still needs to be done.

Establishing which bytes load which data file up, i.e. 66 = Tilesc (not correct, just an example)

Making it load each image up and putting it in the correct location. I have it working for certain maps, but there is the odd tile that misplaces the map slightly.

The VB coding is not 100% sexy, as I have done alot of messnig around, so it will be a little untidy, but hopefully, someone with good VB knowledge will be able to see what I have done so far and adapt it and fix it. All I am after is a final 3G map editor.

If anyone wants to finish it, give me a shout (I would like a copy of the finished product though :D), I just don't have the time to finish it atm and it would be a shame to waste the work I have done so far.

Screen shot of what I have so far.

Why not just edit the mir2 mapedit, change the tile structure, wil files
etc and u have urself a useful 3g mapedit.
 

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
How about then, send me your soruce please idabiga and if damian, you could tell me where the mir2 map edit source is. I'll blend them bother together to see if I can create a somewhat functioning map editor.
For once, I'm getting quite excited about mir3 again. I just love programming.
PM me links if you don't want to share with anyone and everyone, I'll share my text client source once it is done too.
 

DjDarkBoyZ

Dev
Golden Oldie
Aug 11, 2006
1,065
228
260
127.Ø.Ø.1
You can post these links here? also PM me if you dont like to people to see.Im an experienced VB programed and more.I can help you ;).
Thx :D

Soz for my english im learning :)
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
285
Canada
ok here's the deal... in ASM... provide me the 4 byte encryption key... I'll ship you some ideas.
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Considering I didn't understand what you said then I might as well stop messing with the cin file lol.
 

shorty606

Golden Oldie
Golden Oldie
Apr 10, 2005
867
0
122
We found the 4 byte key in the cin files themselves. I have the asm where the decrypting goes on. It xors three values, is this close? I only want to decode the cin.