Add files via upload

This commit is contained in:
NintenHero 2024-03-06 16:40:07 -06:00 committed by GitHub
parent 4866a75b30
commit 3c129b2505
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 59 additions and 0 deletions

25
Program.cs Normal file
View File

@ -0,0 +1,25 @@
using System.IO;
namespace Warrecs_2_Extractor
{
class Program
{
static void Main(string[] args)
{
BinaryReader br = new BinaryReader(File.OpenRead(args[0]));
Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "//" + Path.GetExtension(args[0]));
int i = 0;
while (br.BaseStream.Position < br.BaseStream.Length)
{
using FileStream FS = File.Create(Path.GetDirectoryName(args[0]) + "//" + Path.GetExtension(args[0]) + "//" + i);
BinaryWriter bw = new(FS);
var variable = br.ReadBytes(4);
System.Array.Reverse(variable);
int size = System.BitConverter.ToInt32(variable, 0);
bw.Write(br.ReadBytes(size));
bw.Close();
i++;
}
}
}
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Warrecs_2_Extractor</RootNamespace>
</PropertyGroup>
</Project>

25
Warrecs-2-Extractor.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.34407.143
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Warrecs-2-Extractor", "Warrecs-2-Extractor.csproj", "{EEC2B9CA-70B3-47ED-A2D5-155D38D80D59}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EEC2B9CA-70B3-47ED-A2D5-155D38D80D59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEC2B9CA-70B3-47ED-A2D5-155D38D80D59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEC2B9CA-70B3-47ED-A2D5-155D38D80D59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEC2B9CA-70B3-47ED-A2D5-155D38D80D59}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8C84D2DB-0693-4142-9638-DFC35F984374}
EndGlobalSection
EndGlobal