Skip to content

Commit 09a5b04

Browse files
committed
Fix unpacking DSII SotFS .bdt files
1 parent 0798803 commit 09a5b04

File tree

12 files changed

+33
-37
lines changed

12 files changed

+33
-37
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*.user
77
*.sln.docstates
88

9+
.vs/
10+
911
# Build results
1012
[Dd]ebug/
1113
[Dd]ebugPublic/

BinderTool.Core/Bhd5/Bhd5BucketEntry.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ public static Bhd5BucketEntry Read(Stream inputStream)
1717
BinaryReader reader = new BinaryReader(inputStream, Encoding.UTF8, true);
1818
result.FileNameHash = reader.ReadUInt32();
1919
result.FileSize = reader.ReadInt32();
20-
result.FileOffset = reader.ReadUInt32();
21-
reader.Skip(4);
22-
int saltedHashOffset = reader.ReadInt32();
23-
reader.Skip(4);
24-
int aesKeyOffset = reader.ReadInt32();
25-
reader.Skip(4);
20+
result.FileOffset = reader.ReadInt64();
21+
long saltedHashOffset = reader.ReadInt64();
22+
long aesKeyOffset = reader.ReadInt64();
2623

2724
if (saltedHashOffset != 0)
2825
{

BinderTool.Core/BinderTool.Core.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>BinderTool.Core</RootNamespace>
1111
<AssemblyName>BinderTool.Core</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1515
<RestorePackages>true</RestorePackages>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<DebugSymbols>true</DebugSymbols>
@@ -32,8 +33,8 @@
3233
<WarningLevel>4</WarningLevel>
3334
</PropertyGroup>
3435
<ItemGroup>
35-
<Reference Include="BouncyCastle.Crypto">
36-
<HintPath>..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll</HintPath>
36+
<Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
37+
<HintPath>..\packages\BouncyCastle.1.8.1\lib\BouncyCastle.Crypto.dll</HintPath>
3738
</Reference>
3839
<Reference Include="ICSharpCode.SharpZipLib">
3940
<HintPath>..\packages\ICSharpCode.SharpZipLib.dll.0.85.4.369\lib\net20\ICSharpCode.SharpZipLib.dll</HintPath>

BinderTool.Core/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
[assembly: AssemblyCulture("")]
1212
[assembly: ComVisible(false)]
1313
[assembly: Guid("615e60b8-3eb0-4f54-ad9b-4fa1a9fe0df0")]
14-
[assembly: AssemblyVersion("0.3.0.0")]
15-
[assembly: AssemblyFileVersion("0.3.0.0")]
14+
[assembly: AssemblyVersion("0.3.1.0")]
15+
[assembly: AssemblyFileVersion("0.3.1.0")]

BinderTool.Core/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="BouncyCastle" version="1.7.0" targetFramework="net45" />
3+
<package id="BouncyCastle" version="1.8.1" targetFramework="net45" />
44
<package id="ICSharpCode.SharpZipLib.dll" version="0.85.4.369" targetFramework="net45" />
55
</packages>

BinderTool/App.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
55
</startup>
6-
</configuration>
6+
</configuration>

BinderTool/BinderTool.csproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -9,11 +9,13 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>BinderTool</RootNamespace>
1111
<AssemblyName>BinderTool</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
1515
<RestorePackages>true</RestorePackages>
16-
<NuGetPackageImportStamp>abf6a274</NuGetPackageImportStamp>
16+
<NuGetPackageImportStamp>
17+
</NuGetPackageImportStamp>
18+
<TargetFrameworkProfile />
1719
</PropertyGroup>
1820
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1921
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -52,7 +54,6 @@
5254
</ItemGroup>
5355
<ItemGroup>
5456
<None Include="App.config" />
55-
<None Include="packages.config" />
5657
</ItemGroup>
5758
<ItemGroup>
5859
<ProjectReference Include="..\BinderTool.Core\BinderTool.Core.csproj">
@@ -65,19 +66,14 @@
6566
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
6667
</None>
6768
</ItemGroup>
68-
<ItemGroup>
69-
<Content Include="FodyWeavers.xml" />
70-
</ItemGroup>
7169
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7270
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
7371
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
7472
<PropertyGroup>
7573
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Aktivieren Sie die Wiederherstellung von NuGet-Paketen, um die fehlende Datei herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
7674
</PropertyGroup>
7775
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
78-
<Error Condition="!Exists('..\packages\Fody.1.28.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.28.3\build\Fody.targets'))" />
7976
</Target>
80-
<Import Project="..\packages\Fody.1.28.3\build\Fody.targets" Condition="Exists('..\packages\Fody.1.28.3\build\Fody.targets')" />
8177
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8278
Other similar extension points exist, see Microsoft.Common.targets.
8379
<Target Name="BeforeBuild">

BinderTool/FodyWeavers.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

BinderTool/Program.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,22 @@ private static bool TryGetFileExtension(string signature, out string extension)
173173
case "DCX\0":
174174
extension = ".dcx";
175175
return true;
176+
case "DDS ":
177+
extension = ".dds";
178+
return true;
176179
case "TAE ":
177180
extension = ".tae";
178181
return true;
182+
case "FSB5":
183+
extension = ".fsb";
184+
return true;
185+
case "fsSL":
179186
case "fSSL":
180187
extension = ".fssl";
181188
return true;
189+
case "MSB ":
190+
extension = ".msb";
191+
return true;
182192
case "TPF\0":
183193
extension = ".tpf";
184194
return true;

BinderTool/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
[assembly: AssemblyCulture("")]
1212
[assembly: ComVisible(false)]
1313
[assembly: Guid("5d388695-6078-4404-8f5a-0bb1a94df97b")]
14-
[assembly: AssemblyVersion("0.3.0.0")]
15-
[assembly: AssemblyFileVersion("0.3.0.0")]
14+
[assembly: AssemblyVersion("0.3.1.0")]
15+
[assembly: AssemblyFileVersion("0.3.1.0")]

0 commit comments

Comments
 (0)