Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-08-2020, 18:24
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 387
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 65 Times in 34 Posts
jonwil Reputation: 21
Tips for fixing up decompiled .NET code?

I have decompiled a .NET binary with dnSpy and the resulting output has some strange things in it like this
Code:
		public HouseType(sbyte id, string name, string unitTeamColor, string buildingTeamColor, [TupleElementNames(new string[]
		{
			"type",
			"teamColor"
		})] params ValueTuple<string, string>[] overrideTeamColors)
		{
			this.ID = id;
			this.Name = name;
			this.UnitTeamColor = unitTeamColor;
			this.BuildingTeamColor = buildingTeamColor;
			this.OverrideTeamColors = overrideTeamColors.ToDictionary(([TupleElementNames(new string[]
			{
				"type",
				"teamColor"
			})] ValueTuple<string, string> x) => x.Item1, ([TupleElementNames(new string[]
			{
				"type",
				"teamColor"
			})] ValueTuple<string, string> x) => x.Item2);
		}
and this
Code:
				for (int i = 0; i < array2.Length; i++)
				{
					var <>f__AnonymousType = array2[i];
					this.plugin.Map.Triggers.Add(<>f__AnonymousType.NewTrigger.Clone());
					this.plugin.Map.Triggers.Remove(<>f__AnonymousType.OldTrigger);
				}
and this
Code:
		[CompilerGenerated]
		internal static string <LoadINI>g__indexToType|20_1(IList<string> list, string index)
		{
			int num;
			if (!int.TryParse(index, out num) || num < 0 || num >= list.Count)
			{
				return list.First<string>();
			}
			return list[num];
		}
Are there any good tutorials on how to fix up such things?
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to fixing API-Calls Nukacola General Discussion 6 05-11-2005 16:49
Import OS Fixing MaRKuS-DJM General Discussion 31 07-16-2004 23:20
Fixing an EXE to not call a DLL? Barry General Discussion 11 06-03-2004 00:37
Problem with fixing IAT K3nny General Discussion 5 01-04-2004 19:26


All times are GMT +8. The time now is 21:14.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )