Loading...
  OR  Zero-K Name:    Password:   

Reverse engineering a DLL file

15 posts, 1667 views
Post comment
Filter:    Player:  
sort
Hiho,
I need a help in reverse engineering a .dll C# code mod to Cities:Skylines.

I need it, cuz Ive got a box (DVD) game copy, and most of wubs creating mods for the game require me to be subscribed to the mod in Steam Workshop in order for them to work. Unfortunately, steam wont allow me to download a mod for C:S unless I've bought the game form Steam...

So I got myself a source code for one of the mods (wasn't haard to find) and I even found a piece of code responsible for checking if it's in Steam folder (at least I think I did). But now I end up with a bunch of .cs files, and Ive got no idea what to do with them, so they become a .dll file.

Anyone can help?
+0 / -0


6 years ago
I'm not familiar with cities skylines modding but I don't see why your trying to compile it yourself, why not just download the mod directly? http://smods.ru/archives/46735
+0 / -0
Doesn't work, quite a few mods have some sort of sorcery built in, so they check if Steam is on, or if they are in Steam Workshop folder (mods in this folder won't work for non Steam copy of game) etc.

I just need to know what to do with those .cs files so they become a .DLL

Should I combine them somehow? Should I just copy - paste the code from cs files and put them into MS Visual Studio? If yes, how? In what order? :D I can't find any tutorial on the web how to convert source code file (I suppose that's what cs file is) into DLL. And especially, a lot of cs files into one DLL. And I suppose people here should know more than me. :D
+0 / -0
6 years ago
quote:
But now I end up with a bunch of .cs files, and Ive got no idea what to do with them, so they become a .dll file.

Download visual studio express and compile them
+1 / -0
Thanks, ElNobero, I already knew that. The problem is there are a bunch of cs files, and the only tutorial I found are those where I need to type my own code. No tutorials for pirating a game mod.

I guess I'd be easier to just buy the game again o. Steam, but hell, no, I'm not giving another $100 for the same shit again, just so Valve can keep up with its monopoly on games.
+0 / -0
6 years ago
Btw, what you are trying to do it called "compiling from source" not "reverse engineering". Reverse engineering code is something else entirely.
+4 / -0
6 years ago
Hopefully, you have more than just a bunch of .cs files. They need to be in a project that you can build. See if this helps you get the general idea: Setting Up Visual Studio. You can use the .sin file in the source code directory to help set everything up automagically.
+0 / -0


6 years ago
And don't forget there may be dependencies to external libraries...
+0 / -0


6 years ago
I've once used dnSpy to edit a kerbal space program mod to fix a bug, it was a bit of a pain but faster than setting everything up to compile from source. So that's quite doable.
May have been something other than dnSpy, was a while ago.
+0 / -0

6 years ago
It will depend on at least some of the game's DLLs. All of this should be automatically complaining to you if you have a .sln when you open it with visual studio
+0 / -0
just a nitpick: if the sourcecode is on github, you're not pirating the mod. a precompiled version is just for convenience.
what exactly happens if you install the mod without the Steam details?
I searched for some information on C:S modding and it looks like the game is made in Unity, so it should work fine on it's own.
as you have the source available, you won't need to decompile, you'll only need to open the included .sln in Visual Studio and compile,then move the resulting file to the correct directory,which may be a directory unrelated to Steam depending on the software.
+0 / -0
Sorry, I had not time to respond for a few days.

Ive found the sln file, but after running it, VS shows an error which says taht I miss a .csproj file.
Ive found that .csproj file should be automaticaly created as it contains inforamtions what files should be in the project blah blah.

Any idea what to do, can I recreate it, or it's hopeless unless the developer provides this file too?

RUrankAdminikinz , thanks, looks promising I'll test it in the evening
+0 / -0
6 years ago
Is it complaining about SkyTools missing? You need to get those, too.
+0 / -0
6 years ago
just incase this helps .. you can download mods for many steam games using this http://steamworkshopdownloader.com/
+0 / -0
6 years ago
Okay, so I edited the file using dnSpy, but when I try to compile it again, dnSpy compalins about missing strings or references. Just pops up a buinch of bugs.

IT even does so when I try to compile unchanged code.

So either my dnSpy is broken, or the code for the mod is so messy taht dnSpy cant handle it, or im missing somtehing...
+0 / -0