diff --git a/test/dllmain.cpp b/test/dllmain.cpp index a810154..d86685f 100644 --- a/test/dllmain.cpp +++ b/test/dllmain.cpp @@ -38,22 +38,38 @@ uint32_t NewPushString(uint32_t v, wchar_t* f, int freeVarsCnt) return MLSqPushString(v, f, freeVarsCnt); } +/* +static NoticeCall _Noticecall = NULL; +void tihuancall(DWORD a1, DWORD a2, DWORD a3, DWORD a4, DWORD a5, DWORD a6, DWORD a7, DWORD a8, DWORD a9, DWORD a10, DWORD a11, DWORD a12, DWORD a13) +{ + std::cout << "true" << std::endl; + + std::cout << a1 << std::endl; + std::cout << a2 << std::endl; + std::cout << a3 << std::endl; + std::cout << a4 << std::endl; + //std::cout << a5 << std::endl; + + + //return _Noticecall(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); +} +*/ int HOOK() { std::cout << u8"开始hook" << std::endl; - + /* - if (MH_CreateHook((void*)0x135B850, &NewClosure, - reinterpret_cast(&MLnewclosure)) != MH_OK) + if (MH_CreateHook((void*)0x9536C0, &tihuancall, + reinterpret_cast(&_Noticecall)) != MH_OK) { return 2; } // Enable the hook for MessageBoxW. - if (MH_EnableHook((void*)0x135B850) != MH_OK) + if (MH_EnableHook((void*)0x9536C0) != MH_OK) { return 3; } @@ -137,6 +153,8 @@ void testcall() _SendpacksType(*_SendClass, 0, 0x3); _SendPacks(); */ + + } void LenheartThread(void) diff --git a/test/pch.h b/test/pch.h index 7574dda..7ec3b5b 100644 --- a/test/pch.h +++ b/test/pch.h @@ -263,4 +263,7 @@ static SendPacksWORD _SendPacksWord = (SendPacksWORD)0x1128580; typedef int(__fastcall* SendPacksDWORD)(DWORD thisc, int Seat, int Parm); static SendPacksDWORD _SendPacksDWord = (SendPacksDWORD)0x11285B0; +//公告CALL +typedef void( *NoticeCall)(int a1, int a2, int a3, int a4, int a5, int a6, int a7); +static NoticeCall _Noticecall = (NoticeCall)0x9536C0; #endif //PCH_H diff --git a/test/函数块.cpp b/test/函数块.cpp index c443c61..d7062c3 100644 --- a/test/函数块.cpp +++ b/test/函数块.cpp @@ -342,7 +342,41 @@ static int SQdofile(uint32_t v, const wchar_t* filename, bool retval, bool print +void ggc(char* str,int type,int color) +{ + int shangdian; + int laba; + int ggtype; + int ggcolor; + int ggstr; + //ggtype = 16; + //ggcolor = 65535; + shangdian = 0x1A5FB20; + laba = 0x9536c0; + ggtype = 16; + ggcolor = 65535; + ggstr = (int)str; + //std::cout << ggstr << std::endl; + + _asm + { + pushad + mov ecx, dword ptr[ebp - 0x04] + mov ecx, dword ptr[ecx] + mov ecx, dword ptr[ecx + 0x40] + push 0x00000000 + push 0x00000000 + push 0x00000000 + push 0x00000000 + push dword ptr[ebp - 0x0c] + push dword ptr[ebp - 0x10] + push dword ptr[ebp - 0x14] + call dword ptr[ebp - 0x08] + popad + } + +} @@ -373,6 +407,12 @@ void RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t v) static int sq_Test(uint32_t v) { //sq_pushinteger(v, n1); + + + *(char**)0x400F00 = (char*)u"test"; + + _Noticecall(0x400F00, 65535, 14, 0, 0, 0, 0); + return 0; } // װ