parent
92c6b8a0bd
commit
ebc6bcf110
Binary file not shown.
@ -0,0 +1,235 @@ |
||||
Back_ThanksGiving_2010_01_1 |
||||
Back_AquariusSeal01_1 |
||||
Back_NeptuneSeal01_1 |
||||
Back_Milk01_1 |
||||
Back_TombRaider02 |
||||
Back_TombRaider01_1 |
||||
Back_SnowBoader01_2 |
||||
Back_SnowBoader02_2 |
||||
Back_SnowBoader03_2 |
||||
Back_SnowBoader04_2 |
||||
Back_TennisGold01_2 |
||||
Back_TennisSilver01_2 |
||||
Back_TennisBlue01_2 |
||||
Back_SkelWing01_3 |
||||
Back_Ankh_3 |
||||
Back_CurseBear_P |
||||
Back_CurseRabbit_P |
||||
Back_Xmas_14_P |
||||
Back_LoveWitchPotion_P |
||||
Back_LoveWitchBroom_P |
||||
TravelerBag08_2 |
||||
Back_Collect04 |
||||
Back_CollectS02 |
||||
Cos_Cupid01_1 |
||||
Back_CupidArrow01_2 |
||||
Cos_Rainy01_1 |
||||
Back_Rainy01_1 |
||||
Cos_TanktopArch01_2 |
||||
Cos_TanktopKebing01_2 |
||||
Cos_TanktopPhouch01_2 |
||||
Cos_TombRaiderShirt02 |
||||
Hat_TombRaider02 |
||||
Glas_TombRaider02 |
||||
Cos_TombRaiderPants02 |
||||
Cos_TombRaiderBoots02 |
||||
Cos_PumpkinKitty01_1 |
||||
Hat_PumpkinKitty01_1 |
||||
Cos_Harvest01_2 |
||||
Hat_Harvest01_2 |
||||
E_XCos_SnowMan |
||||
Cos_TennisA01_2 |
||||
Cos_CottonCandy01_3 |
||||
Cos_Couple01_3 |
||||
Cos_DarkBlue00_3 |
||||
Cos_UrgSchool01_3 |
||||
Cos_Gamble01_4 |
||||
Hat_Gamble01 |
||||
Glas_Gamble01 |
||||
Cos_Gamble02_4 |
||||
Cos_Ceremony01_3 |
||||
Cos_FriendTWhiteA01 |
||||
Cos_FriendTYellowA01 |
||||
Cos_FriendTBlueA01 |
||||
Cos_FriendTRedA01 |
||||
Cos_FriendTBlackA01 |
||||
Cos_Musketeer_3 |
||||
Hat_Musketeer_3 |
||||
Hat_EgyptWolf_3 |
||||
Hat_EgyptFox_3 |
||||
Cos_Egypt_3 |
||||
Cos_Doctor_3 |
||||
Hat_Doctor_3 |
||||
Back_Doctor_3 |
||||
Cos_Ronin_P |
||||
Hat_Ronin_P |
||||
Cos_SportsA01_4 |
||||
Cos_BoopA02_1 |
||||
Cos_Xmas00_2 |
||||
Cos_Xmas01_2 |
||||
Cos_Xmas02_2 |
||||
Cos_Xmas03_2 |
||||
Cos_Xmas04_4 |
||||
EarthDayTShirtA00_1 |
||||
Cos_GMT00 |
||||
Cos_VioletOutsparkT00 |
||||
Cos_GreenOutsparkT00 |
||||
Cos_GreyOutsparkT00 |
||||
Cos_Slumber02_A |
||||
Cos_Ninja02_1 |
||||
Hat_Ninja02_1 |
||||
Cos_camouflageA01 |
||||
Cos_Xmas04_6 |
||||
Hat_Xmas04_4 |
||||
Cos_TilaTankTopsA01 |
||||
Cos_RideDieShirt00_1 |
||||
Cos_TPainTankTops00_1 |
||||
Cos_JackO01_8 |
||||
Cos_InGameShirt02 |
||||
Cos_Uniform_ARG_Shirt01_2 |
||||
Cos_Uniform_BRA_Shirt01_2 |
||||
Cos_Uniform_DEN_Shirt01_2 |
||||
Cos_Uniform_ENG_Shirt01_2 |
||||
Cos_Uniform_ESP_Shirt01_2 |
||||
Cos_Uniform_FRA_Shirt01_2 |
||||
Cos_Uniform_GER_Shirt01_2 |
||||
Cos_Uniform_GRE_Shirt01_2 |
||||
Cos_Uniform_ITA_Shirt01_2 |
||||
Cos_Uniform_MEX_Shirt01_2 |
||||
Cos_Uniform_NED_Shirt01_2 |
||||
Cos_Uniform_POR_Shirt01_2 |
||||
Cos_Uniform_SUI_Shirt01_2 |
||||
Cos_Uniform_USA_Shirt01_2 |
||||
KDSoccer_SportsA |
||||
Cos_CollectS02 |
||||
Cos_CollectS02 |
||||
Hat_CollectS02 |
||||
Back_CollectS02 |
||||
Glas_Evergreen01_2 |
||||
Glas_Boader01_2 |
||||
Hat_Boader01_2 |
||||
Glas_Boader01_2 |
||||
Back_SnowBoader01_2 |
||||
Mask_Dance01_2 |
||||
Mask_Stoic00_1 |
||||
Glas_Gauze01_3 |
||||
Mask_Foras01 |
||||
Glas_Kei01_3 |
||||
Cuglasses05_4 |
||||
Glas_Shamrock_P |
||||
OneEyed00_6 |
||||
HyunmooMask00_6 |
||||
HolyLightMask00_1 |
||||
BugbearMask03_1 |
||||
HallowMask00 |
||||
AnbooCatMask00 |
||||
SoulDevourerMask00 |
||||
Mask_Halloween2015 |
||||
Anti_HenisHat04 |
||||
Hat_Panda01_1 |
||||
Hat_Snowman02_1 |
||||
Hat_Santa_2010_01_1 |
||||
Hat_LuckyClover01_1 |
||||
Hat_Jester01_2 |
||||
Hat_Bells01_1 |
||||
Hat_Cow01_1 |
||||
Hat_Steampunk01_2 |
||||
Hat_Seal01_2 |
||||
Hat_Steampunk02 |
||||
Hat_Reed01 |
||||
Hat_Football01_3 |
||||
Hat_Fedora01_1 |
||||
Hat_Shamrock01_2 |
||||
Hat_FiestaParty01_2 |
||||
Hat_Viking01_2 |
||||
Hat_FiestaCap01_2 |
||||
Hat_FrogPrince00_2 |
||||
Hat_Scarecrow01_2 |
||||
Hat_Xmas05_3 |
||||
Hat_Harmony01_3 |
||||
Hat_Marine01_3 |
||||
Hat_Pirate03_4 |
||||
Hat_Victorian_3 |
||||
Hat_Fez_3 |
||||
Hat_Turban_3 |
||||
Hat_EgyptWolf_3 |
||||
Hat_EgyptFox_3 |
||||
Hat_Ronin_P |
||||
Hat_Xmas_14_Santa_P |
||||
Hat_LoveWitch_P |
||||
Hat_Xmas01_5 |
||||
Hat_Xmas02_4 |
||||
Hat_Xmas03_4 |
||||
Hat_Xmas04_4 |
||||
Hat_Chipao01_1 |
||||
Hat_Tkorea01_1 |
||||
Hat_Liberty00_1 |
||||
Hat_DunceCap00 |
||||
Hat_Mara03_1 |
||||
Hat_Ninja02_1 |
||||
Hat_HallGhost02_1 |
||||
Hat_HallKaby02_1 |
||||
Hat_HallPumpkin01_1 |
||||
Hat_Tiger02_1 |
||||
Hat_Military01 |
||||
Hat_Mightywing01_7 |
||||
Hat_Skull02_3 |
||||
Hat_DemonH04_1 |
||||
Hat_TwinsAngel05_2 |
||||
Hat_Ninja03 |
||||
Hat_CLion02_1 |
||||
Hat_WPhoenix04_1 |
||||
Hat_Mighty04_2 |
||||
Hat_GreenAfro00_1 |
||||
Hat_TPainCircus00_1 |
||||
GrimjawMask00 |
||||
Hat_Dragon04_1 |
||||
Hat_Uniform01_1 |
||||
Hat_Uniform02_1 |
||||
Hat_Uniform03_1 |
||||
Hat_RMightywing00 |
||||
Hat_TombRaider01_1 |
||||
Cos_Mask01_1 |
||||
Cos_Mask00_1 |
||||
Hat_Collect04 |
||||
Hat_Cranium01 |
||||
H_PotOGold01 |
||||
H_WaterPark01_2 |
||||
H_SnowBoot01_1 |
||||
H_BrickSchool01_1 |
||||
H_Biscuit01_1 |
||||
H_Haunted01_3 |
||||
H_JackBox01_3 |
||||
H_Light_P |
||||
LibertyHouse00_1 |
||||
MiniReindeer01_1 |
||||
MiniGingerBread01_1 |
||||
MiniSteampunk01_1 |
||||
MiniBalloon04 |
||||
MiniGold01_2 |
||||
MiniSilver01_2 |
||||
MiniBronze01_2 |
||||
MiniBobu01_3 |
||||
MiniBalloon05 |
||||
MiniTiros_U |
||||
E_XMiniRudolph |
||||
E_XMiniSanta |
||||
Mask_Santa01 |
||||
Mask_Beard01_3 |
||||
ZebraColl01_3 |
||||
MiniRudolph01_3 |
||||
MiniSanta01_4 |
||||
TigerColl01_3 |
||||
RedColl01_3 |
||||
GoldColl01_3 |
||||
ThoroColl01_3 |
||||
FireColl01_3 |
||||
WoodenHorse02_3 |
||||
WoodenHorse03_3 |
||||
WoodenHorse04_3 |
||||
M_Collect_Coll |
||||
M_Collect_WhiteColl |
||||
M_Collect_BlackColl |
||||
M_Collect_Hobby |
||||
M_Collect_WhiteHobby |
||||
M_Collect_BlackHobby |
@ -0,0 +1,103 @@ |
||||
#include <vector> |
||||
#include <cstddef> |
||||
#include <fstream> |
||||
#include <iostream> |
||||
|
||||
typedef std::byte byte; |
||||
|
||||
class SHNFile{ |
||||
std::vector<byte>cryptHeader; |
||||
std::vector<byte>data; |
||||
std::vector<byte>ReadBytes(std::ifstream&file,int bytes){ |
||||
std::vector<byte>byteArr; |
||||
for(int i=0;i<bytes;i++){ |
||||
if(!file.eof()){ |
||||
byteArr.push_back(byte(file.get())); |
||||
} else { |
||||
break; |
||||
} |
||||
} |
||||
return byteArr; |
||||
} |
||||
int ReadInt32(std::ifstream&file){ |
||||
std::vector<byte>intBytes=ReadBytes(file,4); |
||||
int numb = int(intBytes[3])<<24|int(intBytes[2])<<16|int(intBytes[1])<<8|int(intBytes[0]); |
||||
return numb; |
||||
} |
||||
void Decrypt(){ |
||||
byte num = byte(data.size()); |
||||
for(int i=data.size()-1;i>=0;i--){ |
||||
data[i] = byte(data[i]^num); |
||||
byte num3 = byte(i); |
||||
num3 = byte(num3&byte(15)); |
||||
num3 = byte(int(num3)+0x55); |
||||
num3 = byte(num3 ^ (byte((int(byte(i))*11)))); |
||||
num3 = byte(num3^num); |
||||
num3 = byte(int(num3)^170); |
||||
num = num3; |
||||
} |
||||
} |
||||
int marker=0; |
||||
std::vector<byte>ReadBytes(int bytes){ |
||||
std::vector<byte>byteArr; |
||||
for(int i=0;i<bytes;i++){ |
||||
if(marker<data.size()){ |
||||
byteArr.push_back(data[marker]); |
||||
marker++; |
||||
} else { |
||||
break; |
||||
} |
||||
} |
||||
return byteArr; |
||||
} |
||||
uint32_t ReadUInt32(){ |
||||
std::vector<byte>intBytes=ReadBytes(4); |
||||
uint32_t numb = uint32_t(intBytes[3])<<24|uint32_t(intBytes[2])<<16|uint32_t(intBytes[1])<<8|uint32_t(intBytes[0]); |
||||
return numb; |
||||
} |
||||
int ReadInt32(){ |
||||
std::vector<byte>intBytes=ReadBytes(4); |
||||
int numb = int(intBytes[3])<<24|int(intBytes[2])<<16|int(intBytes[1])<<8|int(intBytes[0]); |
||||
return numb; |
||||
} |
||||
struct Column{ |
||||
std::string name; |
||||
uint32_t type; |
||||
int length; |
||||
}; |
||||
std::string ReadString(int bytes){ |
||||
std::vector<byte>strBytes=ReadBytes(bytes); |
||||
std::string str; |
||||
for(int i=0;i<strBytes.size();i++){ |
||||
str+=unsigned char(strBytes[i]); |
||||
} |
||||
return str; |
||||
} |
||||
uint32_t header,recordCount,defaultRecordLength,columnCount; |
||||
std::vector<Column>columns; |
||||
public: |
||||
SHNFile(std::string file){ |
||||
std::ifstream f(file,std::ios::binary); |
||||
cryptHeader=ReadBytes(f,0x20); |
||||
data=ReadBytes(f,ReadInt32(f)-0x24); |
||||
Decrypt(); |
||||
header=ReadUInt32(); |
||||
recordCount=ReadUInt32(); |
||||
defaultRecordLength=ReadUInt32(); |
||||
columnCount=ReadUInt32(); |
||||
|
||||
int num2=2; |
||||
for(int i=0;i<columnCount;i++){ |
||||
Column columnData; |
||||
columnData.name=ReadString(0x30); |
||||
columnData.type=ReadUInt32(); |
||||
columnData.length=ReadInt32(); |
||||
num2+=columnData.length; |
||||
columns.push_back(columnData); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
int main(){ |
||||
SHNFile shn("AbState.shn"); |
||||
} |
@ -0,0 +1 @@ |
||||
#pragma once |
@ -0,0 +1,142 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<VCProjectVersion>16.0</VCProjectVersion> |
||||
<Keyword>Win32Proj</Keyword> |
||||
<ProjectGuid>{e2ea580c-4690-455e-88f1-83eb684912cd}</ProjectGuid> |
||||
<RootNamespace>SHNFileDecryptor</RootNamespace> |
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<PlatformToolset>v143</PlatformToolset> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<PlatformToolset>v143</PlatformToolset> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<PlatformToolset>v143</PlatformToolset> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<PlatformToolset>v143</PlatformToolset> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="Shared"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<SDLCheck>true</SDLCheck> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<ConformanceMode>true</ConformanceMode> |
||||
<LanguageStandard>stdcpp17</LanguageStandard> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<ConformanceMode>true</ConformanceMode> |
||||
<LanguageStandard>stdcpp17</LanguageStandard> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<SDLCheck>true</SDLCheck> |
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<ConformanceMode>true</ConformanceMode> |
||||
<LanguageStandard>stdcpp17</LanguageStandard> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<ConformanceMode>true</ConformanceMode> |
||||
<LanguageStandard>stdcpp17</LanguageStandard> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemGroup> |
||||
<ClCompile Include="SHNFileDecryptor.cpp" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ClInclude Include="SHNFileDecryptor.h" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
</ImportGroup> |
||||
</Project> |
Loading…
Reference in new issue