-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1baeff8
commit a1d991f
Showing
24 changed files
with
102 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ on: | |
- '*' | ||
tags: | ||
- '*' | ||
paths: | ||
- BloonsTD6 Mod Helper/** | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,46 @@ | ||
|
||
|
||
# dnSpy | ||
|
||
[dnSpy](https://github.com/dnSpy/dnSpy/releases) is a program that lets you look into compiled Assemblies to see their code, to a certain extent. For Bloons TD 6, this means we'll be opening `...\BloonsTD6\MelonLoader\Managed\Assembly-CSharp.dll` file to look at the Main Bloons TD 6 code. It'll look something like this: ![Screenshot of dnSpy](https://media.discordapp.net/attachments/800115046134186026/859498956270862356/unknown.png) | ||
[dnSpy](https://github.com/dnSpy/dnSpy/releases) is a program that lets you look into compiled Assemblies to see their | ||
code, to a certain extent. For Bloons TD 6, this means we'll be | ||
opening `...\BloonsTD6\MelonLoader\Managed\Assembly-CSharp.dll` file to look at the Main Bloons TD 6 code. | ||
It'll look something like this: ![Screenshot of dnSpy](images/dnspy.png) | ||
|
||
You can navigate around the Assembly just using dnSpy, especially using the search function: | ||
![screenshot of dnSpy search](https://media.discordapp.net/attachments/699781597515481159/927370134887215134/unknown.png) | ||
![screenshot of dnSpy search](images/dnspy-search.png) | ||
|
||
or you can go to File -> Export to Project to save it as a .csproj that you can open up in your favorite IDE to navigate around in a more familiar way. ![Screenshot of dnSpy Exporting to project](https://media.discordapp.net/attachments/800115046134186026/859500013431160872/unknown.png?width=1250&height=702) | ||
or you can go to File -> Export to Project to save it as a .csproj that you can open up in your favorite IDE to navigate | ||
around in a more familiar way. | ||
![Screenshot of dnSpy Exporting to project](images/dnspy-export.png) | ||
|
||
## Limitations | ||
|
||
Unfortunately, due to the game's usage of [IL2CPP](https://github.com/gurrenm3/BTD-Mod-Helper/wiki/IL2CPP-Is-Weird), we're limited in what we can see through this method. | ||
Unfortunately, due to the game's usage of [IL2CPP](https://github.com/gurrenm3/BTD-Mod-Helper/wiki/IL2CPP-Is-Weird), | ||
we're limited in what we can see through this method. | ||
|
||
### What We CAN See | ||
|
||
* File, Method, Field, Property Names | ||
* Method, Field, Property types used | ||
* Number of times a Method/Class is used (using Analyze) | ||
|
||
![Screenshot of Analyze](https://media.discordapp.net/attachments/699781597515481159/927370622038863903/unknown.png) | ||
![Screenshot of Analyze](images/dnspy-analyze.png) | ||
|
||
### What we CAN'T See | ||
|
||
* The actual code within method bodies | ||
* The places where methods get called | ||
|
||
When you look around the code, you'll basically as see the same pattern of Method stub used, which is basically: Convert parameters to C++y forms, call the particular C++ compiled native method, manually raise necessary exceptions. | ||
When you look around the code, you'll basically as see the same pattern of Method stub used, which is basically: Convert | ||
parameters to C++y forms, call the particular C++ compiled native method, manually raise necessary exceptions. | ||
|
||
Needless to say, that information isn't really useful. This is not a method that will let you get an understanding of what Methods actually do and how they do it. | ||
Needless to say, that information isn't really useful. This is not a method that will let you get an understanding of | ||
what Methods actually do and how they do it. | ||
|
||
Still, it can be useful to look at all the Names and Types of things within a Class | ||
|
||
# ADVANCED: IDA | ||
|
||
You can use decompilation software like IDA on "...\BloonsTD6\GameAssembly.dll" to look at the actual assembly code to see what methods do, or more accurately, look at IDA's attempt to generate C Pseudocode for that assembly code. | ||
You can use decompilation software like IDA on "...\BloonsTD6\GameAssembly.dll" to look at the actual assembly code to | ||
see what methods do, or more accurately, look at IDA's attempt to generate C Pseudocode for that assembly code. | ||
|
||
More info coming at a later time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters