HearthBuddy DONOTDELETE.bin
2024-10-06 17:39:22
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();
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();
return;
}
if (!Class7.smethod_4(out text))
{
App.ilog_0.Error("GetImageFileName failed.");
Logger.OpenLogFile();
base.Shutdown();
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();
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();
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();
}
else
{
App.ilog_0.Info("Now relaunching.");
Process.Start(@class.String_1, string.Join(" ", Environment.GetCommandLineArgs().Skip().Select(new Func<string, string>(App.Class11.Instance9.method_1))));
base.Shutdown();
}
return;
case Enum1.Error:
App.ilog_0.ErrorFormat("An error was encountered: {0}", @class.String_2);
Logger.OpenLogFile();
base.Shutdown();
return;
}
}
catch (Exception arg3)
{
App.ilog_0.ErrorFormat("Could not rename ourself on startup: {0}", arg3);
Logger.OpenLogFile();
base.Shutdown();
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();
return;
}
}
catch (Exception arg4)
{
App.ilog_0.ErrorFormat("Could not replace ourself on startup: {0}", arg4);
Logger.OpenLogFile();
base.Shutdown();
return;
}
App.ilog_0.Info("Pre-start tasks successfully completed.");
base.OnStartup(e);
}
最新文章
- 用CIL写程序:你好,沃尔德
- 从源代码构建 Go 开发环境
- Android 缓存
- Could not load file or assembly &#39;Microsoft.Office.Interop.Word, Version=14.0
- UVa 1635 (唯一分解定理) Irrelevant Elements
- 【转】于request.getSession(true/false/null)的区别
- 算法 python实现(三) 快速排序
- js中的模块化编写思维
- 用newLISP读取Hive的元数据
- c++自带倒置数组函数
- 基于文本图形(ncurses)的文本搜索工具 ncgrep
- vivo4.0系统怎么不ROOT激活Xposed框架的教程
- Android 项目中用得最多最火的第三方框架可能都在这里了
- React Native &; ES6 &; emoji
- mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解决方法
- 【Git】(2)---checkout、branch、log、diff、.gitignore
- maven 项目连接mysql8.0版本时的注意事项
- spring redis @Cacheable注解使用部分错误及无效原因
- SSM项目问题中遇到 GET请求中有中文的情况
- maven 内置变量