-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDLLMain.cpp
42 lines (31 loc) · 1.17 KB
/
DLLMain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "Hooks.hpp"
#include "HWID.hpp"
extern DWORD dwSendClass;
extern int Main();
DWORD ptrToNothing = 0x01524553;
VOID Startup()
{
Sleep(500);
//DWORD dwOld; //get rid of NtdllPVM hook
//DWORD ntdll_ZwProtectVirtualMemory = (DWORD)GetProcAddress(GetModuleHandle(L"ntdll"), "ZwProtectVirtualMemory");
//VirtualProtect((void*)ntdll_ZwProtectVirtualMemory, 5, PAGE_EXECUTE_WRITECOPY, &dwOld);
//memcpy((void*)ntdll_ZwProtectVirtualMemory, (void*) "\xB8\x50\x00\x00\x00", 5);
//dwSendClass = FindPattern((BYTE*)SendClassPattern, "xx???x???xxxxxxxxxxxxxxxxxxx", 6, 0x00400000);
//dwSendClass = *(DWORD*)dwSendClass;
//WriteHookBytes(hkNPCList1, HookNPCList1, TRUE); //NPC/Dungeon botting
//WriteHookBytes(hkConnect, HookConnect, TRUE); //Auto-login
WriteHookBytes(hkSend, SendHook, TRUE);
//SetWindowTextA(FindWindowA(NULL, "Tree Of Savior"), "TOS");
Main(); //GUI
}
BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
{
switch (dwReason) {
case DLL_PROCESS_ATTACH: {
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&Startup, 0, 0, 0);
}break;
case DLL_PROCESS_DETACH:
break;
};
return TRUE;
}