111
This commit is contained in:
parent
2c1a9b7dbd
commit
1166be0471
|
|
@ -38,22 +38,38 @@ uint32_t NewPushString(uint32_t v, wchar_t* f, int freeVarsCnt)
|
||||||
return MLSqPushString(v, f, 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()
|
int HOOK()
|
||||||
{
|
{
|
||||||
std::cout << u8"开始hook" << std::endl;
|
std::cout << u8"开始hook" << std::endl;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (MH_CreateHook((void*)0x135B850, &NewClosure,
|
if (MH_CreateHook((void*)0x9536C0, &tihuancall,
|
||||||
reinterpret_cast<void**>(&MLnewclosure)) != MH_OK)
|
reinterpret_cast<void**>(&_Noticecall)) != MH_OK)
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable the hook for MessageBoxW.
|
// Enable the hook for MessageBoxW.
|
||||||
if (MH_EnableHook((void*)0x135B850) != MH_OK)
|
if (MH_EnableHook((void*)0x9536C0) != MH_OK)
|
||||||
{
|
{
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
@ -137,6 +153,8 @@ void testcall()
|
||||||
_SendpacksType(*_SendClass, 0, 0x3);
|
_SendpacksType(*_SendClass, 0, 0x3);
|
||||||
_SendPacks();
|
_SendPacks();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LenheartThread(void)
|
void LenheartThread(void)
|
||||||
|
|
|
||||||
|
|
@ -263,4 +263,7 @@ static SendPacksWORD _SendPacksWord = (SendPacksWORD)0x1128580;
|
||||||
typedef int(__fastcall* SendPacksDWORD)(DWORD thisc, int Seat, int Parm);
|
typedef int(__fastcall* SendPacksDWORD)(DWORD thisc, int Seat, int Parm);
|
||||||
static SendPacksDWORD _SendPacksDWord = (SendPacksDWORD)0x11285B0;
|
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
|
#endif //PCH_H
|
||||||
|
|
|
||||||
40
test/函数块.cpp
40
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)
|
static int sq_Test(uint32_t v)
|
||||||
{
|
{
|
||||||
//sq_pushinteger(v, n1);
|
//sq_pushinteger(v, n1);
|
||||||
|
|
||||||
|
|
||||||
|
*(char**)0x400F00 = (char*)u"test";
|
||||||
|
|
||||||
|
_Noticecall(0x400F00, 65535, 14, 0, 0, 0, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//读人物 或 装备属性
|
//读人物 或 装备属性
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue