1
0
Fork 0
mirror of https://github.com/atom0s/Steamless.git synced 2024-12-19 23:07:41 +01:00

Begin variant v1.0 x86 plugin support.

This commit is contained in:
atom0s 2022-03-25 18:52:33 -07:00
parent 9c16bcc8a5
commit 5c2c32cab4
No known key found for this signature in database
GPG key ID: 37D5FD3494D79AF8
4 changed files with 282 additions and 2 deletions

View file

@ -0,0 +1,137 @@
/**
* Steamless - Copyright (c) 2015 - 2022 atom0s [atom0s@live.com]
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to
* Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
*
* By using Steamless, you agree to the above license and its terms.
*
* Attribution - You must give appropriate credit, provide a link to the license and indicate if changes were
* made. You must do so in any reasonable manner, but not in any way that suggests the licensor
* endorses you or your use.
*
* Non-Commercial - You may not use the material (Steamless) for commercial purposes.
*
* No-Derivatives - If you remix, transform, or build upon the material (Steamless), you may not distribute the
* modified material. You are, however, allowed to submit the modified works back to the original
* Steamless project in attempt to have it added to the original project.
*
* You may not apply legal terms or technological measures that legally restrict others
* from doing anything the license permits.
*
* No warranties are given.
*/
namespace Steamless.Unpacker.Variant10.x86
{
using API;
using API.Events;
using API.Model;
using API.PE32;
using API.Services;
using System;
using System.Reflection;
[SteamlessApiVersion(1, 0)]
public class Main : SteamlessPlugin
{
/// <summary>
/// Internal logging service instance.
/// </summary>
private LoggingService m_LoggingService;
/// <summary>
/// Gets the author of this plugin.
/// </summary>
public override string Author => "atom0s";
/// <summary>
/// Gets the name of this plugin.
/// </summary>
public override string Name => "SteamStub Variant 1.0 Unpacker (x86)";
/// <summary>
/// Gets the description of this plugin.
/// </summary>
public override string Description => "Unpacker for the 32bit SteamStub variant 1.0.";
/// <summary>
/// Gets the version of this plugin.
/// </summary>
public override Version Version => Assembly.GetExecutingAssembly().GetName().Version;
/// <summary>
/// Internal wrapper to log a message.
/// </summary>
/// <param name="msg"></param>
/// <param name="type"></param>
private void Log(string msg, LogMessageType type)
{
this.m_LoggingService.OnAddLogMessage(this, new LogMessageEventArgs(msg, type));
}
/// <summary>
/// Initialize function called when this plugin is first loaded.
/// </summary>
/// <param name="logService"></param>
/// <returns></returns>
public override bool Initialize(LoggingService logService)
{
this.m_LoggingService = logService;
return true;
}
/// <summary>
/// Processing function called when a file is being unpacked. Allows plugins to check the file
/// and see if it can handle the file for its intended purpose.
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
public override bool CanProcessFile(string file)
{
try
{
// Load the file..
var f = new Pe32File(file);
if (!f.Parse() || f.IsFile64Bit() || !f.HasSection(".bind"))
return false;
// Obtain the bind section data..
var bind = f.GetSectionData(".bind");
// Attempt to locate the known v1.x signature..
var variant = Pe32Helpers.FindPattern(bind, "60 81 EC 00 10 00 00 BE ?? ?? ?? ?? B9 6A");
if (variant == -1)
return false;
return true;
}
catch
{
return false;
}
}
/// <summary>
/// Processing function called to allow the plugin to process the file.
/// </summary>
/// <param name="file"></param>
/// <param name="options"></param>
/// <returns></returns>
public override bool ProcessFile(string file, SteamlessOptions options)
{
// Parse the file..
this.File = new Pe32File(file);
if (!this.File.Parse())
return false;
return false;
}
/// <summary>
/// Gets or sets the file being processed.
/// </summary>
private Pe32File File { get; set; }
}
}

View file

@ -0,0 +1,40 @@
/**
* Steamless - Copyright (c) 2015 - 2022 atom0s [atom0s@live.com]
*
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to
* Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
*
* By using Steamless, you agree to the above license and its terms.
*
* Attribution - You must give appropriate credit, provide a link to the license and indicate if changes were
* made. You must do so in any reasonable manner, but not in any way that suggests the licensor
* endorses you or your use.
*
* Non-Commercial - You may not use the material (Steamless) for commercial purposes.
*
* No-Derivatives - If you remix, transform, or build upon the material (Steamless), you may not distribute the
* modified material. You are, however, allowed to submit the modified works back to the original
* Steamless project in attempt to have it added to the original project.
*
* You may not apply legal terms or technological measures that legally restrict others
* from doing anything the license permits.
*
* No warranties are given.
*/
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Steamless.Unpacker.Variant10.x86")]
[assembly: AssemblyDescription("Steamless SteamStub Variant 1.0 (x86) Unpacker")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCompany("atom0s")]
[assembly: AssemblyProduct("Steamless.Unpacker.Variant10.x86")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("02b58ab0-9b00-4b31-8d61-9d22d13d2c4a")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Steamless.Unpacker.Variant10.x86</RootNamespace>
<AssemblyName>Steamless.Unpacker.Variant10.x86</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Steamless\bin\x86\Debug\Plugins\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Steamless.API\Steamless.API.csproj">
<Project>{56c95629-3b34-47fe-b988-04274409294f}</Project>
<Name>Steamless.API</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30717.126
# Visual Studio Version 17
VisualStudioVersion = 17.1.32319.34
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steamless", "Steamless\Steamless.csproj", "{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}"
EndProject
@ -21,48 +21,96 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steamless.Unpacker.Variant3
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steamless.Unpacker.Variant20.x86", "Steamless.Unpacker.Variant20.x86\Steamless.Unpacker.Variant20.x86.csproj", "{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steamless.Unpacker.Variant10.x86", "Steamless.Unpacker.Variant10.x86\Steamless.Unpacker.Variant10.x86.csproj", "{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Debug|Any CPU.ActiveCfg = Debug|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Debug|Any CPU.Build.0 = Debug|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Debug|x86.ActiveCfg = Debug|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Debug|x86.Build.0 = Debug|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Release|Any CPU.ActiveCfg = Release|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Release|Any CPU.Build.0 = Release|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Release|x86.ActiveCfg = Release|x86
{10AC8FDE-09D9-47B4-AA89-BADC40EECAAB}.Release|x86.Build.0 = Release|x86
{56C95629-3B34-47FE-B988-04274409294F}.Debug|Any CPU.ActiveCfg = Debug|x86
{56C95629-3B34-47FE-B988-04274409294F}.Debug|Any CPU.Build.0 = Debug|x86
{56C95629-3B34-47FE-B988-04274409294F}.Debug|x86.ActiveCfg = Debug|x86
{56C95629-3B34-47FE-B988-04274409294F}.Debug|x86.Build.0 = Debug|x86
{56C95629-3B34-47FE-B988-04274409294F}.Release|Any CPU.ActiveCfg = Release|x86
{56C95629-3B34-47FE-B988-04274409294F}.Release|Any CPU.Build.0 = Release|x86
{56C95629-3B34-47FE-B988-04274409294F}.Release|x86.ActiveCfg = Release|x86
{56C95629-3B34-47FE-B988-04274409294F}.Release|x86.Build.0 = Release|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Debug|Any CPU.ActiveCfg = Debug|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Debug|Any CPU.Build.0 = Debug|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Debug|x86.ActiveCfg = Debug|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Debug|x86.Build.0 = Debug|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Release|Any CPU.ActiveCfg = Release|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Release|Any CPU.Build.0 = Release|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Release|x86.ActiveCfg = Release|x86
{97AC964A-E56F-415C-BAEA-D503E3D4D7B8}.Release|x86.Build.0 = Release|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Debug|Any CPU.ActiveCfg = Debug|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Debug|Any CPU.Build.0 = Debug|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Debug|x86.ActiveCfg = Debug|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Debug|x86.Build.0 = Debug|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Release|Any CPU.ActiveCfg = Release|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Release|Any CPU.Build.0 = Release|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Release|x86.ActiveCfg = Release|x86
{B6BB7A32-AB23-4A25-8914-154879AAD3FE}.Release|x86.Build.0 = Release|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Debug|Any CPU.ActiveCfg = Debug|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Debug|Any CPU.Build.0 = Debug|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Debug|x86.ActiveCfg = Debug|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Debug|x86.Build.0 = Debug|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Release|Any CPU.ActiveCfg = Release|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Release|Any CPU.Build.0 = Release|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Release|x86.ActiveCfg = Release|x86
{0F2FAE37-F898-4392-B4F6-711954BEEB4F}.Release|x86.Build.0 = Release|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Debug|Any CPU.ActiveCfg = Debug|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Debug|Any CPU.Build.0 = Debug|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Debug|x86.ActiveCfg = Debug|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Debug|x86.Build.0 = Debug|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Release|Any CPU.ActiveCfg = Release|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Release|Any CPU.Build.0 = Release|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Release|x86.ActiveCfg = Release|x86
{A40154CD-A0FD-4371-8099-CE277E0989AF}.Release|x86.Build.0 = Release|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Debug|Any CPU.ActiveCfg = Debug|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Debug|Any CPU.Build.0 = Debug|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Debug|x86.ActiveCfg = Debug|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Debug|x86.Build.0 = Debug|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Release|Any CPU.ActiveCfg = Release|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Release|Any CPU.Build.0 = Release|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Release|x86.ActiveCfg = Release|x86
{05F540FB-D14B-4966-8DE2-591B76361CF0}.Release|x86.Build.0 = Release|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Debug|Any CPU.ActiveCfg = Debug|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Debug|Any CPU.Build.0 = Debug|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Debug|x86.ActiveCfg = Debug|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Debug|x86.Build.0 = Debug|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Release|Any CPU.ActiveCfg = Release|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Release|Any CPU.Build.0 = Release|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Release|x86.ActiveCfg = Release|x86
{03621EAD-77A7-4208-AFDF-4B8292230A71}.Release|x86.Build.0 = Release|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Debug|Any CPU.ActiveCfg = Debug|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Debug|Any CPU.Build.0 = Debug|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Debug|x86.ActiveCfg = Debug|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Debug|x86.Build.0 = Debug|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Release|Any CPU.ActiveCfg = Release|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Release|Any CPU.Build.0 = Release|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Release|x86.ActiveCfg = Release|x86
{4F11F26D-2946-467F-A4E9-9E2A619A1FD3}.Release|x86.Build.0 = Release|x86
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Debug|x86.ActiveCfg = Debug|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Debug|x86.Build.0 = Debug|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Release|Any CPU.Build.0 = Release|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Release|x86.ActiveCfg = Release|Any CPU
{02B58AB0-9B00-4B31-8D61-9D22D13D2C4A}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE