Editing Kantai Collection/Vita/Decompilation
From Bibliotheca Anonoma
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
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. | 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 == | == Move to PC Unity == | ||
Line 14: | Line 9: | ||
== Decompiling Unity DLLs == | == Decompiling Unity DLLs == | ||
Use ILSpy or dotPeek to open three files | Use ILSpy or dotPeek to open three files, <code>Assembly-CSharp.dll</code>, <code>Assembly-CSharp-firstpass.dll</code>, and <code>Assembly-UnityScript.dll</code>. | ||
* C# | * C# | ||
Line 27: | Line 22: | ||
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 === | |||
An easy test case to prove that we can edit to strings is to do a simple test case: | |||
# {{ic|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 [http://stackoverflow.com/questions/6746387/manually-edit-msil-in-compiled-dll 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 | === Change strings within DLLs === | ||
An easy test case to prove that we can edit to strings is to do a simple test case: | An easy test case to prove that we can edit to strings is to do a simple test case: | ||
# | # {{ic|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 | 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. | If the modified Assembly-CSharp.dll works, this proves that DLLs can have their CIL code strings modified. | ||
== Decompiling Unity Assets == | == Decompiling Unity Assets == |