2015-11-24 08:50:17 +08:00
|
|
|
/**
|
2016-09-27 08:06:07 +08:00
|
|
|
@file x64dbg_exe.cpp
|
2015-11-24 08:50:17 +08:00
|
|
|
|
|
|
|
@brief Implements the 64 debug executable class.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <windows.h>
|
|
|
|
#include "crashdump.h"
|
2017-10-09 02:19:32 +08:00
|
|
|
#include "../bridge/bridgemain.h"
|
2016-06-23 23:50:26 +08:00
|
|
|
#include "LoadResourceString.h"
|
2023-03-03 01:15:32 +08:00
|
|
|
#include "signaturecheck.h"
|
2015-11-24 08:50:17 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
@fn int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
|
|
|
|
|
|
|
|
@brief Window main.
|
|
|
|
|
|
|
|
@param hInstance The instance.
|
|
|
|
@param hPrevInstance The previous instance.
|
|
|
|
@param lpCmdLine The command line.
|
|
|
|
@param nShowCmd The show command.
|
|
|
|
|
|
|
|
@return An APIENTRY.
|
|
|
|
*/
|
|
|
|
|
|
|
|
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
|
|
|
|
{
|
2023-03-03 01:15:32 +08:00
|
|
|
// Reference: https://www.trendmicro.com/pl_pl/research/23/b/investigating-the-plugx-trojan-disguised-as-a-legitimate-windows.html
|
|
|
|
if(!InitializeSignatureCheck())
|
|
|
|
MessageBoxA(nullptr, "Failed to initialize signature check.", "Error", MB_SYSTEMMODAL | MB_ICONERROR);
|
|
|
|
|
2015-11-24 08:50:17 +08:00
|
|
|
CrashDumpInitialize();
|
|
|
|
|
2016-06-23 23:50:26 +08:00
|
|
|
const wchar_t* errormsg = BridgeInit();
|
2015-11-24 08:50:17 +08:00
|
|
|
if(errormsg)
|
|
|
|
{
|
2016-06-23 23:50:26 +08:00
|
|
|
MessageBoxW(0, errormsg, LoadResString(IDS_BRIDGEINITERR), MB_ICONERROR | MB_SYSTEMMODAL);
|
2015-11-24 08:50:17 +08:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
errormsg = BridgeStart();
|
|
|
|
if(errormsg)
|
|
|
|
{
|
2016-06-23 23:50:26 +08:00
|
|
|
MessageBoxW(0, errormsg, LoadResString(IDS_BRIDGESTARTERR), MB_ICONERROR | MB_SYSTEMMODAL);
|
2015-11-24 08:50:17 +08:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|