13 votes

How to decompile a C# .exe on macOS?

Visual Studio for Mac can do the job. Just hit File / Open and then choose the executable or library you want. It'll open the Assembly Browser window. If you need more detailed code change the ...
gandarez's user avatar
  • 231
11 votes
Accepted

Why can C# applications be reverse-compiled with variable names while C++ ones can't?

Debug Symbol information is often "stripped off" from C++ binaries. Symbol information stores all user-created names, symbols, and types, bounds, fouction boundary and other function related ...
R4444's user avatar
  • 1,807
10 votes
Accepted

How to tell if a particular .NET assembly was written in C# or F#?

Why does decompiling an F# assembly produce C# code? It doesn't. It produces IL code which then can be interpreted as C#, F# or VB.NET. dotPeek doesn't allow you to use any other language for ...
Paweł Łukasik's user avatar
8 votes

Modify code with ILSpy

For reference to those still looking for an answer to this question, I would recommend trying dnSpy - it allows you to do exactly what the requester asked - modify the high level code and recompile. ...
Raithlin's user avatar
  • 181
6 votes
Accepted

C# Changing method body in runtime

In the past I've had issues editing the IL code during run time, especially if the method had already been compiled by the JIT Compiler, and the most full proof way I found was to patch it during run ...
André Brandão's user avatar
6 votes
Accepted

Compile C# like C++?

There are a number of options: C# code can be compiled to native code (like C++ compilation) using Ngen.exe or .NET Native. Although the IL code and metadata might still be required by the runtime. ...
Hadi Brais's user avatar
5 votes

How to edit and modify a class with ILSpy + Reflexil

Try using dnSpy. It includes an ability to inject the recompiled code, and has the same interface as ILSpy. Use "Edit Method" option on the method you're editing, then "Build" and save the assembly. ...
Alien_AV's user avatar
  • 151
5 votes
Accepted

Having keys and binary, how do I reverse/decrypt a stream encryption?

Good news, You're lucky! What you're facing in front of you is a stream cipher. Why is that good? because the way stream ciphers are built makes them extremely easy to reverse - the decryption and ...
NirIzr's user avatar
  • 11.8k
5 votes

How to decompile a C# .exe on macOS?

Best free tool for the job is ILSpy, but it runs on Windows. This gives you a limited list of options: create a windows virtual machine (with virtualbox or vmware player) and run it in there install ...
Chris Tsiakoulas's user avatar
5 votes

Recover source code for C# .exe

As far as free and open source tools go, I'd recommend dnSpy. It is the best tool I've used for .NET reverse engineering. You might also want to try out ILSpy, which is free and open source as well.
tmr232's user avatar
  • 1,577
5 votes

Trace Method Calls in .NET/C# Binary

that instrumentation is not easily possible because of JIT compilation of IL instructions. Well it's actually the opposite. Tracing methods is quite easy - it would be difficult if we would like to ...
Paweł Łukasik's user avatar
4 votes

Recover source code for C# .exe

Consider also JetBrains dotPeek that is free, decompiles .NET 1.0-4.5 assemblies to C#. Has support for .dll, .exe, .zip, .vsix, .nupkg, and .winmd files.
Vadzim's user avatar
  • 141
4 votes
Accepted

Reverse code check

Well the algo is quite simple, let's try to break it down: if (code.Substring(0, 2) != "DC") It has to start with DC if (code.Length != 0x1a) and be of length 26 chars string s = code....
Paweł Łukasik's user avatar
4 votes
Accepted

Debug and crack .NET executable PE

reading your question several times and the discussion in the comments i did not understand what you're trying to get/obtain, so i will be answering to parts that i think that are relevant according ...
beginner's user avatar
4 votes
Accepted

Is there a way to decompress a Fody-Costura generated exe in c#?

Embedded assemblies needs to be decompressed before they can be used so you can inspect all the code that does that in the assembly. Just go to Costura.AssemblyLoader to check how it is done. below is ...
Paweł Łukasik's user avatar
3 votes

How to deobfuscation the public class names .NET

Converting multiple comments of mine to an answer for future readers: You can't always deobfuscate .NET binaries. If, when the binaries are compiled, the obfuscation implementation modifies the name ...
dsasmblr's user avatar
  • 2,234
3 votes

Can we decompile an .exe or .dll as %100?

Since the compilation output of .NET languages is MSIL, which is quite readable itself, it can be transformed back to (almost) original source code. There are many applications which can do that. My ...
Michael Pittino's user avatar
3 votes

Recover source code for C# .exe

To answer your question "Can I end up with the original source code in a way I can finish the coding of the missing items and recompile again?": if it runs on your system, it means you have all the ...
Olivier Guinart's user avatar
3 votes

How to debug a DLL written in .NET/C#?

I've used dnSpy in production for debugging as it can be put on a USB. It's perfectly capable of decompiling and debugging dll's. It has a pretty rich set of features. It's able to attach to ...
Jonathan Van Dam's user avatar
3 votes

Trace Method Calls in .NET/C# Binary

You can use de4dot (https://github.com/0xd4d/de4dot) to deobfuscate the binary. Static analysis of dotnet binaries can be done easily by using de4dot and then using ILSpy to create a visual studio ...
oridamari's user avatar
3 votes

IDA Pro sp-analysis failed

If this is C# (or any other .NET file) you need to use a tools such as .NET reflector to "decompile" it into .NET intermediate language. Anyhow... The error you are seeing means that at the end of a ...
Yotamz's user avatar
  • 1,217
3 votes
Accepted

How to start out in reversing?

I'm starting in RE too (since beggining of 2020), and I thought I could put here what I've learned so far. Maybe it might be of help. So first of all, you need Assembly knowledges. You asked if it's ...
Edw590's user avatar
  • 188
3 votes
Accepted

Mono.Cecil throws SymbolsNotMatchingException, how to find out Method line number?

So all the steps above are correct the way they were described. The only thing I have done wrong was, that my target DLL was modified by Mono.Cecil before (I already had read and wrote my target DLL ...
programming_is_bae's user avatar
2 votes

Question of analysing function of DLL and write program to call it

First of all, follow the advice of the two commentors and investigate on the semantics of the ArcCompress method. In case it is really returning a C file pointer, what would you do with it in C# ?? ...
josh's user avatar
  • 1,974
2 votes

Issue decompiling c# method

You file is obfuscated with ConfuserEX and I know it because of the way the ControlFlow looks. ControlFlow is simply the fact that the method body seems to be confusing / puzzling, with Switch Cases ...
XenocodeRCE's user avatar
2 votes

Extracting embedded dlls from .NET executable

They are not inside the application, there should be somewhere on your machine and will be loaded at runtime. You can use Process Monitor to check from where they are loaded. ILSpy should be able to ...
Paweł Łukasik's user avatar
2 votes

How to decompile a C# .exe on macOS?

You can use Jetbrains' Rider. It has a 30 day free trial period. Open Rider and open or create a C# project Add a dependency to the .exe file (naturally, this also works for .dll). In a class in ...
jbarrameda's user avatar
2 votes

Help Needed reversing a function inside a DLL

Open the Cryptography.dll file in dnSpy. The PARAM value can be decoded with this Decode6bit() function found in EncodeUtilscs: public static string Decode6bit(string input) { string value = ...
Biswapriyo's user avatar
  • 1,569
2 votes
Accepted

Reversing C# exe,Questions.Help

Those numbers are metadata and is called Token IDs. You can click on those in the dnSpy and you will be taken to the editor of the selected item. As for your first question, remember that .net apps ...
Paweł Łukasik's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible