HearthBuddy DONOTDELETE.bin
namespace Hearthbuddy
{
// Token: 0x02000022 RID: 34
public class App : System.Windows.Application
// Hearthbuddy.App // Token: 0x0600012B RID: 299 RVA: 0x00086C08 File Offset: 0x00084E08 protected override void OnStartup(StartupEventArgs e) { string text = ""; try { this.method_1(); } catch (Exception exception) { App.ilog_0.Error("An exception occurred", exception); try { this.method_2(); } catch (Exception exception2) { App.ilog_0.Error("An exception occurred", exception2); Logger.OpenLogFile(); Application.Current.Shutdown(); return; } } try { App.ilog_0.Info("Now setting up JitProfiles..."); string text2 = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "JitProfiles"); if (!Directory.Exists(text2)) { Directory.CreateDirectory(text2); } ProfileOptimization.SetProfileRoot(text2); ProfileOptimization.StartProfile("JitProfile.jpf"); App.ilog_0.Info("JitProfiles successfully setup!"); } catch (Exception exception3) { App.ilog_0.Error("An exception occurred", exception3); } base.Dispatcher.UnhandledException += this.method_4; AppDomain.CurrentDomain.UnhandledException += this.method_3; Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; App.ilog_0.Info("Now beginning pre-start tasks."); try { App.ilog_0.Info("Now checking prerequisites..."); this.method_0(); App.ilog_0.Info("Prerequisite check complete!"); } catch (Exception arg) { App.ilog_0.ErrorFormat("{0}", arg); Logger.OpenLogFile(); base.Shutdown(1); return; } try { if (!File.Exists("DONOTDELETE.bin")) { App.ilog_0.Error("The file [DONOTDELETE.bin] does not exist. Please reinstall Hearthbuddy."); Logger.OpenLogFile(); base.Shutdown(1); return; } if (!Class7.smethod_4(out text)) { App.ilog_0.Error("GetImageFileName failed."); Logger.OpenLogFile(); base.Shutdown(1); return; } if (new Uri(text).IsUnc) { App.ilog_0.Error("Hearthbuddy can no longer be ran from an UNC path. Please install Hearthbuddy to the current PC."); Logger.OpenLogFile(); base.Shutdown(1); return; } File.ReadAllBytes(text); File.ReadAllBytes("DONOTDELETE.bin"); App.smethod_0(text); } catch (Exception arg2) { App.ilog_0.ErrorFormat("{0}", arg2); Logger.OpenLogFile(); base.Shutdown(1); return; } try { Class6 @class = new Class7().method_0("Hearthbuddy"); switch (@class.Enum1_0) { case Enum1.Success: CodeCompiler.smethod_0(@class.String_0); break; case Enum1.Relaunch: if (CommandLine.Arguments.Exists("noautolaunch")) { App.ilog_0.Info("Now exiting for manual relaunch."); base.Shutdown(1); } else { App.ilog_0.Info("Now relaunching."); Process.Start(@class.String_1, string.Join(" ", Environment.GetCommandLineArgs().Skip(1).Select(new Func<string, string>(App.Class11.Instance9.method_1)))); base.Shutdown(1); } return; case Enum1.Error: App.ilog_0.ErrorFormat("An error was encountered: {0}", @class.String_2); Logger.OpenLogFile(); base.Shutdown(1); return; } } catch (Exception arg3) { App.ilog_0.ErrorFormat("Could not rename ourself on startup: {0}", arg3); Logger.OpenLogFile(); base.Shutdown(1); return; } try { if (!App.smethod_1(text)) { App.ilog_0.ErrorFormat("An error occurred while trying to replace the process.", Array.Empty<object>()); Logger.OpenLogFile(); base.Shutdown(1); return; } } catch (Exception arg4) { App.ilog_0.ErrorFormat("Could not replace ourself on startup: {0}", arg4); Logger.OpenLogFile(); base.Shutdown(1); return; } App.ilog_0.Info("Pre-start tasks successfully completed."); base.OnStartup(e); }
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2015-08-05 C#中的异常处理
2015-08-05 AppDomain
2015-08-05 接口方法执行时的查找顺序
2015-08-05 log4net使用总结
2014-08-05 使用CLR Profiler查看C#运行程序的内存占用情况