<
Try decompiling osu!

Understanding the general structure of the game

2023/12/23

Introduction

Image upload successful! File name: Image upload successful! File name: Image upload successful! File name: Image upload successful! File name: 6d88eff9e63ee67be2a79b842a23bc2c_vLAhcBNemu.png

osu! is a rhythm game written in .Net C#. And I love osu!<3

Why did I try to decompile? The reason is the custom client. The famous ones are Auto+ and Akatsuki.

However, the source code is not public, so I cannot access the root of the game.

I'm just curious to see how the customization is done.

Just to be clear, I have no intention of rebuilding osu!.

The purpose is to understand the general structure of the game, so I will not write about modifying the program or cheating.

Remove obfuscation

If you try to restore the source code of osu! with DnSpy or similar, you will get messy identifier names, and all string constants will be hidden in a large obfuscated binary blob.

Yup. It's unreadable.

This is called obfuscating, and is one way of hiding the source code.

That's where de4dot comes in.

To use, just build it from the source code and load it in the application.

If you are using the latest version of osu!, an error may occur. We recommend using a version between 2016 and mid-2019 or a fallback version.

The obfuscation used varies depending on the version. Eazfuscator was used for obfuscation this time.

ConfuserEx2 was used depending on the version.

If successful, an application with the name osu!-cleaned.exe should be ejected.

If you load this, you should be able to see clean code, unlike the obfuscated version.

However, the obfuscation was not completely removed, and when I tried to export the deobfuscated code to VS (Visual Studio) using the DnSpy function,

There were over 4,000 errors in the entire project. Depending on the version, there could be anywhere from 1,000 to nearly 12,000, depending on what was used for obfuscation.

There may be differences.