Created
March 17, 2014 10:43
-
-
Save LordJZ/9597184 to your computer and use it in GitHub Desktop.
Hungry Shark Evolution save file encryption crack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Runtime.CompilerServices; | |
| using System.Runtime.Serialization; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace HungryShark.Evolution.Crack | |
| { | |
| class Binder : SerializationBinder | |
| { | |
| public override Type BindToType(string assemblyName, string typeName) | |
| { | |
| if (assemblyName != "Assembly-CSharp" && typeName != "PersistentData") | |
| throw new InvalidOperationException(); | |
| return typeof(PersistentData); | |
| } | |
| } | |
| [Serializable] | |
| class PersistentData : ISerializable | |
| { | |
| private SerializationInfo m_Info; | |
| public PersistentData() | |
| { | |
| PreDeserialization(); | |
| } | |
| public PersistentData(SerializationInfo info, StreamingContext sc) | |
| { | |
| PreDeserialization(); | |
| m_Info = info; | |
| } | |
| List<Tuple<string, object, Type>> m_data; | |
| public bool HasEverUnlockedKempyLab | |
| { | |
| get { return GetValue<bool>(); } | |
| set { SetValue(value); } | |
| } | |
| public int StandardCurrency | |
| { | |
| get { return GetValue<int>(); } | |
| set { SetValue(value); } | |
| } | |
| public int PremiumCurrency | |
| { | |
| get { return GetValue<int>(); } | |
| set { SetValue(value); } | |
| } | |
| T GetValue<T>([CallerMemberName] string name = null) | |
| { | |
| return (T)m_data.First(p => p.Item1 == name).Item2; | |
| } | |
| void SetValue<T>(T value, [CallerMemberName] string name = null) | |
| { | |
| for (int i = 0; i < m_data.Count; i++) | |
| { | |
| if (m_data[i].Item1 == name) | |
| { | |
| m_data[i] = Tuple.Create(name, (object)value, m_data[i].Item3); | |
| } | |
| } | |
| } | |
| public void GetObjectData(SerializationInfo info, StreamingContext sc) | |
| { | |
| foreach (Tuple<string, object, Type> tuple in m_data) | |
| { | |
| info.AddValue(tuple.Item1, tuple.Item2, tuple.Item3); | |
| } | |
| info.AssemblyName = "Assembly-CSharp"; | |
| info.FullTypeName = "PersistentData"; | |
| #region Deserialization | |
| //King instance = King._Instance; | |
| //FGAssert.Assert(instance != null); | |
| //FGAssert.Assert(instance._GameStats != null); | |
| //FGAssert.Assert(instance._MissionAchievementsManager != null); | |
| //FGAssert.Assert(instance._SharkStats != null); | |
| //FGAssert.Assert(instance._MuseumManager != null); | |
| //FGAssert.Assert(instance._InventoryManager != null); | |
| //info.AddValue("DecryptedOK", "YES"); | |
| //info.AddValue("VersionNumber", 9); | |
| //info.AddValue("CurrentLanguage", Localization.instance.currentLanguage); | |
| //for (GameStats.StatsType statsType = GameStats.StatsType.highestScore; statsType < GameStats.StatsType.eMaxStats; statsType++) | |
| //{ | |
| // info.AddValue("GameStats[" + statsType + "]", instance._GameStats.GetStat(statsType)); | |
| //} | |
| //info.AddValue("IsSoundOn", !GUIManager.Instance.IsSoundMuted); | |
| //info.AddValue("IsTilt", GameInput.m_controlMethod == ControlMethod.tilt); | |
| //info.AddValue("IsMouse", GameInput.m_controlMethod == ControlMethod.mouse); | |
| //info.AddValue("LastPlayed", DateTime.Today); | |
| //info.AddValue("DailyRewardLastCollected", BizLogic.m_dailyRewardLastCollected); | |
| //info.AddValue("FirstGame", BizLogic.m_firstGame); | |
| //info.AddValue("DailyRewardCounter", BizLogic.DailyRewardCounter); | |
| //info.AddValue("RatedThisApp", BizLogic.m_alreadyRated); | |
| //info.AddValue("HasEverLoggedInToFacebook", FGOLFacebookManager.m_hasEverLoggedIn); | |
| //info.AddValue("EvolveScreenVisits", BizLogic.m_evolveScreenVisits); | |
| //info.AddValue("FacebookLoginPrompts", BizLogic.m_facebookLoginPrompts); | |
| //info.AddValue("HasEverUnlockedKempyLab", BizLogic.m_hasEverUnlockedKempyLab); | |
| //instance._MissionAchievementsManager.ResolveMissionStatuses(true); | |
| //MissionStatus[][] missionStatus = instance._MissionAchievementsManager.m_missionStatus; | |
| //for (int i = 0; i < 8; i++) | |
| //{ | |
| // for (int j = 0; j < 9; j++) | |
| // { | |
| // info.AddValue(string.Concat(new object[] | |
| // { | |
| // "MissionStatus[", | |
| // i, | |
| // "][", | |
| // j, | |
| // "]" | |
| // }), (int)missionStatus[i][j]); | |
| // } | |
| //} | |
| //info.AddValue("NumSharks", 8); | |
| //for (int k = 0; k < 8; k++) | |
| //{ | |
| // SharkStats.Stats stats = instance._SharkStats.GetStats((SharkType)k); | |
| // string str = "SharkProgress[" + k + "]."; | |
| // info.AddValue(str + "BuyLocked", stats.progress.buyLocked); | |
| // info.AddValue(str + "PlayLocked", stats.progress.playLocked); | |
| // info.AddValue(str + "WasEarlyUnlocked", stats.progress.wasEarlyUnlocked); | |
| // info.AddValue(str + "SpeedLevel", stats.progress.speedLevel); | |
| // info.AddValue(str + "BiteLevel", stats.progress.biteLevel); | |
| // info.AddValue(str + "BoostLevel", stats.progress.boostLevel); | |
| // info.AddValue(str + "CurrentLevelGrowth", stats.progress.currentLevelGrowth); | |
| // info.AddValue(str + "SizeLevel", stats.progress.sizeLevel); | |
| // info.AddValue(str + "Growth", stats.progress.growth); | |
| //} | |
| //info.AddValue("CurrentSharkType", (int)instance._SharkStats.currentShark); | |
| //info.AddValue("LastPlayedBasicShark", (int)instance._SharkStats.lastPlayedBasicShark); | |
| //info.AddValue("LastPlayedNoveltyShark", (int)instance._SharkStats.lastPlayedNoveltyShark); | |
| //info.AddValue("StandardCurrency", instance._SharkStats.Currency); | |
| //info.AddValue("PremiumCurrency", instance._SharkStats.PremiumCurrency); | |
| //info.AddValue("CoinMultiplierEnabled", instance._SharkStats.CoinMultiplierEnabled); | |
| //info.AddValue("LastMegalodonVisibility", (int)instance._SharkStats.lastMegalodonVisibility); | |
| //MuseumManager.MuseumFish[] items = instance._MuseumManager.items; | |
| //for (int l = 0; l < items.Length; l++) | |
| //{ | |
| // info.AddValue("MuseumFish[" + items[l].EnglishName + "].TimesEaten", items[l].TimesEaten); | |
| // info.AddValue("MuseumFish[" + items[l].EnglishName + "].IsNew", items[l].IsNew); | |
| //} | |
| //InventoryManager inventoryManager = instance._InventoryManager; | |
| //int shopItemInteractionsCount = inventoryManager.TheInventory.GetShopItemInteractionsCount(); | |
| //info.AddValue("NumShopItemInteractions", shopItemInteractionsCount); | |
| //for (int m = 0; m < shopItemInteractionsCount; m++) | |
| //{ | |
| // InventoryManager.Inventory.ShopItemInteractions shopItemInteractions = inventoryManager.TheInventory.GetShopItemInteractions(m); | |
| // info.AddValue("ShopItemInteractions[" + m + "].name", shopItemInteractions.name); | |
| // info.AddValue("ShopItemInteractions[" + m + "].descriptionRead", shopItemInteractions.descriptionRead); | |
| //} | |
| //info.AddValue("FacebookPageLiked", FGOLFacebookManager.m_hasFacebookPageEverBeenLiked); | |
| //info.AddValue("PlushToyViewed", StoreMenuSheet.m_hasPlushToyLinkEverBeenViewed); | |
| //info.AddValue("NumInventoryItems", inventoryManager.TheInventory.m_items.Count); | |
| //for (int n = 0; n < inventoryManager.TheInventory.m_items.Count; n++) | |
| //{ | |
| // InventoryManager.Inventory.Item item = inventoryManager.TheInventory.m_items[n]; | |
| // info.AddValue("Inventory[" + n + "].Name", item.name); | |
| // info.AddValue("Inventory[" + n + "].Quantity", item.quantity); | |
| // info.AddValue("Inventory[" + n + "].Source", (int)item.m_sourceType); | |
| // info.AddValue("Inventory[" + n + "].IsEnabled", item.isEnabled); | |
| // for (int num = 0; num < 8; num++) | |
| // { | |
| // info.AddValue(string.Concat(new object[] | |
| // { | |
| // "Inventory[", | |
| // n, | |
| // "].IsEquipped[", | |
| // num, | |
| // "]" | |
| // }), item.isEquipped[num]); | |
| // } | |
| //} | |
| //info.AddValue("PermanentDeletedSpawners", SpawnerManager.GetPermanentDeletedSpawners()); | |
| //info.AddValue("GiantCrabLastKilledType", (int)GiantCrabSpawnerData.ms_lastKilledType); | |
| //info.AddValue("FGOLSocial.bestScore", FGOLSocial.m_bestScore); | |
| //Debug.Log("UNPOSTED SCORE FACEBOOK @ SAVE = " + FGOLSocial.m_unpostedScoreFacebook); | |
| //Debug.Log("UNPOSTED SCORE GAMECENTER @ SAVE = " + FGOLSocial.m_unpostedScoreGameCenter); | |
| //info.AddValue("FGOLSocial.unpostedScoreFacebook", FGOLSocial.m_unpostedScoreFacebook); | |
| //info.AddValue("FGOLSocial.unpostedScoreGameCenter", FGOLSocial.m_unpostedScoreGameCenter); | |
| //info.AddValue("FGOLSocial.unpostedAchievements", FGOLSocial.GetUnpostedAchievements()); | |
| //info.AddValue("FGOLAnalytics.utcFirstBootMillis", FGOLAnalytics.m_utcFirstBootMillis); | |
| //info.AddValue("FGOLAnalytics.Referrer", FGOLAnalytics.m_Referrer); | |
| //info.AddValue("FGOLAnalytics.IsPaidUser", FGOLAnalytics.m_IsPaidUser); | |
| //info.AddValue("FGOLAnalytics.UserGUID", FGOLAnalytics.m_UserGUID); | |
| //info.AddValue("FGOLAnalytics.UserGender", FGOLAnalytics.m_UserGender); | |
| //info.AddValue("FGOLAnalytics.UserAge", FGOLAnalytics.m_UserAge); | |
| //info.AddValue("FGOLAnalytics.UserFacebookID", FGOLAnalytics.m_UserFacebookID); | |
| //info.AddValue("FGOLAnalytics.Shark", FGOLAnalytics.m_Shark); | |
| //info.AddValue("FGOLAnalytics.SharkLevel", FGOLAnalytics.m_SharkLevel); | |
| //info.AddValue("FGOLAnalytics.GameLoopCount", FGOLAnalytics.m_GameLoopCount); | |
| //info.AddValue("FGOLAnalytics.GameDay", FGOLAnalytics.m_GameDay); | |
| //info.AddValue("FGOLAnalytics.DaysInARow", FGOLAnalytics.m_DaysInARow); | |
| //info.AddValue("FGOLAnalytics.TotalDollarsPurchased", FGOLAnalytics.m_TotalDollarsPurchased); | |
| //info.AddValue("FGOLAnalytics.TotalPurchaseCount", FGOLAnalytics.m_TotalPurchaseCount); | |
| //info.AddValue("FGOLAnalytics.TotalCoinsSpent", FGOLAnalytics.m_TotalCoinsSpent); | |
| //info.AddValue("FGOLAnalytics.TotalCoinsPurchased", FGOLAnalytics.m_TotalCoinsPurchased); | |
| //info.AddValue("FGOLAnalytics.TotalGemsSpent", FGOLAnalytics.m_TotalGemsSpent); | |
| //info.AddValue("FGOLAnalytics.TotalGemsPurchased", FGOLAnalytics.m_TotalGemsPurchased); | |
| //info.AddValue("FGOLAnalytics.TimeTotal", FGOLAnalytics.m_TimeTotal); | |
| //info.AddValue("FGOLAnalytics.ScoreTotal", FGOLAnalytics.m_ScoreTotal); | |
| //info.AddValue("FGOLAnalytics.GemsCollectedTotal", FGOLAnalytics.m_GemsCollectedTotal); | |
| //info.AddValue("FGOLAnalytics.CoinsCollectedTotal", FGOLAnalytics.m_CoinsCollectedTotal); | |
| //info.AddValue("FGOLAnalytics.SaveMeUseCount", FGOLAnalytics.m_SaveMeUseCount); | |
| //for (int num2 = 0; num2 < FGOLAnalytics.m_TimeShark.Length; num2++) | |
| //{ | |
| // info.AddValue("FGOLAnalytics.Shark[" + num2 + "].Time", FGOLAnalytics.m_TimeShark[num2]); | |
| // info.AddValue("FGOLAnalytics.Shark[" + num2 + "].Score", FGOLAnalytics.m_ScoreShark[num2]); | |
| // info.AddValue("FGOLAnalytics.Shark[" + num2 + "].CoinsCollected", FGOLAnalytics.m_CoinsCollectedShark[num2]); | |
| // info.AddValue("FGOLAnalytics.Shark[" + num2 + "].GemsCollected", FGOLAnalytics.m_GemsCollectedShark[num2]); | |
| // for (int num3 = 0; num3 < FGOLAnalytics.m_TimeSharkLevel.GetLength(1); num3++) | |
| // { | |
| // info.AddValue(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num2, | |
| // "][", | |
| // num3, | |
| // "].Time" | |
| // }), FGOLAnalytics.m_TimeSharkLevel[num2, num3]); | |
| // info.AddValue(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num2, | |
| // "][", | |
| // num3, | |
| // "].Score" | |
| // }), FGOLAnalytics.m_ScoreSharkLevel[num2, num3]); | |
| // info.AddValue(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num2, | |
| // "][", | |
| // num3, | |
| // "].CoinsCollected" | |
| // }), FGOLAnalytics.m_CoinsCollectedSharkLevel[num2, num3]); | |
| // info.AddValue(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num2, | |
| // "][", | |
| // num3, | |
| // "].GemsCollected" | |
| // }), FGOLAnalytics.m_GemsCollectedSharkLevel[num2, num3]); | |
| // } | |
| //} | |
| //info.AddValue("FGOLAnalytics.AdopterSegment", FGOLAnalytics.m_strAdopterSegment); | |
| //info.AddValue("FGOLAnalytics.PaymentSegment", FGOLAnalytics.m_strPaymentSegment); | |
| //for (int num4 = 0; num4 < FGOLAnalytics.m_sessionsPerDay.Length; num4++) | |
| //{ | |
| // info.AddValue("FGOLAnalytics.SessionsOnDay" + num4.ToString(), FGOLAnalytics.m_sessionsPerDay[num4]); | |
| //} | |
| //info.AddValue("ABTest.GroupName", ABTest.m_GroupName); | |
| //info.AddValue("ABTest.Generation", ABTest.m_Generation); | |
| //info.AddValue("ABTest.JSONConfig", ABTest.m_JSONConfig); | |
| //info.AddValue("ABTest.VersionDownloaded", ABTest.m_VersionDownloaded); | |
| //int count = InAppPurchase.previousOrderNumbers.Count; | |
| //info.AddValue("GoogleIAB.NumOrders", count); | |
| //if (count > 0) | |
| //{ | |
| // int num5 = 0; | |
| // foreach (string current in InAppPurchase.previousOrderNumbers) | |
| // { | |
| // info.AddValue("GoogleIAB." + num5.ToString(), current); | |
| // num5++; | |
| // } | |
| //} | |
| #endregion | |
| } | |
| public void PreSerialization() | |
| { | |
| } | |
| public void PostSerialization() | |
| { | |
| } | |
| public void PostDeserialization() | |
| { | |
| string[] names; | |
| object[] values; | |
| Type[] types; | |
| SerInfoHelper.GetMembers(m_Info, out names, out values, out types); | |
| m_data = new List<Tuple<string, object, Type>>(); | |
| for (int i = 0; i < m_Info.MemberCount; i++) | |
| m_data.Add(Tuple.Create(names[i], values[i], types[i])); | |
| #region Serialization | |
| //FGAssert.Assert(this.m_Info != null); | |
| //if (this.m_Info == null) | |
| //{ | |
| // return; | |
| //} | |
| //King instance = King._Instance; | |
| //FGAssert.Assert(instance != null); | |
| //FGAssert.Assert(instance._GameStats != null); | |
| //FGAssert.Assert(instance._MissionAchievementsManager != null); | |
| //FGAssert.Assert(instance._SharkStats != null); | |
| //FGAssert.Assert(instance._MuseumManager != null); | |
| //for (GameStats.StatsType statsType = GameStats.StatsType.highestScore; statsType < GameStats.StatsType.eMaxStats; statsType++) | |
| //{ | |
| // instance._GameStats.SetStat(statsType, this.GetInt32("GameStats[" + statsType + "]", 0)); | |
| //} | |
| //string text = this.GetString("CurrentLanguage", string.Empty); | |
| //if (text == null) | |
| //{ | |
| // text = "English"; | |
| //} | |
| //if (!text.Equals(Localization.instance.currentLanguage) && !text.Equals(string.Empty)) | |
| //{ | |
| // King._Instance.ChangeLanguage(text); | |
| //} | |
| //GUIManager.Instance.IsSoundMuted = !this.GetBoolean("IsSoundOn", false); | |
| //if (this.GetBoolean("IsTilt", false)) | |
| //{ | |
| // GameInput.m_controlMethod = ControlMethod.tilt; | |
| //} | |
| //else | |
| //{ | |
| // GameInput.m_controlMethod = ControlMethod.touch; | |
| //} | |
| //BizLogic.m_lastPlayed = this.GetDateTime("LastPlayed", DateTime.Today); | |
| //BizLogic.m_dailyRewardLastCollected = this.GetDateTime("DailyRewardLastCollected", DateTime.MinValue); | |
| //BizLogic.m_firstGame = this.GetDateTime("FirstGame", DateTime.Today); | |
| //BizLogic.DailyRewardCounter = this.GetInt32("DailyRewardCounter", 0); | |
| //BizLogic.m_alreadyRated = this.GetBoolean("RatedThisApp", false); | |
| //FGOLFacebookManager.m_hasEverLoggedIn = this.GetBoolean("HasEverLoggedInToFacebook", false); | |
| //FGOLFacebookManager.m_facebookAuthorizedToPublish = false; | |
| //BizLogic.m_evolveScreenVisits = this.GetInt32("EvolveScreenVisits", 0); | |
| //BizLogic.m_facebookLoginPrompts = this.GetInt32("FacebookLoginPrompts", 0); | |
| //BizLogic.m_hasEverUnlockedKempyLab = this.GetBoolean("HasEverUnlockedKempyLab", false); | |
| //int @int = this.GetInt32("NumSharks", 8); | |
| //for (int i = 0; i < @int; i++) | |
| //{ | |
| // string str = "SharkProgress[" + i + "]."; | |
| // SharkStats.SharkProgress sharkProgress = new SharkStats.SharkProgress(); | |
| // sharkProgress.buyLocked = this.GetBoolean(str + "BuyLocked", false); | |
| // sharkProgress.playLocked = this.GetBoolean(str + "PlayLocked", false); | |
| // sharkProgress.wasEarlyUnlocked = this.GetBoolean(str + "WasEarlyUnlocked", false); | |
| // sharkProgress.speedLevel = this.GetInt32(str + "SpeedLevel", 0); | |
| // sharkProgress.biteLevel = this.GetInt32(str + "BiteLevel", 0); | |
| // sharkProgress.boostLevel = this.GetInt32(str + "BoostLevel", 0); | |
| // sharkProgress.currentLevelGrowth = this.GetFloat(str + "CurrentLevelGrowth", 0f); | |
| // sharkProgress.sizeLevel = this.GetInt32(str + "SizeLevel", 0); | |
| // sharkProgress.growth = this.GetFloat(str + "Growth", 0f); | |
| // SharkStats.Stats stats = instance._SharkStats.GetStats((SharkType)i); | |
| // stats.progress.CopyFrom(sharkProgress); | |
| //} | |
| //MissionStatus[][] missionStatus = instance._MissionAchievementsManager.m_missionStatus; | |
| //for (int j = 0; j < @int; j++) | |
| //{ | |
| // missionStatus[j] = new MissionStatus[9]; | |
| // for (int k = 0; k < 9; k++) | |
| // { | |
| // missionStatus[j][k] = (MissionStatus)this.GetInt32(string.Concat(new object[] | |
| // { | |
| // "MissionStatus[", | |
| // j, | |
| // "][", | |
| // k, | |
| // "]" | |
| // }), 0); | |
| // } | |
| //} | |
| //instance._MissionAchievementsManager.ResolveMissionStatuses(false); | |
| //instance._SharkStats.lastPlayedBasicShark = (SharkType)this.GetInt32("LastPlayedBasicShark", 0); | |
| //instance._SharkStats.lastPlayedNoveltyShark = (SharkType)this.GetInt32("LastPlayedNoveltyShark", 6); | |
| //instance._SharkStats.currentShark = instance._SharkStats.lastPlayedBasicShark; | |
| //instance._SharkStats.Currency = this.GetInt32("StandardCurrency", 0); | |
| //instance._SharkStats.PremiumCurrency = this.GetInt32("PremiumCurrency", 0); | |
| //instance._SharkStats.CoinMultiplierEnabled = this.GetBoolean("CoinMultiplierEnabled", false); | |
| //instance._SharkStats.lastMegalodonVisibility = (MegalodonVisibility)this.GetInt32("LastMegalodonVisibility", 0); | |
| //SharkType currentShark = instance._SharkStats.currentShark; | |
| //SharkStats.Stats stats2 = instance._SharkStats.GetStats(currentShark); | |
| //GUIManager.Instance.m_previous = currentShark; | |
| //GUIManager.Instance.m_PreviousCurrentProgress = stats2.progress.currentLevelGrowth; | |
| //GUIManager.Instance.m_PreviousLvl = stats2.progress.sizeLevel; | |
| //if (this.m_versionRead < 2) | |
| //{ | |
| // string @string = this.GetString("string[0, 0]", string.Empty); | |
| // string string2 = this.GetString("string[0, 1]", string.Empty); | |
| // string string3 = this.GetString("string[1, 0]", string.Empty); | |
| // string string4 = this.GetString("string[1, 1]", string.Empty); | |
| // if (@string.Equals("Antidote")) | |
| // { | |
| // BizLogic.m_refundAntidote = int.Parse(string2); | |
| // } | |
| // if (string3.Equals("Antidote")) | |
| // { | |
| // BizLogic.m_refundAntidote = int.Parse(string4); | |
| // } | |
| // if (@string.Equals("Healing potion")) | |
| // { | |
| // BizLogic.m_refundHealthPotion = int.Parse(string2); | |
| // } | |
| // if (string3.Equals("Healing potion")) | |
| // { | |
| // BizLogic.m_refundHealthPotion = int.Parse(string4); | |
| // } | |
| //} | |
| //MuseumManager.MuseumFish[] items = instance._MuseumManager.items; | |
| //for (int l = 0; l < items.Length; l++) | |
| //{ | |
| // if (this.m_versionRead < 3) | |
| // { | |
| // items[l].TimesEaten = this.GetInt32("TimesEaten[" + l + "]", 0); | |
| // } | |
| // else | |
| // { | |
| // items[l].TimesEaten = this.GetInt32("MuseumFish[" + items[l].EnglishName + "].TimesEaten", 0); | |
| // items[l].IsNew = this.GetBoolean("MuseumFish[" + items[l].EnglishName + "].IsNew", false); | |
| // } | |
| //} | |
| //InventoryManager inventoryManager = instance._InventoryManager; | |
| //FGAssert.Assert(inventoryManager != null); | |
| //inventoryManager.SynchWithStore(); | |
| //int int2 = this.GetInt32("NumShopItemInteractions", 0); | |
| //for (int m = 0; m < int2; m++) | |
| //{ | |
| // string string5 = this.GetString("ShopItemInteractions[" + m + "].name", string.Empty); | |
| // bool boolean = this.GetBoolean("ShopItemInteractions[" + m + "].descriptionRead", true); | |
| // GUIManager.Instance._InventoryManager.UpdateShopItemInteraction(string5, boolean); | |
| //} | |
| //FGOLFacebookManager.m_hasFacebookPageEverBeenLiked = this.GetBoolean("FacebookPageLiked", false); | |
| //StoreMenuSheet.m_hasPlushToyLinkEverBeenViewed = this.GetBoolean("PlushToyViewed", false); | |
| //int2 = this.GetInt32("NumInventoryItems", 0); | |
| //for (int n = 0; n < int2; n++) | |
| //{ | |
| // string string6 = this.GetString("Inventory[" + n + "].Name", string.Empty); | |
| // int int3 = this.GetInt32("Inventory[" + n + "].Quantity", 0); | |
| // int int4 = this.GetInt32("Inventory[" + n + "].Source", 1); | |
| // GUIManager.Instance._InventoryManager.AddItemToInventory(0, (InventoryManager.Inventory.Item.Source)int4, string6, int3, true); | |
| //} | |
| //for (int num = 0; num < int2; num++) | |
| //{ | |
| // InventoryManager.Inventory.Item item = inventoryManager.TheInventory.m_items[num]; | |
| // bool boolean2 = this.GetBoolean("Inventory[" + num + "].IsEnabled", false); | |
| // item.isEnabled = boolean2; | |
| // for (int num2 = 0; num2 < 8; num2++) | |
| // { | |
| // bool boolean3 = this.GetBoolean(string.Concat(new object[] | |
| // { | |
| // "Inventory[", | |
| // num, | |
| // "].IsEquipped[", | |
| // num2, | |
| // "]" | |
| // }), false); | |
| // item.isEquipped[num2] = boolean3; | |
| // } | |
| //} | |
| //SpawnerManager.LoadPermanentDeletedSpawners(this.GetString("PermanentDeletedSpawners", string.Empty)); | |
| //GiantCrabSpawnerData.ms_lastKilledType = (GiantCrabType)this.GetInt32("GiantCrabLastKilledType", 0); | |
| //FGOLSocial.m_bestScore = this.GetInt32("FGOLSocial.bestScore", 0); | |
| //int int5 = this.GetInt32("FGOLSocial.unpostedScore", 0); | |
| //FGOLSocial.m_unpostedScoreFacebook = this.GetInt32("FGOLSocial.unpostedScoreFacebook", 0); | |
| //FGOLSocial.m_unpostedScoreGameCenter = this.GetInt32("FGOLSocial.unpostedScoreGameCenter", 0); | |
| //Debug.Log("UNPOSTED SCORE FACEBOOK @ LOAD = " + FGOLSocial.m_unpostedScoreFacebook); | |
| //Debug.Log("UNPOSTED SCORE GAMECENTER @ LOAD = " + FGOLSocial.m_unpostedScoreGameCenter); | |
| //if (int5 != 0 && FGOLSocial.m_unpostedScoreFacebook == 0 && FGOLSocial.m_unpostedScoreGameCenter == 0) | |
| //{ | |
| // FGOLSocial.m_unpostedScoreFacebook = int5; | |
| // FGOLSocial.m_unpostedScoreGameCenter = int5; | |
| //} | |
| //FGOLSocial.LoadUnpostedAchievements(this.GetString("FGOLSocial.unpostedAchievements", string.Empty)); | |
| //FGOLAnalytics.m_IsFirstTime = false; | |
| //FGOLAnalytics.m_utcFirstBootMillis = this.GetLong("FGOLAnalytics.utcFirstBootMillis", UnixTimeHelper.GetMillisecondsForLocalDate(BizLogic.m_firstGame)); | |
| //FGOLAnalytics.m_Referrer = this.GetString("FGOLAnalytics.Referrer", "Organic"); | |
| //FGOLAnalytics.m_IsPaidUser = this.GetBoolean("FGOLAnalytics.IsPaidUser", false); | |
| //FGOLAnalytics.m_UserGUID = this.GetString("FGOLAnalytics.UserGUID", string.Empty); | |
| //FGOLAnalytics.m_UserGender = this.GetString("FGOLAnalytics.UserGender", string.Empty); | |
| //FGOLAnalytics.m_UserFacebookID = this.GetString("FGOLAnalytics.UserFacebookID", string.Empty); | |
| //FGOLAnalytics.m_UserAge = this.GetInt32("FGOLAnalytics.UserAge", 0); | |
| //FGOLAnalytics.m_Shark = this.GetInt32("FGOLAnalytics.Shark", 0); | |
| //FGOLAnalytics.m_SharkLevel = this.GetInt32("FGOLAnalytics.SharkLevel", 0); | |
| //FGOLAnalytics.m_GameLoopCount = this.GetInt32("FGOLAnalytics.GameLoopCount", 0); | |
| //FGOLAnalytics.m_GameDay = this.GetInt32("FGOLAnalytics.GameDay", 0); | |
| //FGOLAnalytics.m_DaysInARow = this.GetInt32("FGOLAnalytics.DaysInARow", 0); | |
| //FGOLAnalytics.m_TotalDollarsPurchased = this.GetInt32("FGOLAnalytics.TotalDollarsPurchased", 0); | |
| //FGOLAnalytics.m_TotalPurchaseCount = this.GetInt32("FGOLAnalytics.TotalPurchaseCount", 0); | |
| //FGOLAnalytics.m_TotalCoinsSpent = this.GetInt32("FGOLAnalytics.TotalCoinsSpent", 0); | |
| //FGOLAnalytics.m_TotalCoinsPurchased = this.GetInt32("FGOLAnalytics.TotalCoinsPurchased", 0); | |
| //FGOLAnalytics.m_TotalGemsSpent = this.GetInt32("FGOLAnalytics.TotalGemsSpent", 0); | |
| //FGOLAnalytics.m_TotalGemsPurchased = this.GetInt32("FGOLAnalytics.TotalGemsPurchased", 0); | |
| //FGOLAnalytics.m_TimeTotal = this.GetInt32("FGOLAnalytics.TimeTotal", 0); | |
| //FGOLAnalytics.m_ScoreTotal = this.GetInt32("FGOLAnalytics.ScoreTotal", 0); | |
| //FGOLAnalytics.m_GemsCollectedTotal = this.GetInt32("FGOLAnalytics.GemsCollectedTotal", 0); | |
| //FGOLAnalytics.m_CoinsCollectedTotal = this.GetInt32("FGOLAnalytics.CoinsCollectedTotal", 0); | |
| //FGOLAnalytics.m_SaveMeUseCount = this.GetInt32("FGOLAnalytics.SaveMeUseCount", 0); | |
| //for (int num3 = 0; num3 < FGOLAnalytics.m_TimeShark.Length; num3++) | |
| //{ | |
| // FGOLAnalytics.m_TimeShark[num3] = this.GetInt32("FGOLAnalytics.Shark[" + num3 + "].Time", 0); | |
| // FGOLAnalytics.m_ScoreShark[num3] = this.GetInt32("FGOLAnalytics.Shark[" + num3 + "].Score", 0); | |
| // FGOLAnalytics.m_CoinsCollectedShark[num3] = this.GetInt32("FGOLAnalytics.Shark[" + num3 + "].CoinsCollected", 0); | |
| // FGOLAnalytics.m_GemsCollectedShark[num3] = this.GetInt32("FGOLAnalytics.Shark[" + num3 + "].GemsCollected", 0); | |
| // for (int num4 = 0; num4 < FGOLAnalytics.m_TimeSharkLevel.GetLength(1); num4++) | |
| // { | |
| // FGOLAnalytics.m_TimeSharkLevel[num3, num4] = this.GetInt32(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num3, | |
| // "][", | |
| // num4, | |
| // "].Time" | |
| // }), 0); | |
| // FGOLAnalytics.m_ScoreSharkLevel[num3, num4] = this.GetInt32(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num3, | |
| // "][", | |
| // num4, | |
| // "].Score" | |
| // }), 0); | |
| // FGOLAnalytics.m_CoinsCollectedSharkLevel[num3, num4] = this.GetInt32(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num3, | |
| // "][", | |
| // num4, | |
| // "].CoinsCollected" | |
| // }), 0); | |
| // FGOLAnalytics.m_GemsCollectedSharkLevel[num3, num4] = this.GetInt32(string.Concat(new object[] | |
| // { | |
| // "FGOLAnalytics.Shark[", | |
| // num3, | |
| // "][", | |
| // num4, | |
| // "].GemsCollected" | |
| // }), 0); | |
| // } | |
| //} | |
| //FGOLAnalytics.m_strAdopterSegment = this.GetString("FGOLAnalytics.AdopterSegment", string.Empty); | |
| //FGOLAnalytics.m_strPaymentSegment = this.GetString("FGOLAnalytics.PaymentSegment", string.Empty); | |
| //for (int num5 = 0; num5 < FGOLAnalytics.m_sessionsPerDay.Length; num5++) | |
| //{ | |
| // FGOLAnalytics.m_sessionsPerDay[num5] = this.GetInt32("FGOLAnalytics.SessionsOnDay" + num5.ToString(), 0); | |
| //} | |
| //ABTest.m_GroupName = this.GetString("ABTest.GroupName", "ORIGINAL"); | |
| //ABTest.m_Generation = this.GetInt32("ABTest.Generation", -1); | |
| //ABTest.m_JSONConfig = this.GetString("ABTest.JSONConfig", string.Empty); | |
| //ABTest.m_VersionDownloaded = this.GetString("ABTest.VersionDownloaded", string.Empty); | |
| //int int6 = this.GetInt32("GoogleIAB.NumOrders", 0); | |
| //for (int num6 = 0; num6 < int6; num6++) | |
| //{ | |
| // InAppPurchase.previousOrderNumbers.Add(this.GetString("GoogleIAB." + num6.ToString(), string.Empty)); | |
| //} | |
| #endregion | |
| m_Info = null; | |
| } | |
| public void PreDeserialization() | |
| { | |
| } | |
| } | |
| class SerInfoHelper | |
| { | |
| //internal String[] m_members; | |
| //internal Object[] m_data; | |
| //internal Type[] m_types; | |
| const BindingFlags s_flags = BindingFlags.Instance | BindingFlags.NonPublic; | |
| static readonly Type s_serInfo = typeof(SerializationInfo); | |
| static readonly FieldInfo s_members = s_serInfo.GetField("m_members", s_flags); | |
| static readonly FieldInfo s_values = s_serInfo.GetField("m_data", s_flags); | |
| static readonly FieldInfo s_types = s_serInfo.GetField("m_types", s_flags); | |
| public static void GetMembers(SerializationInfo info, out string[] names, out object[] values, out Type[] types) | |
| { | |
| names = (string[])((ICloneable)s_members.GetValue(info)).Clone(); | |
| values = (object[])((ICloneable)s_values.GetValue(info)).Clone(); | |
| types = (Type[])((ICloneable)s_types.GetValue(info)).Clone(); | |
| } | |
| } | |
| class FGOLNativeBinding | |
| { | |
| public static bool compatUseOldAndroidMACforUDID; | |
| public static string GetBundleVersion() | |
| { | |
| return "2.6.6"; | |
| } | |
| public static string GetAndroidID() | |
| { | |
| return "deface"; // xprivacy | |
| } | |
| /// <summary> | |
| /// gets IMEI | |
| /// </summary> | |
| public static string GetUniqueDeviceIdentifier() | |
| { | |
| return "000000000000000"; // xprivacy | |
| } | |
| public static string GetMACAddress() | |
| { | |
| return "DE:FA:CE:DE:FA:CE"; // xprivacy | |
| } | |
| public static string GetSaltedUniqueIdentifier() | |
| { | |
| string text = GetUniqueDeviceIdentifier(); | |
| if (text == null) | |
| { | |
| if (compatUseOldAndroidMACforUDID) | |
| { | |
| text = GetMACAddress(); | |
| } | |
| else | |
| { | |
| text = GetAndroidID(); | |
| } | |
| if (text == null) | |
| { | |
| text = "0123456789"; | |
| } | |
| } | |
| return "BO:LL:OX:" + text; | |
| } | |
| } | |
| class HSECrack | |
| { | |
| private static PersistentData s_save = new PersistentData(); | |
| private static byte[] s_cryptoKey; | |
| private static byte[] s_cryptoIV; | |
| // LoadSave | |
| private static void InitCryptoSource(string srckey) | |
| { | |
| StringBuilder stringBuilder = new StringBuilder(); | |
| for (int i = 0; i < 8; i++) | |
| { | |
| stringBuilder.Append(",").Append(srckey.Length); | |
| } | |
| Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(srckey, Encoding.ASCII.GetBytes(stringBuilder.ToString()), 10); | |
| RijndaelManaged rijndaelManaged = new RijndaelManaged(); | |
| rijndaelManaged.BlockSize = 256; | |
| s_cryptoKey = rfc2898DeriveBytes.GetBytes(rijndaelManaged.KeySize / 8); | |
| s_cryptoIV = rfc2898DeriveBytes.GetBytes(rijndaelManaged.BlockSize / 8); | |
| } | |
| static void LoadGame(string filePath) | |
| { | |
| //CRC32 crc = new CRC32(FGOLNativeBinding.GetSaltedUniqueIdentifier()); | |
| //1757695207 | |
| //LoadSave.DoAndroidOldFilenameCompatBullshit(); | |
| BinaryFormatter formatter = new BinaryFormatter { Binder = new Binder() }; | |
| byte[] data; | |
| using (MemoryStream decrypted = new MemoryStream()) | |
| { | |
| using (Stream input = new MemoryStream(File.ReadAllBytes(filePath))) | |
| using (RijndaelManaged rijndaelManaged = new RijndaelManaged { BlockSize = 256 }) | |
| using (ICryptoTransform decryptor = rijndaelManaged.CreateDecryptor(s_cryptoKey, s_cryptoIV)) | |
| using (Stream decrypting = new CryptoStream(input, decryptor, CryptoStreamMode.Read)) | |
| decrypting.CopyTo(decrypted); | |
| data = decrypted.ToArray(); | |
| } | |
| File.WriteAllBytes(filePath + ".decrypted", data); | |
| using (Stream tmpms = new MemoryStream(data)) | |
| s_save = (PersistentData)formatter.Deserialize(tmpms); | |
| s_save.PostDeserialization(); | |
| } | |
| static void SaveGame(string filePath) | |
| { | |
| IFormatter formatter = new BinaryFormatter(); | |
| byte[] inputBytes; | |
| using (MemoryStream serialized = new MemoryStream()) | |
| { | |
| s_save.PreSerialization(); | |
| formatter.Serialize(serialized, s_save); | |
| s_save.PostSerialization(); | |
| inputBytes = serialized.ToArray(); | |
| } | |
| File.WriteAllBytes(filePath + ".serialized", inputBytes); | |
| using (MemoryStream output = new MemoryStream()) | |
| { | |
| using (MemoryStream input = new MemoryStream(inputBytes)) | |
| using (RijndaelManaged rijndaelManaged = new RijndaelManaged { BlockSize = 256 }) | |
| using (ICryptoTransform encryptor = rijndaelManaged.CreateEncryptor(s_cryptoKey, s_cryptoIV)) | |
| using (Stream cryptoStream = new CryptoStream(output, encryptor, CryptoStreamMode.Write)) | |
| input.CopyTo(cryptoStream); | |
| File.WriteAllBytes(filePath + ".encrypted", output.ToArray()); | |
| } | |
| } | |
| static void Main() | |
| { | |
| const string name = "HSE_SaveData1757695207"; | |
| InitCryptoSource(FGOLNativeBinding.GetSaltedUniqueIdentifier()); | |
| LoadGame(name); | |
| // DO YOUR STUFF HERE | |
| SaveGame(name); | |
| } | |
| } | |
| } |
Thx I need this to cheat
Idk how to use this
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How Do I Use This