1
1
#include " Modify.h"
2
2
#include " Logger.h"
3
3
4
- extern Logger g_Logger;
4
+ extern Logger * g_Logger;
5
5
6
6
// https://www.unknowncheats.me/forum/1064672-post23.html
7
7
bool DataCompare (BYTE* pData, BYTE* bSig, char * szMask)
@@ -31,17 +31,15 @@ BYTE* FindPattern (BYTE* dwAddress, DWORD dwSize, BYTE* pbSig, char* szMask)
31
31
return 0 ;
32
32
}
33
33
34
- DWORD WINAPI KillBanner (LPVOID conf )
34
+ DWORD WINAPI KillBanner (LPVOID)
35
35
{
36
- auto config = static_cast <Config*>(conf);
37
- auto * logger = new Logger (config);
38
36
HMODULE hModule = GetModuleHandle (NULL );
39
37
MODULEINFO mInfo = { 0 };
40
38
if (GetModuleInformation (GetCurrentProcess (), hModule, &mInfo , sizeof (MODULEINFO))) {
41
- logger ->Log (" GetModuleInformation OK!" );
39
+ g_Logger ->Log (" GetModuleInformation OK!" );
42
40
LPVOID skipPod = FindPattern ((uint8_t *)hModule, mInfo .SizeOfImage , (BYTE*)" \x83\xC4\x08\x84\xC0\x0F\x84\x00\x04\x00\x00 " , " xxxxxxxxxxx" );
43
41
44
- if (skipPod)
42
+ if (skipPod) // spotify
45
43
{
46
44
DWORD oldProtect;
47
45
VirtualProtect ((char *)skipPod + 5 , 1 , PAGE_EXECUTE_READWRITE, &oldProtect);
@@ -51,15 +49,47 @@ DWORD WINAPI KillBanner (LPVOID conf)
51
49
VirtualProtect ((char *)skipPod + 6 , 1 , PAGE_EXECUTE_READWRITE, &oldProtect);
52
50
memset ((char *)skipPod + 6 , 0xE9 , 1 );
53
51
VirtualProtect ((char *)skipPod + 6 , 1 , oldProtect, &oldProtect);
54
- logger ->Log (" main process - patch success!" );
52
+ g_Logger ->Log (" main process#1 - patch success!" );
55
53
}
56
54
else {
57
- logger ->Log (" main process - patch failed!" );
55
+ g_Logger ->Log (" main process#1 - patch failed!" );
58
56
}
57
+
58
+ skipPod = FindPattern ((uint8_t *)hModule, mInfo .SizeOfImage , (BYTE*)" \x83\xC4\x08\x84\xC0\x0F\x84\xE5\x03\x00\x00 " , " xxxxxxxxxxx" );
59
+
60
+ if (skipPod) // spotify alpha
61
+ {
62
+ DWORD oldProtect;
63
+ VirtualProtect ((char *)skipPod + 5 , 1 , PAGE_EXECUTE_READWRITE, &oldProtect);
64
+ memset ((char *)skipPod + 5 , 0x90 , 1 );
65
+ VirtualProtect ((char *)skipPod + 5 , 1 , oldProtect, &oldProtect);
66
+
67
+ VirtualProtect ((char *)skipPod + 6 , 1 , PAGE_EXECUTE_READWRITE, &oldProtect);
68
+ memset ((char *)skipPod + 6 , 0xE9 , 1 );
69
+ VirtualProtect ((char *)skipPod + 6 , 1 , oldProtect, &oldProtect);
70
+ g_Logger->Log (" main process#2 - patch success!" );
71
+ }
72
+ else {
73
+ g_Logger->Log (" main process#2 - patch failed!" );
74
+ }
75
+
76
+ // skipPod = FindPattern ((uint8_t*)hModule, mInfo.SizeOfImage, (BYTE*)"\x48\x83\xF8\x03\x77", "xxxxx");
77
+
78
+ // if (skipPod)
79
+ // {
80
+ // DWORD oldProtect;
81
+ // VirtualProtect ((char*)skipPod + 4, 1, PAGE_EXECUTE_READWRITE, &oldProtect);
82
+ // memset ((char*)skipPod + 4, 0xEB, 1);
83
+ // VirtualProtect ((char*)skipPod + 4, 1, oldProtect, &oldProtect);
84
+ // g_Logger->Log ("main process#3 - patch success!");
85
+ // }
86
+ // else {
87
+ // g_Logger->Log ("main process#3 - patch failed!");
88
+ // }
59
89
}
60
90
else {
61
- logger ->Log (" GetModuleInformation failed!" );
91
+ g_Logger ->Log (" GetModuleInformation failed!" );
62
92
}
63
-
93
+ g_Logger-> ~Logger ();
64
94
return 0 ;
65
95
}
0 commit comments