Emudofus / BehaviorIsManaged

Program simulating behaviors
GNU General Public License v3.0
31 stars 31 forks source link

2.11 uncompilation #56

Closed FastFrench closed 11 years ago

FastFrench commented 11 years ago

Hello,

do you also have some problem to uncompile Dofus 2.11 version ?

Torf commented 11 years ago

SWF Decompiler can show all sources but exporting them crash it.

2013/4/16 FastFrench notifications@github.com

Hello,

do you also have some problem to uncompile Dofus 2.11 version ?

— Reply to this email directly or view it on GitHubhttps://github.com/Emudofus/BehaviorIsManaged/issues/56 .

FastFrench commented 11 years ago

Yep, same for me :(

FastFrench commented 11 years ago

In fact, there are several (many ?) files that make SWF Decompiler crash. The first one is Berilia/Managers/UiModule/Manager You can't even look at them with SWF Decompiler.

It crashes because of a stack overflow.

Timorem commented 11 years ago

Their obfuscation is awful ... A way to fix is maybe to modify the SWF (i.g with Yogda) delete the files from UiModule (that are obfuscated) and save it.

FastFrench commented 11 years ago

Game over...

Timorem commented 11 years ago

Did you try with trillix ?

FastFrench commented 11 years ago

Can't extract any AS file with Trillix. It just gives one empty AS 3.0 file.

Timorem commented 11 years ago

Do you have the last update of sothink ?

FastFrench commented 11 years ago

I've tried it, yep (free trial so coulnd't export, but still crash when trying to look at those @@@ scripts)

FastFrench commented 11 years ago

Well, I succeeded to rebuild the BiM.Protocol assembly (it's EZ in fact : just get the files you really need), but there are some other changes : it crashes in the Reader (FastBigEndianReader.ReadShort), while reading the D2I files. There is an additional byte in the index part of the d2i files, but I'm unsure what it is for.

In order to help those interested in investigating the obfuscation, here are some of the crypted files : com\ankamagames\dofus\logic\connection\frames\AuthentificationFrame com\ankamagames\dofus\logic\connection\managers\AuthentificationManager com\ankamagames\dofus\logic\shield\SecureModeManager com\ankamagames\dofus\logic\shield\ShieldCertifcate

Shravan1804 commented 11 years ago

Thanks for your efforts guys. I am searching the web to see if anyone has done something about this MaJ.

Edit: wrong link

Timorem commented 11 years ago

Yogda doesn't work either to see the ABC code of that files. I'm sure there is a junk code that flash doesn't interpret but the decompiler does. Maybe it's time to write our own decompiler ? At least into ABC code

Btw, if you updated the protocol can you push it FF ?

FastFrench commented 11 years ago

As it is a stack overflow, it may also be something like including some reference to himself.

On my side, I've no knowledge of ABC Code, and no real will to learn that ;)

I'll push the protocol, but it's quite useless as it is still broken (the D2I reader, and maybe other parts after that).

FastFrench commented 11 years ago

Was not a took big deal after all. D2I format has a bit changed, but it remains close to the previous version. Simply, now instead of one string per index, there is a collection of strings (for instance 2, with the first in UTF8 and the 2nd in pure ASCII). There are some data at the end of the file, I still don't know what they are for (some encryption key maybe ?).

For now I succeeded to connect to the game... will see if I've missed something.

Torf commented 11 years ago

There is the IndexTable at the end of the file, i haven't seen anything else. The header contains undiatrical text indexes, normal text indexes and sorted text indexes.

2013/4/18 FastFrench notifications@github.com

Was not a took big deal after all. D2I format has a bit changed, but it remains close to the previous version. Simply, now instead of one string per index, there is a collection of strings (for instance 2, with the first in UTF8 and the 2nd in pure ASCII). There are some data at the end of the file, I still don't know what they are for (some encryption key maybe ?).

For now I succeeded to connect to the game... will see if I've missed something.

— Reply to this email directly or view it on GitHubhttps://github.com/Emudofus/BehaviorIsManaged/issues/56#issuecomment-16603632 .

Timorem commented 11 years ago

They store the same text in UTF8 and ASCII ? That's a joke

FastFrench commented 11 years ago

Yep, but only for some of the strings. No idea Why. In the bot, I simply ignore all except the first one (UTF8 string)

FastFrench commented 11 years ago

@Torf : in Dofus 2.10 and before, there was 3 parts in those files : Utf-8 strings, offset table for integer indexed strings and offset + keys table for text - indexed strings. Now there is some non-text additionnal data at the end. This data at the end is highly redondant (like 4 bytes int with small increments each time).

FastFrench commented 11 years ago

Testing : nearly works, except my characters do not move... Probably some changes in moves.

FastFrench commented 11 years ago

They've also changed the codification of maps...

I guess nothing else significant has changed.

Timorem commented 11 years ago

http://www.free-decompiler.com/flash/download.html This open source program decompiles the swf very well without any problem !

Amazing.

FastFrench commented 11 years ago

Nice, it works fine. I've checked a couple of files that crash on Sothink, but couldn't figure out what's wrong in them. Do you have an idea ?

Timorem commented 11 years ago

They use SecureSWF to obfuscate these files, but JPEXS unprotect them.

vendethiel commented 11 years ago

well that's a nice tool, isn't it

Timorem commented 11 years ago

Can you push as soon as you can FastFrench, I really need BiM to be updated but I won't do it if you already started

Torf commented 11 years ago

Do you have an idea of the reason of this obfuscation ?

2013/4/21 Timorem notifications@github.com

Can you push as soon as you can FastFrench, I really need BiM to be updated but I won't do it if you already started

— Reply to this email directly or view it on GitHubhttps://github.com/Emudofus/BehaviorIsManaged/issues/56#issuecomment-16729242 .

vendethiel commented 11 years ago

Maybe they started to realize bad people are decompling their tools

FastFrench commented 11 years ago

Full 2.11 update done.