diff --git a/SHNFileDecryptor.sln b/SHNFileDecryptor.sln new file mode 100644 index 0000000..4b49dee --- /dev/null +++ b/SHNFileDecryptor.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33516.290 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SHNFileDecryptor", "SHNFileDecryptor\SHNFileDecryptor.vcxproj", "{E2EA580C-4690-455E-88F1-83EB684912CD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E2EA580C-4690-455E-88F1-83EB684912CD}.Debug|x64.ActiveCfg = Debug|x64 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Debug|x64.Build.0 = Debug|x64 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Debug|x86.ActiveCfg = Debug|Win32 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Debug|x86.Build.0 = Debug|Win32 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Release|x64.ActiveCfg = Release|x64 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Release|x64.Build.0 = Release|x64 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Release|x86.ActiveCfg = Release|Win32 + {E2EA580C-4690-455E-88F1-83EB684912CD}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {56AF938B-502A-4253-955B-C9BBE1A57F4E} + EndGlobalSection +EndGlobal diff --git a/SHNFileDecryptor/AbState.shn b/SHNFileDecryptor/AbState.shn new file mode 100644 index 0000000..4d96d5c Binary files /dev/null and b/SHNFileDecryptor/AbState.shn differ diff --git a/SHNFileDecryptor/MehPool.txt b/SHNFileDecryptor/MehPool.txt new file mode 100644 index 0000000..c9bb3ae --- /dev/null +++ b/SHNFileDecryptor/MehPool.txt @@ -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 \ No newline at end of file diff --git a/SHNFileDecryptor/SHNFileDecryptor.cpp b/SHNFileDecryptor/SHNFileDecryptor.cpp new file mode 100644 index 0000000..2369308 --- /dev/null +++ b/SHNFileDecryptor/SHNFileDecryptor.cpp @@ -0,0 +1,103 @@ +#include +#include +#include +#include + +typedef std::byte byte; + +class SHNFile{ + std::vectorcryptHeader; + std::vectordata; + std::vectorReadBytes(std::ifstream&file,int bytes){ + std::vectorbyteArr; + for(int i=0;iintBytes=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::vectorReadBytes(int bytes){ + std::vectorbyteArr; + for(int i=0;iintBytes=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::vectorintBytes=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::vectorstrBytes=ReadBytes(bytes); + std::string str; + for(int i=0;icolumns; +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 + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {e2ea580c-4690-455e-88f1-83eb684912cd} + SHNFileDecryptor + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp17 + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp17 + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp17 + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + stdcpp17 + + + Console + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/SHNFileDecryptor/SHNFileDecryptor.vcxproj.filters b/SHNFileDecryptor/SHNFileDecryptor.vcxproj.filters new file mode 100644 index 0000000..1529261 --- /dev/null +++ b/SHNFileDecryptor/SHNFileDecryptor.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file