Fix entry point.
This commit is contained in:
parent
a3ee040a20
commit
7db2956e45
54
src/Main.cpp
54
src/Main.cpp
@ -6,7 +6,7 @@ namespace Main
|
|||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
EntryPointHook.Uninstall();
|
Main::EntryPointHook.Uninstall();
|
||||||
Components::Loader::Initialize();
|
Components::Loader::Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,30 +14,30 @@ namespace Main
|
|||||||
{
|
{
|
||||||
Components::Loader::Uninitialize();
|
Components::Loader::Uninitialize();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
|
||||||
{
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||||
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
|
{
|
||||||
{
|
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
|
||||||
DWORD oldProtect;
|
{
|
||||||
VirtualProtect(GetModuleHandle(NULL), 0x6C73000, PAGE_EXECUTE_READWRITE, &oldProtect);
|
DWORD oldProtect;
|
||||||
|
VirtualProtect(GetModuleHandle(NULL), 0x6C73000, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||||
EntryPointHook.Initialize(0x6BAC0F, [] ()
|
|
||||||
{
|
Main::EntryPointHook.Initialize(0x6BAC0F, [] ()
|
||||||
__asm
|
{
|
||||||
{
|
__asm
|
||||||
call Main::Initialize
|
{
|
||||||
mov eax, 6BAC0Fh
|
call Main::Initialize
|
||||||
jmp eax
|
mov eax, 6BAC0Fh
|
||||||
}
|
jmp eax
|
||||||
|
}
|
||||||
})->Install();
|
|
||||||
}
|
})->Install();
|
||||||
else if (ul_reason_for_call == DLL_PROCESS_DETACH)
|
}
|
||||||
{
|
else if (ul_reason_for_call == DLL_PROCESS_DETACH)
|
||||||
Main::Uninitialize();
|
{
|
||||||
}
|
Main::Uninitialize();
|
||||||
|
}
|
||||||
return TRUE;
|
|
||||||
}
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user