4egvgn7lOeIVOGkbROCnOC changeset

Changeset306632346634 (b)
ParentNone (a)
ab
0+#include "main.h"
0+#include "detours.h"
0+
0+typedef void (WINAPI *ctFunc)(void);
0+typedef char* (WINAPI *gtFunc)(void);
0+typedef void (WINAPI *atFunc)(const char*, unsigned long, bool);
0+typedef void* (WINAPI *ftFunc)(int);
0+
0+ctFunc clear_text = reinterpret_cast<ctFunc>(0x66023a70);
0+gtFunc get_text = reinterpret_cast<gtFunc>(0x66023a10);
0+atFunc append_text = reinterpret_cast<atFunc>(0x66028870);
0+ftFunc find_edit = reinterpret_cast<ftFunc>(0x660231f0);
0+
0+void Mget_text();
0+char* Mclear_text();
0+void Mappend_text(const char*, unsigned long, bool);
0+
0+extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
0+{
0+    switch (fdwReason)
0+    {
0+        case DLL_PROCESS_ATTACH:
0+        {
0+               
0+        //      __asm("mov eax, 1");
0+               
0+            //MessageBox(0, "Attached.", "msg", MB_OK | MB_ICONINFORMATION);
0+           
0+            DetourTransactionBegin();
0+            DetourUpdateThread(GetCurrentThread());
0+            DetourAttach(&(PVOID&)get_text, (PVOID) Mget_text);
0+            DetourAttach(&(PVOID&)clear_text, (PVOID) Mclear_text);
0+            DetourAttach(&(PVOID&)append_text, (PVOID) Mappend_text);
0+            DetourTransactionCommit();
0+           
0+        }
0+            break;
0+
0+        case DLL_PROCESS_DETACH:
0+                {
0+                        DetourTransactionBegin();
0+            DetourUpdateThread(GetCurrentThread());
0+            DetourDetach(&(PVOID&)get_text, (PVOID) Mget_text);
0+            DetourDetach(&(PVOID&)clear_text, (PVOID) Mclear_text);
0+            DetourDetach(&(PVOID&)append_text, (PVOID) Mappend_text);
0+            DetourTransactionCommit();
0+           
0+                }
0+            break;
0+
0+        case DLL_THREAD_ATTACH:
0+            // attach to thread
0+            break;
0+
0+        case DLL_THREAD_DETACH:
0+            // detach from thread
0+            break;
0+    }
0+    return TRUE; // successful
0+}
0+
0+void Mget_text()
0+{
0+       
0+}
0+
0+char* Mclear_text()
0+{
0+       
0+}
0+
0+void Mappend_text(const char* txt, unsigned long color, bool unk)
0+{
0+       
0+}
0+
0+/* Errors:
0+
0+Z]+0x8)||undefined reference to `_SEH_prolog4'|
0+Z]+0x72)||undefined reference to `_SEH_epilog4'|
0+Z]+0x8)||undefined reference to `_SEH_prolog4'|
0+Z]+0x5e)||undefined reference to `_SEH_epilog4'|
0+0]+0x56)||undefined reference to `??3@YAXPAX@Z'|
0+0]+0x83)||undefined reference to `??3@YAXPAX@Z'|
0+4]+0xf)||undefined reference to `__security_cookie'|
0+4]+0x1d2)||undefined reference to `??3@YAXPAX@Z'|
0+4]+0x1ff)||undefined reference to `??3@YAXPAX@Z'|
0+4]+0x236)||undefined reference to `@__security_check_cookie@4'|
0+4]+0x20)||undefined reference to `??2@YAPAXI@Z'|
0+4]+0x46)||undefined reference to `??3@YAXPAX@Z'|
0+20]+0xbc)||undefined reference to `??2@YAPAXI@Z'|
0+20]+0x1f0)||undefined reference to `??3@YAXPAX@Z'|
0+8]+0x56)||undefined reference to `??2@YAPAXI@Z'|
0+8]+0xed)||undefined reference to `??3@YAXPAX@Z'|
0+16]+0x7)||undefined reference to `__security_cookie'|
0+16]+0x39)||undefined reference to `@__security_check_cookie@4'|
0+||=== Build finished: 18 errors, 0 warnings ===|
0+
0+*/
...
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
--- Revision None
+++ Revision 306632346634
@@ -0,0 +1,99 @@
+#include "main.h"
+#include "detours.h"
+
+typedef void (WINAPI *ctFunc)(void);
+typedef char* (WINAPI *gtFunc)(void);
+typedef void (WINAPI *atFunc)(const char*, unsigned long, bool);
+typedef void* (WINAPI *ftFunc)(int);
+
+ctFunc clear_text = reinterpret_cast<ctFunc>(0x66023a70);
+gtFunc get_text = reinterpret_cast<gtFunc>(0x66023a10);
+atFunc append_text = reinterpret_cast<atFunc>(0x66028870);
+ftFunc find_edit = reinterpret_cast<ftFunc>(0x660231f0);
+
+void Mget_text();
+char* Mclear_text();
+void Mappend_text(const char*, unsigned long, bool);
+
+extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ {
+
+ // __asm("mov eax, 1");
+
+ //MessageBox(0, "Attached.", "msg", MB_OK | MB_ICONINFORMATION);
+
+ DetourTransactionBegin();
+ DetourUpdateThread(GetCurrentThread());
+ DetourAttach(&(PVOID&)get_text, (PVOID) Mget_text);
+ DetourAttach(&(PVOID&)clear_text, (PVOID) Mclear_text);
+ DetourAttach(&(PVOID&)append_text, (PVOID) Mappend_text);
+ DetourTransactionCommit();
+
+ }
+ break;
+
+ case DLL_PROCESS_DETACH:
+ {
+ DetourTransactionBegin();
+ DetourUpdateThread(GetCurrentThread());
+ DetourDetach(&(PVOID&)get_text, (PVOID) Mget_text);
+ DetourDetach(&(PVOID&)clear_text, (PVOID) Mclear_text);
+ DetourDetach(&(PVOID&)append_text, (PVOID) Mappend_text);
+ DetourTransactionCommit();
+
+ }
+ break;
+
+ case DLL_THREAD_ATTACH:
+ // attach to thread
+ break;
+
+ case DLL_THREAD_DETACH:
+ // detach from thread
+ break;
+ }
+ return TRUE; // successful
+}
+
+void Mget_text()
+{
+
+}
+
+char* Mclear_text()
+{
+
+}
+
+void Mappend_text(const char* txt, unsigned long color, bool unk)
+{
+
+}
+
+/* Errors:
+
+Z]+0x8)||undefined reference to `_SEH_prolog4'|
+Z]+0x72)||undefined reference to `_SEH_epilog4'|
+Z]+0x8)||undefined reference to `_SEH_prolog4'|
+Z]+0x5e)||undefined reference to `_SEH_epilog4'|
+0]+0x56)||undefined reference to `??3@YAXPAX@Z'|
+0]+0x83)||undefined reference to `??3@YAXPAX@Z'|
+4]+0xf)||undefined reference to `__security_cookie'|
+4]+0x1d2)||undefined reference to `??3@YAXPAX@Z'|
+4]+0x1ff)||undefined reference to `??3@YAXPAX@Z'|
+4]+0x236)||undefined reference to `@__security_check_cookie@4'|
+4]+0x20)||undefined reference to `??2@YAPAXI@Z'|
+4]+0x46)||undefined reference to `??3@YAXPAX@Z'|
+20]+0xbc)||undefined reference to `??2@YAPAXI@Z'|
+20]+0x1f0)||undefined reference to `??3@YAXPAX@Z'|
+8]+0x56)||undefined reference to `??2@YAPAXI@Z'|
+8]+0xed)||undefined reference to `??3@YAXPAX@Z'|
+16]+0x7)||undefined reference to `__security_cookie'|
+16]+0x39)||undefined reference to `@__security_check_cookie@4'|
+||=== Build finished: 18 errors, 0 warnings ===|
+
+*/