Kantai Collection/Vita/Decompilation: Difference between revisions
Antonizoon (talk | contribs) No edit summary |
Antonizoon (talk | contribs) |
||
Line 21: | Line 21: | ||
http://resources.infosecinstitute.com/net-reverse-engineering-1cil-programming/#gref | http://resources.infosecinstitute.com/net-reverse-engineering-1cil-programming/#gref | ||
Basic CIL editing of unity and put back into dll: https://www.unknowncheats.me/forum/general-programming-and-reversing/106107-patching-cil-instructions-ida-hxd.html | |||
=== Change strings within DLLs === | === Change strings within DLLs === |
Revision as of 18:16, 20 January 2017
The Kancolle Vita game provides the entire engine and logic of Kantai Collection in full, but in Unity. This makes decompilation and even a possible port to PC easy.
Unity uses one of two languages (C# and UnityScript), both of which use Microsoft's .NET framework. The .NET framework is cross-platform since it uses a unified bytecode format: Common Intermediate Language (CIL) which then runs on the portable Common Language Runtime (CLR). Like Java bytecode, CIL is designed for an idealized computer that is emulated by the CLR, so the bytecode is easier to decompile.
Move to PC Unity
It may be possible that the same binaries, which are cross platform, will work on a PC Unity project. I'm not familiar with using it but I can learn.
Decompiling Unity DLLs
Use ILSpy or dotPeek to open three files, Assembly-CSharp.dll
, Assembly-CSharp-firstpass.dll
, and Assembly-UnityScript.dll
.
- C#
- UnityScript (JavaScript basically)
http://stackoverflow.com/a/5188580
http://www.alanzucconi.com/2015/09/02/a-practical-tutorial-to-hack-and-protect-unity-games http://archive.is/ATA5L
This is a starter guide to direct CIL editing:
http://resources.infosecinstitute.com/net-reverse-engineering-1cil-programming/#gref
Basic CIL editing of unity and put back into dll: https://www.unknowncheats.me/forum/general-programming-and-reversing/106107-patching-cil-instructions-ida-hxd.html
Change strings within DLLs
An easy test case to prove that we can edit to strings is to do a simple test case:
Server_Models/Mst_ship.cs
Change なし to None- Change all instances of なし to None in mst_ships.xml
- You may need to open the dll and recompile it in using islasm.exe.
The relevant code line: https://github.com/limyz/KCKaiVita/blob/master/Assembly-CSharp/dotPeek/Server_Models/Mst_ship.cs#L941
If the modified Assembly-CSharp.dll works, this proves that DLLs can have their CIL code strings modified.
This is a starter guide to direct CIL editing:
http://resources.infosecinstitute.com/net-reverse-engineering-1cil-programming/#gref
Change strings within DLLs
An easy test case to prove that we can edit to strings is to do a simple test case:
Server_Models/Mst_ship.cs
Change なし to None- Change all instances of なし to None in mst_ships.xml
The relevant code line: https://github.com/limyz/KCKaiVita/blob/master/Assembly-CSharp/dotPeek/Server_Models/Mst_ship.cs#L941
If the modified Assembly-CSharp.dll works, this proves that DLLs can have their CIL code strings modified.
Decompiling Unity Assets
We do this all the time with the translation project, it's easy.
Recompiled/Reverse Engineered Replacement
After decompilation, the next step is to produce a completely reverse engineered version.
Engine
The first step is to simply extract the crucial game elements, and reimplement them in another form. This
UI and Visuals
The UI and Visuals must be implemented in Unity, since that's where the assets come from. This is a bit harder and can be more of a grey area. Maybe we could pitch this as providing Vita style visuals for the browser game.