0

There is a tool called LuteBot which is used in the game Mordhau to be able to make the player play midi files with the in game lute.

In the tool you need to specify the location of the file DefaultInput.ini from the game.

However, the tool does not work anymore since the game was updated and renamed the file "DefaultInput.ini" to "Input.ini". The tool still listens for the file "DefaultInput.ini" and if you try to add the location of "Input.ini" then you see an error message saying

Please select the file "DefaultInput.ini

enter image description here

Is there a way to change the .exe to make it look for Input.ini instead of DefaultInput.ini?

I only found the text "DefaultInput" two times, it looks like those are methods:

enter image description here

openDefaultInputiniToolStripMenuItem
setDefaultInputiniLocationToolStripMenuItem

I figured it out by doing this:

  • press Alt + E
  • find your exe file. select it right click and select View executable file.
  • press CTRL + B and searched for "DefaultInput"
  • 1
    First of all, try the easiest approach, run strings on the executable and grep for the string (strings lutebot.exe | grep -i defaultinput.ini). If you can't find it, then the text is probably obfuscated. Place a break point on CreateFile or other file opening functions and look for where the string is being passed from. You can also backtrack using the stack when the message box gets displayed to see from where it branched from, place a break point, restart the program and keep on doing that till you find from where it passes the string. – shebaw Mar 26 at 4:41
1

Googling it, it's actually an opensource software. Here is the link. Path resolution is done at line 90 in LuteBot/IO/Files/SaveManager.cs. Change the name of the ini file there.

If you just want to patch the string in the binary, make sure you search for unicode strings since C# will use unicode strings by default.

| improve this answer | |
  • Good to know, but im still interested if this would be possible by using a debugger, since not every software is open source. Thanks! – Black Mar 26 at 12:34
  • 1
    Checkout the comment I made in your question then. – shebaw Mar 28 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.