Registration Code (Part 1): w%kQ6
Registration Code (Part 2): b<#$1[*(cw~
In order to register on this forum, you must use the codes above. Combine them into one code (copy paste).

Steamless under Linux/Mono

SteamStub DRM remover that unpacks SteamStub DRM protected games.
Post Reply
kornos
Posts: 2
Joined: Mon Jan 16, 2017 8:34 pm

Steamless under Linux/Mono

Post by kornos » Mon Jun 05, 2017 9:35 am

Hello At0m0s

I am trying to port Steamless under Linux/Mono. I am using Mono 5.0.1 (Roslyn compiler).
The (modified) source is compiling, however the program crashes under Mono.
I think it has to do something with the marshalling of the structure when using LayoutKind.Explicit.

I managed to reproduce the problem using this testcase: https://pastebin.com/8uZ1qG42
It compiles fine on win and linux , runs ok on win , but it crashes under linux.

Can you shed some light on this problem? It is a mono bug?
Can I replace Layout.Kind.Explicit with LayoutKind.Sequential,Pack=1 or the alignment will be compromised?

Thanks a lot.
User avatar
atom0s
Site Admin
Posts: 401
Joined: Sun Jan 04, 2015 11:23 pm
Location: 127.0.0.1
Contact:

Re: Steamless under Linux/Mono

Post by atom0s » Mon Jun 05, 2017 10:00 am

I can't assist with the Mono/Linux aspect of this since I don't use either of them. I do know Mono has its limitations on what it will and wont allow from the normal .NET framework. So this could be a limitation on that regard.

Mono has a page covering interop here:
http://www.mono-project.com/docs/advanced/pinvoke/

It may have something useful in it to determine what kind of bug you may be hitting.

As for changing the layout kind, you could try 'LayoutKind.Sequential, Pack = 1' as it should have a similar result to what the explicit version is doing with the field offsets. Another thing that could be done instead of using the structure is manually reading the information from the data since the offsets are considered 'well-known' and not going to change for Windows PE file format.
Derp~
Need a great web host? Check out: AnHonestHost.com


Donations can be made via Paypal:
https://www.paypal.me/atom0s
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest