1745 lines
		
	
	
		
			47 KiB
		
	
	
	
		
			C++
		
	
	
	
		
		
			
		
	
	
			1745 lines
		
	
	
		
			47 KiB
		
	
	
	
		
			C++
		
	
	
	
|  | #pragma once
 | |||
|  | #include <cwchar>
 | |||
|  | #include "MinHook.h"
 | |||
|  | #include "inlinehook.h"
 | |||
|  | #include "RegisterSquirrel.hpp"
 | |||
|  | 
 | |||
|  | //<2F><>Ϸ<EFBFBD><CFB7>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Flag
 | |||
|  | static bool InitGameFlag = false; | |||
|  | 
 | |||
|  | //<2F>ű<EFBFBD><C5B1>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Flag
 | |||
|  | extern bool jiaoben; | |||
|  | //<2F>ű<EFBFBD><C5B1>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | extern std::vector<std::string> BaseData; | |||
|  | //<2F><><EFBFBD>ؽű<D8BD><C5B1><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | void Suxn() { | |||
|  |     size_t Ds = BaseData.size(); | |||
|  | 
 | |||
|  |     for (size_t i = 0; i < Ds; i++) | |||
|  |     { | |||
|  |         std::string filenamebuf = "BaseData" + std::to_string(i); | |||
|  |         std::string strbuf = BaseData[i]; | |||
|  |         wchar_t* filename = DNFTOOL::charTowchar_t((char*)filenamebuf.c_str()); | |||
|  |         wchar_t* str = DNFTOOL::charTowchar_t((char*)strbuf.c_str()); | |||
|  | 
 | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  | #ifdef SELL
 | |||
|  |         //std::cout << strbuf << std::endl;
 | |||
|  |         if (sq_mycompilebuffer(v, str, wcslen(str), L"interactive console", false) >= 0) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQTrue, SQFalse); | |||
|  |             Sq_pop(v, 1); | |||
|  |         } | |||
|  | #else
 | |||
|  |         if (sq_mycompilebuffer(v, str, wcslen(str), filename, false) >= 0) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQTrue, SQFalse); | |||
|  |             Sq_pop(v, 1); | |||
|  |         } | |||
|  | #endif // SELL
 | |||
|  | 
 | |||
|  |         delete[] filename; | |||
|  |         delete[] str; | |||
|  |     } | |||
|  |     BaseData.clear(); | |||
|  |     jiaoben = false; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | typedef struct REG | |||
|  | { | |||
|  |     DWORD EAX; | |||
|  |     DWORD EBX; | |||
|  |     DWORD ECX; | |||
|  |     DWORD EDX; | |||
|  |     DWORD ESI; | |||
|  |     DWORD EDI; | |||
|  |     DWORD ESP; | |||
|  |     DWORD EBP; | |||
|  |     DWORD VmAddress; | |||
|  |     BYTE Cl; | |||
|  | 
 | |||
|  | } REG; | |||
|  | REG PlayerEach = { 0 }; | |||
|  | void __declspec(naked)PlayerEach2() { | |||
|  |     static int address = 0x11B34E0; | |||
|  |     static int address1 = 0x001004B59; | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  | 
 | |||
|  |         mov PlayerEach.ECX, ecx | |||
|  |         mov PlayerEach.EDI, edi | |||
|  |     } | |||
|  | 
 | |||
|  |     if (PlayerEach.EDI == 2) { | |||
|  |         PlayerEach.VmAddress = Sq_gettop(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushstring(*(HSQUIRRELVM*)0x1AF3544, L"Sq_PlayerEachPos", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(*(HSQUIRRELVM*)0x1AF3544, -2))) | |||
|  |         { | |||
|  |             Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |             Sq_pushinteger(*(HSQUIRRELVM*)0x1AF3544, *(int*)(PlayerEach.ECX + 0x14)); | |||
|  |             Sq_pushinteger(*(HSQUIRRELVM*)0x1AF3544, *(int*)(PlayerEach.ECX + 0x18)); | |||
|  |             Sq_call(*(HSQUIRRELVM*)0x1AF3544, 3, 0, 1); | |||
|  |         } | |||
|  |         Sq_settop(*(HSQUIRRELVM*)0x1AF3544, PlayerEach.VmAddress); | |||
|  |     } | |||
|  | 
 | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         call address | |||
|  |         test al, al | |||
|  |         jmp address1 | |||
|  |     } | |||
|  | 
 | |||
|  | } | |||
|  | REG MouseAsm = { 0 }; | |||
|  | void __declspec(naked)MouseWheelUp() { | |||
|  |     static int address = 0x11BDE12; | |||
|  |     static int address1 = 0x0011BDEEE; | |||
|  |     static int address2 = 0x0011BDEDF; | |||
|  |     static int address3 = 0x0011BDECE; | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |         mov MouseAsm.EDI, edi | |||
|  |         mov MouseAsm.ECX, ecx | |||
|  |     } | |||
|  | 
 | |||
|  |     if ((int)*(BYTE*)0x1B46886 == 0) { | |||
|  |         _asm { | |||
|  |             popfd | |||
|  |             popad | |||
|  |             jmp address | |||
|  |         } | |||
|  |     } | |||
|  |     else { | |||
|  |         if (MouseAsm.EDI == 0x20A) { | |||
|  |             if (MouseAsm.ECX == 0x780000) { | |||
|  |                 _asm { | |||
|  |                     popfd | |||
|  |                     popad | |||
|  |                     jmp address3 | |||
|  |                 } | |||
|  |             } | |||
|  |             else { | |||
|  |                 _asm { | |||
|  |                     popfd | |||
|  |                     popad | |||
|  |                     jmp address2 | |||
|  |                 } | |||
|  |             } | |||
|  |         } | |||
|  |         else { | |||
|  |             _asm { | |||
|  |                 popfd | |||
|  |                 popad | |||
|  |                 jmp address1 | |||
|  |             } | |||
|  |         } | |||
|  |     } | |||
|  | } | |||
|  | REG DrawWindow_BAsm = { 0 }; | |||
|  | void __declspec(naked)DrawWindow_B_Hook() { | |||
|  |     static int address = 0xFFDA10; | |||
|  |     static int address1 = 0x66BEA1; | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  | 
 | |||
|  |     } | |||
|  | 
 | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         DrawWindow_BAsm.VmAddress = Sq_gettop(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushstring(*(HSQUIRRELVM*)0x1AF3544, L"L_DrawWindow_B", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(*(HSQUIRRELVM*)0x1AF3544, -2))) | |||
|  |         { | |||
|  |             Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |             Sq_call(*(HSQUIRRELVM*)0x1AF3544, 1, 0, 1); | |||
|  |         } | |||
|  |         Sq_settop(*(HSQUIRRELVM*)0x1AF3544, DrawWindow_BAsm.VmAddress); | |||
|  |     } | |||
|  | 
 | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         mov ecx, eax | |||
|  |         call address | |||
|  |         jmp address1 | |||
|  |     } | |||
|  | 
 | |||
|  | } | |||
|  | 
 | |||
|  | REG BuffIconHookAsm = { 0 }; | |||
|  | void __declspec(naked)BuffIcon_Hook() { | |||
|  |     static int address = 0x4C8C1D; | |||
|  |     static int address2 = 0x4C8C5B; | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  | 
 | |||
|  |     } | |||
|  | 
 | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         add esi,0x88 | |||
|  |         sub edi,eax | |||
|  |         mov BuffIconHookAsm.Cl, cl | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  | 
 | |||
|  |     if (BuffIconHookAsm.Cl == 1) { | |||
|  |         _asm { | |||
|  |             popfd | |||
|  |             popad | |||
|  |             jmp address | |||
|  |         } | |||
|  |     } | |||
|  |     else { | |||
|  |         _asm { | |||
|  |             popfd | |||
|  |             popad | |||
|  |             jmp address2 | |||
|  |         } | |||
|  |     } | |||
|  | 
 | |||
|  | } | |||
|  | REG BuffIconHookBAsm = { 0 }; | |||
|  | void __declspec(naked)BuffIcon_Hook_B() { | |||
|  |     static int address = 0x4BF566; | |||
|  |     //static int address2 = 0x4C8C5B;
 | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  | 
 | |||
|  |     } | |||
|  | 
 | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         sub edi,eax | |||
|  |         add esi, 0x88 | |||
|  |         mov [ebp-40],esi | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)HudBloodBackground() { | |||
|  |     static int address = 0x4CA055; | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  | 
 | |||
|  |     } | |||
|  | 
 | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         DrawWindow_BAsm.VmAddress = Sq_gettop(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushstring(*(HSQUIRRELVM*)0x1AF3544, L"L_HUD_BloodBackground", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(*(HSQUIRRELVM*)0x1AF3544, -2))) | |||
|  |         { | |||
|  |             Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |             Sq_call(*(HSQUIRRELVM*)0x1AF3544, 1, 0, 1); | |||
|  |         } | |||
|  |         Sq_settop(*(HSQUIRRELVM*)0x1AF3544, DrawWindow_BAsm.VmAddress); | |||
|  |     } | |||
|  | 
 | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | 
 | |||
|  | REG Damage_HookAsm = { 0 }; | |||
|  | void __declspec(naked)Damage_Hook() { | |||
|  |     static int address = 0xE5A2E5; | |||
|  |     _asm | |||
|  |     { | |||
|  |         pushad | |||
|  |         pushfd | |||
|  | 
 | |||
|  |         mov Damage_HookAsm.EDI, edi | |||
|  |         mov Damage_HookAsm.EBX, ebx | |||
|  |         mov Damage_HookAsm.EBP, ebp | |||
|  |     } | |||
|  | 
 | |||
|  | 
 | |||
|  |     Damage_HookAsm.EAX = *(int*)0x1AB7CDC; | |||
|  | 
 | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         int Address = Damage_HookAsm.EBX;//ֻҪ<D6BB><D2AA><EFBFBD><EFBFBD> red  <20><><EFBFBD><EFBFBD>  <20><><EFBFBD><EFBFBD>0  <20><>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>˺<EFBFBD>
 | |||
|  |         int Damage = *(DWORD*)(Damage_HookAsm.EBP - 0x17c); | |||
|  | 
 | |||
|  |         Damage_HookAsm.VmAddress = Sq_gettop(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |         Sq_pushstring(*(HSQUIRRELVM*)0x1AF3544, L"Sq_PushDamageData", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(*(HSQUIRRELVM*)0x1AF3544, -2))) | |||
|  |         { | |||
|  |             Sq_pushroottable(*(HSQUIRRELVM*)0x1AF3544); | |||
|  |             Sq_pushinteger(*(HSQUIRRELVM*)0x1AF3544, Address); | |||
|  |             Sq_pushinteger(*(HSQUIRRELVM*)0x1AF3544, Damage_HookAsm.EAX); | |||
|  |             Sq_pushinteger(*(HSQUIRRELVM*)0x1AF3544, Damage); | |||
|  |             Sq_call(*(HSQUIRRELVM*)0x1AF3544, 4, 0, 1); | |||
|  |         } | |||
|  |         Sq_settop(*(HSQUIRRELVM*)0x1AF3544, Damage_HookAsm.VmAddress); | |||
|  |         Damage_HookAsm.EBX = 0; | |||
|  |         Damage_HookAsm.EBP = 0; | |||
|  |     } | |||
|  | 
 | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         mov eax, Damage_HookAsm.EAX | |||
|  |         xor ecx,ecx | |||
|  |         jmp address | |||
|  |     } | |||
|  | 
 | |||
|  | } | |||
|  | 
 | |||
|  | void __declspec(naked)SelectCharacter_Hook() { | |||
|  |     static int address = 0x10F79D1; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul edx,edx,0x7a | |||
|  |         xor eax, eax | |||
|  |         add edx, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook1() { | |||
|  |     static int address = 0x10F7B4B; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul eax, eax, 0x7a | |||
|  |         xor edx, edx | |||
|  |         add eax, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook2() { | |||
|  |     static int address = 0x10F7F91; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul ecx, ecx, 0x7a | |||
|  |         add ecx, 0xA1 | |||
|  |         xor edx, edx | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook3() { | |||
|  |     static int address = 0x10F8319; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul edx, edx, 0x7a | |||
|  |         xor eax, eax | |||
|  |         add edx, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook4() { | |||
|  |     static int address = 0x10F843E; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul eax, eax, 0x7a | |||
|  |         xor ecx, ecx | |||
|  |         add eax, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook5() { | |||
|  |     static int address = 0x10F85F2; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul eax, eax, 0x7a | |||
|  |         xor ecx, ecx | |||
|  |         add eax, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook6() { | |||
|  |     static int address = 0x10F2C74; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul eax, eax, 0x7a | |||
|  |         add eax, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | void __declspec(naked)SelectCharacter_Hook7() { | |||
|  |     static int address = 0x10F3480; | |||
|  |     _asm | |||
|  |     { | |||
|  |         imul eax, eax, 0x7a | |||
|  |         xor edx, edx | |||
|  |         add eax, 0xA1 | |||
|  |         pushad | |||
|  |         pushfd | |||
|  |     } | |||
|  |     _asm { | |||
|  |         popfd | |||
|  |         popad | |||
|  |         jmp address | |||
|  |     } | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //<2F><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>¼<EFBFBD>Hook
 | |||
|  | typedef void(__fastcall _OpenWindow)(DWORD thisc, DWORD Seat, DWORD a1, char* a2, DWORD a3); | |||
|  | static _OpenWindow* OldOpenWindow; | |||
|  | void __fastcall NewOpenWindow(DWORD thisc, DWORD Seat, DWORD a1, char* a2, DWORD a3) { | |||
|  |     if (*(DWORD*)0x1A5FB20 == thisc) { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"L_OpenOldWindowCallBack", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, a1); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |     } | |||
|  |     OldOpenWindow(thisc, 0, a1, a2, a3); | |||
|  | } | |||
|  | 
 | |||
|  | //<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
 | |||
|  | typedef  void(_11BDC90)(int a1, unsigned int a2, int a3); | |||
|  | static _11BDC90* Old11BDC90; | |||
|  | void New11BDC90(int a1, unsigned int a2, int a3) { | |||
|  |     if (InitGameFlag) { | |||
|  |         int X = *(int*)0x1B4686C; | |||
|  |         int Y = *(int*)0x1B46870; | |||
|  |         if ((X | Y) >= 0) { | |||
|  |             HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |             SQInteger Top = Sq_gettop(v); | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushstring(v, L"L_MouseCallBack", -1); | |||
|  |             if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |                 Sq_pushroottable(v); | |||
|  |                 Sq_pushinteger(v, a1); | |||
|  |                 Sq_pushinteger(v, a2); | |||
|  |                 Sq_pushinteger(v, X); | |||
|  |                 Sq_pushinteger(v, Y); | |||
|  |                 Sq_call(v, 5, SQFalse, SQTrue); | |||
|  |             } | |||
|  |             Sq_settop(v, Top); | |||
|  |         } | |||
|  |     } | |||
|  |     Old11BDC90(a1, a2, a3); | |||
|  |     return; | |||
|  | } | |||
|  | 
 | |||
|  | //N<><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ
 | |||
|  | typedef  int(_fastcall _1030C30)(int a1, int a2, BYTE* a3); | |||
|  | static _1030C30* Old1030C30; | |||
|  | int _fastcall New1030C30(int a1, int a2, BYTE* a3) | |||
|  | { | |||
|  |     int ret = Old1030C30(a1, a2, a3); | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_DrawMiniMapUI", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, 111); | |||
|  |         Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     return ret; | |||
|  | } | |||
|  | 
 | |||
|  | //<2F>ٷ<EFBFBD><D9B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>NutHook
 | |||
|  | typedef  int(_fastcall _674030)(wchar_t* thisc, DWORD Seat, wchar_t* a2, int a3); | |||
|  | static _674030* Old674030; | |||
|  | int _fastcall New674030(wchar_t* thisc, DWORD Seat, wchar_t* a2, int a3) | |||
|  | { | |||
|  |     int ret = Old674030(thisc, Seat, a2, a3); | |||
|  |     return ret; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢHook
 | |||
|  | typedef  int(_fastcall _FA42D0)(int a1, int seat, int a2, int a3); | |||
|  | static _FA42D0* OldFA42D0; | |||
|  | int _fastcall NewFA42D0(int a1, int seat, int a2, int a3) | |||
|  | { | |||
|  |     //OtherPlayerInfoType = a2 + 1;
 | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     SQBool Flag; | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"L_Other_Character_Info_Window", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, *(int*)(a1 + 0xc)); | |||
|  |         Sq_call(v, 2, SQTrue, SQTrue); | |||
|  |         Sq_getbool(v, -1, &Flag); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  | 
 | |||
|  |     if (!Flag)return OldFA42D0(a1, seat, a2, a3); | |||
|  |     return 0; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //DrawMain HOOK
 | |||
|  | typedef DWORD(_fastcall _4C61F0)(DWORD thisc, DWORD Seat); | |||
|  | static _4C61F0* Old4C61F0; | |||
|  | DWORD _fastcall New4C61F0(DWORD thisc, DWORD Seat) | |||
|  | { | |||
|  |     DWORD Ret = Old4C61F0(thisc, Seat); | |||
|  |     if (BaseData.size() > 0 && jiaoben == true && InitGameFlag) { | |||
|  |         Suxn(); | |||
|  |     } | |||
|  |     static bool mouseInit = false; | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
 | |||
|  |     if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+", 0) == 0) { | |||
|  |         if (!InitGameFlag) | |||
|  |         { | |||
|  |             InitGameFlag = true; | |||
|  |         } | |||
|  |     } | |||
|  |     if (InitGameFlag) { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         //std::cout << "A: " << Sq_gettop(v) << std::endl;
 | |||
|  |         //Old1359130(v, *(int*)((char*)0x19E364 + (4 * 5)), *(int*)((char*)0x19E364 + (4 * 6)));
 | |||
|  |         //Old1359130(v, *(int*)((char*)0x19E364 + (4 * 2)), *(int*)((char*)0x19E364 + (4 * 3)));
 | |||
|  |         //std::cout << "Q: " << Sq_gettop(v) << std::endl;
 | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"L_DrawWindow_A", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  | 
 | |||
|  |         Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"L_drawMainCustomUI_All", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |         //std::cout << "H: " << Sq_gettop(v) << std::endl;
 | |||
|  |     } | |||
|  |     return Ret; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | //<2F>˺<EFBFBD><CBBA><EFBFBD><EFBFBD><EFBFBD> HOOK
 | |||
|  | typedef DWORD(_cdecl _7EEED0)(DWORD a1, DWORD a2, DWORD a3, DWORD a4, DWORD a5, DWORD a6); | |||
|  | static _7EEED0* Old7EEED0; | |||
|  | DWORD _cdecl New7EEED0(DWORD a1, DWORD a2, DWORD a3, DWORD a4, DWORD a5, DWORD a6) | |||
|  | { | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     SQBool Flag; | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_PushDamageFontData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, a1); | |||
|  |         Sq_pushinteger(v, a2); | |||
|  |         Sq_pushinteger(v, a3); | |||
|  |         Sq_pushinteger(v, a4); | |||
|  |         Sq_pushinteger(v, a5); | |||
|  |         Sq_pushinteger(v, a6); | |||
|  |         Sq_pushinteger(v, Damage_HookAsm.EDI); | |||
|  |         Sq_pushinteger(v, Damage_HookAsm.EBX); | |||
|  |         Sq_call(v, 9, SQTrue, SQTrue); | |||
|  |         Sq_getbool(v, -1, &Flag); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     if (Flag) { | |||
|  |         return Old7EEED0(a1, a2, a3, a4, a5, a6); | |||
|  |     } | |||
|  |     return 0; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //ע<><D7A2><EFBFBD>հ<EFBFBD>
 | |||
|  | typedef void(__fastcall* init_pack_handler_t)(void* Ecx); | |||
|  | static init_pack_handler_t Lpfn_Init = nullptr; | |||
|  | typedef void(__cdecl* pack_handler_t)(int idx, int err, void*, void*); | |||
|  | typedef void(__cdecl* register_pack_handler_t)(int idx, pack_handler_t handler, int zero); | |||
|  | typedef bool(__cdecl* _Net_Get_Dword)(DWORD*); | |||
|  | static  _Net_Get_Dword Net_Get_Dword = reinterpret_cast<_Net_Get_Dword>(0x011AEA60); | |||
|  | typedef bool(__cdecl* _Net_Get_Buffer)(char*, int); | |||
|  | static _Net_Get_Buffer Net_Get_Buffer = reinterpret_cast<_Net_Get_Buffer>(0x011AEA90); | |||
|  | //130<33><30><EFBFBD>հ<EFBFBD>
 | |||
|  | void Pack_Control(int idx, int code, void* p3, void* p4) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         DWORD Size; | |||
|  |         Net_Get_Dword(&Size); | |||
|  |         char* Buffer = new char[Size + 1]; | |||
|  |         Net_Get_Buffer(Buffer, Size); | |||
|  |         Buffer[Size] = '\0'; | |||
|  | 
 | |||
|  |         wchar_t* ss = DNFTOOL::charTowchar_t(Buffer); | |||
|  | 
 | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  | #ifdef SELL
 | |||
|  |         Sq_pushstring(v, L"Sq_Pack_Control", -1); | |||
|  | #else
 | |||
|  |         Sq_pushstring(v, L"Sq_Pack_ControlLocal", -1); | |||
|  | #endif // SELL
 | |||
|  | 
 | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushstring(v, ss, -1); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |         delete[]ss; | |||
|  |     } | |||
|  | } | |||
|  | void H_Register_Pack(void* Ecx) | |||
|  | { | |||
|  |     Lpfn_Init(Ecx); | |||
|  |     auto Registerfunc = reinterpret_cast<register_pack_handler_t>(0x7186D0); | |||
|  | 
 | |||
|  |     Registerfunc(130, Pack_Control, 0); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //HookNut<75><74><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
 | |||
|  | typedef void(__cdecl _Register_Nut)(); | |||
|  | static _Register_Nut* Register_Nut_Old; | |||
|  | void __cdecl H_Register_Nut() | |||
|  | { | |||
|  |     Register_Nut_Old(); | |||
|  |     static bool Init = false; | |||
|  |     if (!Init) { | |||
|  |         Init = true; | |||
|  |         R_Register_Nut(); | |||
|  |     std::string BaseFile = "YosinBaseC"; | |||
|  |     std::string Base = R"( | |||
|  | Lenheart_P_Update <- true; | |||
|  | function     Sq_L_Medal    (x,y)    {} | |||
|  | function     Sq_SettingWindowCallBack    (x,y)    {} | |||
|  | function     Sq_BuffSwitchingCallBack    (x,y)    {} | |||
|  | function     Sq_SwitchingCallBack    (x,y)    {} | |||
|  | function     Sq_UpgradeCallBack    (x,y)    {} | |||
|  | function     Sq_RecoveryCallBack    (x,y)    {} | |||
|  | function     Sq_RecoveryTypeSetCallBack    (Type)    {} | |||
|  | function     Sq_DrawMainMaxLayerCustomUI    (pack)    {} | |||
|  | function     Lenheart    (VmTop)    {} | |||
|  | function     Sq_MouseEventCallBack    (Lb, Rb, Mb)    {} | |||
|  | function     Sq_SelectCharacter    (Chunk)    {} | |||
|  | function     Sq_DrawMainTopLayerCustomUI    (pack)    {} | |||
|  | function     Sq_GetExeStr_Event    (StrIndex)    {return StrIndex;} | |||
|  | function     Sq_CreatChr    (chunk)    {} | |||
|  | function     Sq_SendPackType_Event    (Type)    {} | |||
|  | function     Sq_SendPackByte_Event    (Parm)    {} | |||
|  | function     Sq_SendPackWord_Event    (Parm)    {} | |||
|  | function     Sq_SendPackDWord_Event    (Parm)    {} | |||
|  | function     Sq_SendPackChar_Event    (Parm)    {} | |||
|  | function     Sq_SendPack_Event    ()    {} | |||
|  | function     Sq_DrawItemBack    (Xpos, Ypos, Image)    {} | |||
|  | function     Sq_DrawItemFront    (Xpos, Ypos, Image)    {} | |||
|  | function     Sq_GetDrawMonBloodSw    ()    {return false;} | |||
|  | function     Sq_DrawMonsterBlood    (Object, X, Y)    {} | |||
|  | function     Sq_Set_Inventory_M_Pos    (This)    {} | |||
|  | function     Sq_Get_Ex_IntData    (SkillAddress, Idx, objAddress)    {return 0;} | |||
|  | function     Sq_Get_Ex_SkillCoolTime    (SkillAddress, Idx, objAddress)    {return 0;} | |||
|  | function     Sq_Get_Ex_LevelData    (SkillAddress, Idx, objAddress)    {return 0;} | |||
|  | function     Sq_PlayerEachPos    (x, y)    {} | |||
|  | function     Sq_DrawMainMaxLayerCustomUI    (pack)    {} | |||
|  | function     Sq_PushDamageFontData    (ObjAddress, X, Y, Z, Value, Type,A8,A9)    { return true;} | |||
|  | function     Sq_PushDamageData(ObjAddress, MySelfAddress, Value); | |||
|  | function     Sq_Pack_Control    (chunk)    {} | |||
|  | function     Sq_MessageWindowDraw    (a,c)    {} | |||
|  | function     Sq_Get_Event_Pos_X    ()    {return 1;} | |||
|  | function     Sq_Get_Event_Pos_Y    ()    {return 1;} | |||
|  | function     Sq_L_OtherPlayerInfo    (x, y, Type, Value, ImgBuf)    {local str = Value.tostring(); local lenght = L_sq_GetStringDrawLength(str); L_sq_DrawImg(ImgBuf, x + 70 - lenght, y + 5);  return Value;} | |||
|  | function     Sq_DrawMiniMapUI (a)    {} | |||
|  | function     Sq_CompleteTask(a1,a2,a3){} | |||
|  | function     L_drawMainCustomUI_All(){} | |||
|  | function L_MouseCallBack(a, b, c,d) {} | |||
|  | function L_DrawWindow_A() {} | |||
|  | function L_DrawWindow_B() {} | |||
|  | function L_OpenOldWindowCallBack(WindowIndex) {} | |||
|  | function L_Old_Window_Get(WindowObject) {} | |||
|  | function L_Character_Info_Window(WindowObject) { return false;} | |||
|  | function L_Other_Character_Info_Window(WindowObject) {return false;} | |||
|  | function L_Old_Window_Visible(WindowObject,Flag) {} | |||
|  | 
 | |||
|  | 
 | |||
|  | getroottable().LenheartBaseFuncTab <- {}; | |||
|  | getroottable().LenheartFuncTab <- {}; | |||
|  | getroottable().Rindro_Scr_Width <- L_sq_RA(0x4D848E); | |||
|  | getroottable().Rindro_Scr_High <- L_sq_RA(0x4D8495); | |||
|  | )"; | |||
|  |     //<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
 | |||
|  |     FILE* file = fopen("sqr/DofileList.nut", "rb"); | |||
|  |     if (file) | |||
|  |     { | |||
|  |         Base += "RINDROLOCAL <- true"; | |||
|  |         fclose(file); | |||
|  |     } | |||
|  |     else { | |||
|  |         Base += "RINDROLOCAL <- false"; | |||
|  |     } | |||
|  | 
 | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  | 
 | |||
|  |     wchar_t* filename = DNFTOOL::charTowchar_t((char*)BaseFile.c_str()); | |||
|  |     wchar_t* str = DNFTOOL::charTowchar_t((char*)Base.c_str()); | |||
|  | 
 | |||
|  |     if (sq_mycompilebuffer(v, str, wcslen(str), filename, false) >= 0) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_call(v, 1, SQTrue, SQFalse); | |||
|  |         Sq_pop(v, 1); | |||
|  |     } | |||
|  | 
 | |||
|  |     delete[]filename; | |||
|  |     delete[]str; | |||
|  | 
 | |||
|  | #ifndef SELL//<2F><><EFBFBD><EFBFBD>ģʽҪ<CABD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD>
 | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"dofile", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"sqr/DofileList.nut", -1); | |||
|  |         Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |     } | |||
|  |     Sq_pop(v, 2); | |||
|  | #endif // !SELL
 | |||
|  |     } | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | //HOOK<4F><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | typedef void(__fastcall* DrawCode)(DWORD thisc, int Seat, int a3, int a4, int a5, int a6); | |||
|  | static DrawCode DrawCodeF; | |||
|  | typedef int(_fastcall _DrawOtherPlayer_Img)(int thisc, void*, int X, int Y, int Img); | |||
|  | static _DrawOtherPlayer_Img* DrawOtherPlayer_Img = (_DrawOtherPlayer_Img*)0x11A8F60; | |||
|  | void _fastcall H_Register_DrawCode(DWORD thisc, int Seat, int a3, int a4, int a5, int a6) | |||
|  | { | |||
|  | 
 | |||
|  | 
 | |||
|  |     wchar_t* strbuffer = (wchar_t*)a6; | |||
|  |     if (strbuffer == NULL)return; | |||
|  | 
 | |||
|  |     wchar_t* clone = new wchar_t[wcslen(strbuffer) + 2]; | |||
|  |     wcscpy(clone, strbuffer); | |||
|  | 
 | |||
|  |     std::string GameStr; | |||
|  |     DNFTOOL::Wchar_tToString(GameStr, clone); | |||
|  |     delete[]clone; | |||
|  | 
 | |||
|  | 
 | |||
|  |     //if (GameStr.find("1/") != std::string::npos) {
 | |||
|  |     //    std::cout << GameStr << std::endl;
 | |||
|  |     //}
 | |||
|  | 
 | |||
|  |     return DrawCodeF(thisc, Seat, a3, a4, a5, a6); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //HOOK Item<65><6D>ɫ
 | |||
|  | extern  std::map< int, int>ItemColorMap; | |||
|  | typedef DWORD(_cdecl _OldHookEquNameColor)(int rarity); | |||
|  | static _OldHookEquNameColor* OldHookEquNameColor; | |||
|  | DWORD _cdecl HookEquNameColor(int rarity) | |||
|  | { | |||
|  |     DWORD OldColor = OldHookEquNameColor(rarity); | |||
|  |     switch (rarity) | |||
|  |     { | |||
|  |     case 6: | |||
|  |         return 0xFF0055FF; | |||
|  |     case 7: | |||
|  |         return 0xFF9314FF; | |||
|  |     case 8: | |||
|  |         return 0xFF1CBC0C; | |||
|  |     case 9: | |||
|  |         return 0xFFACFF08; | |||
|  |     } | |||
|  |     return OldColor; | |||
|  | } | |||
|  | typedef DWORD(_fastcall _OldHookItemColor)(DWORD thisc, DWORD Seat); | |||
|  | static _OldHookItemColor* OldHookItemColor; | |||
|  | DWORD _fastcall HookItemColor(DWORD thisc, DWORD Seat) | |||
|  | { | |||
|  |     int ItemCode = *(int*)(thisc + 0x1C); | |||
|  |     if (ItemColorMap.count(ItemCode) == 1) | |||
|  |     { | |||
|  |         return ItemColorMap[ItemCode]; | |||
|  |     } | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>ɫmap<61><70><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ԭ<EFBFBD><D4AD>ɫ<EFBFBD><C9AB>ȡ
 | |||
|  |     int Rarity = *(int*)(thisc + 0xF4); | |||
|  |     int color = HookEquNameColor(Rarity); | |||
|  | 
 | |||
|  |     return color; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //Hook<6F><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | static SendPacksType _OldSendPackType; | |||
|  | int __fastcall NewSendPacksType(DWORD thisc, int Seat, int Parm) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_SendPackType_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, Parm); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |         return _OldSendPackType(thisc, 0, Parm); | |||
|  |     } | |||
|  |     return _OldSendPackType(thisc, 0, Parm); | |||
|  | } | |||
|  | static SendPacksByte _OldSendPackByte; | |||
|  | int __fastcall NewSendPacksByte(DWORD thisc, int Seat, int Parm) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_SendPackByte_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, Parm); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |     } | |||
|  |     return _OldSendPackByte(thisc, 0, Parm); | |||
|  | } | |||
|  | static SendPacksWORD _OldSendPackWord; | |||
|  | int __fastcall NewSendPacksWord(DWORD thisc, int Seat, int Parm) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_SendPackWord_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, Parm); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |     } | |||
|  |     return _OldSendPackWord(thisc, 0, Parm); | |||
|  | } | |||
|  | static SendPacksDWORD _OldSendPackDWord; | |||
|  | int __fastcall NewSendPacksDWord(DWORD thisc, int Seat, int Parm) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_SendPackDWord_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, Parm); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |     } | |||
|  |     return _OldSendPackDWord(thisc, 0, Parm); | |||
|  | } | |||
|  | static SendPacksChar _OldSendPackChar; | |||
|  | int __fastcall NewSendPacksChar(DWORD thisc, int Seat, char* Parm, int Size) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_SendPackChar_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushstring(v, (SQChar*)Parm, Size); | |||
|  |             Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |     } | |||
|  |     return _OldSendPackChar(thisc, 0, Parm, Size); | |||
|  | } | |||
|  | static SendPacks* _OldSend; | |||
|  | int NewSend() | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_SendPack_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |     } | |||
|  |     return _OldSend(); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //Exe<78><65><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Hook
 | |||
|  | typedef int(_cdecl _sub1220590)(int a1); | |||
|  | static _sub1220590* sub1220590 = (_sub1220590*)0x1220590; | |||
|  | int _cdecl Newsub1220590(int a1) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         SQInteger StrIndex = a1; | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_GetExeStr_Event", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, a1); | |||
|  |             Sq_call(v, 2, SQTrue, SQTrue); | |||
|  |             Sq_getinteger(v, -1, &StrIndex); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  |         return sub1220590(StrIndex); | |||
|  |     } | |||
|  |     return sub1220590(a1); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | //<2F><><EFBFBD><EFBFBD>Item_ͼ<5F><CDBC>
 | |||
|  | typedef int(_fastcall _sub11A8F60)(DWORD a1, DWORD Seat, int a2, int a3, int a4); | |||
|  | static _sub11A8F60* sub11A8F60; | |||
|  | int _fastcall newsub11A8F60(DWORD a1, DWORD Seat, int a2, int a3, int a4) | |||
|  | { | |||
|  |     if (InitGameFlag) | |||
|  |     { | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_DrawItemBack", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, a2); | |||
|  |             Sq_pushinteger(v, a3); | |||
|  |             Sq_pushinteger(v, a4); | |||
|  |             Sq_call(v, 4, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  | 
 | |||
|  |         int ret = sub11A8F60(a1, 0, a2, a3, a4); | |||
|  | 
 | |||
|  |         Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_DrawItemFront", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_pushinteger(v, a2); | |||
|  |             Sq_pushinteger(v, a3); | |||
|  |             Sq_pushinteger(v, a4); | |||
|  |             Sq_call(v, 4, SQFalse, SQTrue); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  | 
 | |||
|  |         return ret; | |||
|  |     } | |||
|  | 
 | |||
|  |     return sub11A8F60(a1, 0, a2, a3, a4); | |||
|  | } | |||
|  | 
 | |||
|  | //<2F>ͼ<EEB6AF><CDBC>
 | |||
|  | typedef DWORD** (_fastcall _Event)(DWORD thisc, DWORD Seat, DWORD a2, DWORD** a3, char a4); | |||
|  | static _Event* OldEvent; | |||
|  | DWORD** _fastcall NewEvent(DWORD thisc, DWORD Seat, DWORD a2, DWORD** a3, char a4) | |||
|  | { | |||
|  |     if ((int)a4 == 1 && (int)a3 == 96527 /*&& a2 <= 536 && ((a2 - 456)%20 == 0)*/)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB8>˻ͼ<EEB6AF><CDBC><EFBFBD><EFBFBD>Y<EFBFBD><59> <20>ڽ<EFBFBD><DABD><EFBFBD>HOOK<4F>Ա<EFBFBD><D4B1><EFBFBD>
 | |||
|  |     { | |||
|  |         int X, Y; | |||
|  |         HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |         SQInteger Top = Sq_gettop(v); | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_Get_Event_Pos_X", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQTrue, SQTrue); | |||
|  |             Sq_getinteger(v, -1, &X); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  | 
 | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushstring(v, L"Sq_Get_Event_Pos_Y", -1); | |||
|  |         if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |             Sq_pushroottable(v); | |||
|  |             Sq_call(v, 1, SQTrue, SQTrue); | |||
|  |             Sq_getinteger(v, -1, &Y); | |||
|  |         } | |||
|  |         Sq_settop(v, Top); | |||
|  | 
 | |||
|  |         a2 += X; | |||
|  |         a3 = (DWORD**)Y; | |||
|  |     } | |||
|  |     return OldEvent(thisc, Seat, a2, a3, a4); | |||
|  | } | |||
|  | 
 | |||
|  | //ѡ<><D1A1>Ƶ<EFBFBD><C6B5>
 | |||
|  | typedef void(_fastcall _10F2700)(DWORD thisc, DWORD Seat, int a2); | |||
|  | static _10F2700* Old10F2700; | |||
|  | void _fastcall New10F2700(DWORD thisc, DWORD Seat, int a2) | |||
|  | { | |||
|  | 
 | |||
|  |     Old10F2700(thisc, Seat, a2); | |||
|  | 
 | |||
|  |     static bool Flag = false; | |||
|  |     if (!Flag && thisc) { | |||
|  |         for (size_t i = 0; i < 29; i++) | |||
|  |         { | |||
|  |             int addr = *(int*)(thisc + (0x4 * i) + 0x1c); | |||
|  |             int value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  |         } | |||
|  |         Flag = true; | |||
|  |     } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |     return; | |||
|  | } | |||
|  | //ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  | typedef void (_fastcall _FC9440)(DWORD thisc, DWORD Seat,int a2); | |||
|  | static _FC9440* OldFC9440; | |||
|  | void _fastcall NewFC9440(DWORD thisc, DWORD Seat,int a2) | |||
|  | { | |||
|  |     OldFC9440(thisc, Seat, a2); | |||
|  |      | |||
|  |     //<2F><>Ϸ<EFBFBD><CFB7>ʼ<EFBFBD><CABC>ť
 | |||
|  |     *(int*)((*(int*)(thisc + 0x1c0)) + 0x14) = 470; | |||
|  | 
 | |||
|  |     return; | |||
|  | } | |||
|  | //ѡ<><D1A1><EFBFBD><EFBFBD>ɫ
 | |||
|  | typedef void(_fastcall _10F7660)(DWORD thisc, DWORD Seat,int a3); | |||
|  | static _10F7660* Old10F7660; | |||
|  | void _fastcall New10F7660(DWORD thisc, DWORD Seat, int a3) | |||
|  | { | |||
|  |     Old10F7660(thisc, Seat, a3); | |||
|  |      | |||
|  |     static bool Flag = false; | |||
|  |     if (!Flag && thisc) { | |||
|  |         //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
 | |||
|  |         for (size_t i = 0; i < 5; i++) | |||
|  |         { | |||
|  |             int addr = *(int*)(thisc + (0x4 * i) + 0x70); | |||
|  |             int value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  |         } | |||
|  | 
 | |||
|  |         //ѡ<><D1A1>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ť
 | |||
|  |         { | |||
|  |             int addr = *(int*)(thisc  + 0x15c); | |||
|  |             int value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  |         } | |||
|  | 
 | |||
|  |         //<2F><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |         for (size_t i = 0; i < 8; i++) | |||
|  |         { | |||
|  |             int addr = *(int*)(thisc + (0x4 * i) + 0xA0); | |||
|  |             int value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  |         } | |||
|  | 
 | |||
|  |         //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>°<EFBFBD>ť
 | |||
|  |         for (size_t i = 0; i < 2; i++) | |||
|  |         { | |||
|  |             int addr = *(int*)(thisc + (0x4 * i) + 0x16c); | |||
|  |             int value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  |         } | |||
|  | 
 | |||
|  |         //ð<><C3B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD> <20><>ť
 | |||
|  |         { | |||
|  |             int addr = *(int*)(thisc + 0x34c); | |||
|  |             int value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  | 
 | |||
|  |             addr = *(int*)(addr + 0x2c0); | |||
|  |             value = *(int*)(addr + 0x14); | |||
|  |             *(int*)(addr + 0x14) = value + 133; | |||
|  |         } | |||
|  |         Flag = true; | |||
|  |     } | |||
|  | 
 | |||
|  |     return ; | |||
|  | } | |||
|  | 
 | |||
|  | //HOOK PushString
 | |||
|  | typedef uint32_t(__cdecl* LSqPushStringFunc)(uint32_t v, const wchar_t* s, uint32_t l); | |||
|  | LSqPushStringFunc LrealSqPushString; | |||
|  | uint32_t __cdecl LMySqPushString(uint32_t v, const wchar_t* s, uint32_t l) | |||
|  | { | |||
|  |     //<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ܹ<EFBFBD><DCB9><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |     if (!wcscmp(s, L"getCurrentModuleDamageRate")) { | |||
|  |         return LrealSqPushString(v, L"L_getCurrentModuleDamageRate", l); | |||
|  |     } | |||
|  |     return LrealSqPushString(v, s, l); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  | //GetIntData
 | |||
|  | typedef DWORD(_fastcall _908510)(DWORD thisc, DWORD Seat, DWORD a2, int a3); | |||
|  | static _908510* Old908510; | |||
|  | DWORD _fastcall New908510(DWORD thisc, DWORD Seat, DWORD a2, int a3) | |||
|  | { | |||
|  |     if (a3 != *(int*)0x1AB7CDC)return Old908510(thisc, Seat, a2, a3); | |||
|  | 
 | |||
|  |     SQInteger NutAddValue = 0; | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_Get_Ex_IntData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, thisc); | |||
|  |         Sq_pushinteger(v, a2); | |||
|  |         Sq_pushinteger(v, a3); | |||
|  |         Sq_call(v, 4, SQTrue, SQTrue); | |||
|  |         Sq_getinteger(v, -1, &NutAddValue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     return NutAddValue + Old908510(thisc, Seat, a2, a3); | |||
|  | } | |||
|  | //<2F><>ȡ<EFBFBD><C8A1>ȴ
 | |||
|  | typedef DWORD(_fastcall _909020)(DWORD thisc, DWORD Seat, DWORD a2, int a3); | |||
|  | static _908510* Old909020; | |||
|  | DWORD _fastcall New909020(DWORD thisc, DWORD Seat, DWORD a2, int a3) | |||
|  | { | |||
|  |     if (a3 != *(int*)0x1AB7CDC)return Old909020(thisc, Seat, a2, a3); | |||
|  |     SQInteger NutAddValue = 0; | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_Get_Ex_IntData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, thisc); | |||
|  |         Sq_pushinteger(v, a2); | |||
|  |         Sq_pushinteger(v, a3); | |||
|  |         Sq_call(v, 4, SQTrue, SQTrue); | |||
|  |         Sq_getinteger(v, -1, &NutAddValue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     return  NutAddValue + Old909020(thisc, Seat, a2, a3); | |||
|  | } | |||
|  | 
 | |||
|  | //ԭ<><D4AD><EFBFBD><EFBFBD>ɫGet
 | |||
|  | typedef DWORD(_fastcall _90A4A0)(DWORD thisc, DWORD Seat, DWORD a2, int a3); | |||
|  | static  _90A4A0* Old90A4A0; | |||
|  | DWORD _fastcall New90A4A0(DWORD thisc, DWORD Seat, DWORD a2, int a3) { | |||
|  |     if (!InitGameFlag)return Old90A4A0(thisc, Seat, a2, a3); | |||
|  |     if (a3 != *(int*)0x1AB7CDC)return Old90A4A0(thisc, Seat, a2, a3); | |||
|  | 
 | |||
|  |     SQInteger NutAddValue = 0; | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_Get_Ex_IntData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, thisc); | |||
|  |         Sq_pushinteger(v, a2); | |||
|  |         Sq_pushinteger(v, a3); | |||
|  |         Sq_call(v, 4, SQTrue, SQTrue); | |||
|  |         Sq_getinteger(v, -1, &NutAddValue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     int ret = NutAddValue + Old90A4A0(thisc, Seat, a2, a3); | |||
|  |     return ret; | |||
|  | } | |||
|  | //<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>
 | |||
|  | typedef int __fastcall sub_TTTTTT(int a1, int a2, int a3); | |||
|  | static sub_TTTTTT* TFuncsub_GetSkillAddress = (sub_TTTTTT*)0x8406C0; | |||
|  | //Nut<75><74>ɫGet1
 | |||
|  | typedef DWORD(_fastcall _BA89D0)(DWORD thisc, DWORD Seat, DWORD a2, DWORD a3, DWORD a4); | |||
|  | static  _BA89D0* OldBA89D0; | |||
|  | DWORD _fastcall NewBA89D0(DWORD thisc, DWORD Seat, DWORD a2, DWORD a3, DWORD a4) { | |||
|  |     if (!InitGameFlag)return OldBA89D0(thisc, Seat, a2, a3, a4); | |||
|  |     if (a3 != *(int*)0x1AB7CDC)return OldBA89D0(thisc, Seat, a2, a3, a4); | |||
|  |     DWORD ADDRESS = TFuncsub_GetSkillAddress(thisc, 0, a3); | |||
|  | 
 | |||
|  |     SQInteger NutAddValue = 0; | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_Get_Ex_LevelData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, ADDRESS); | |||
|  |         Sq_pushinteger(v, a2); | |||
|  |         Sq_pushinteger(v, thisc); | |||
|  |         Sq_call(v, 4, SQTrue, SQTrue); | |||
|  |         Sq_getinteger(v, -1, &NutAddValue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     int ret = NutAddValue + OldBA89D0(thisc, Seat, a2, a3, a4); | |||
|  |     return ret; | |||
|  | } | |||
|  | //Nut<75><74>ɫGet2
 | |||
|  | typedef DWORD(_5A40E0)(DWORD a1, DWORD a2, DWORD a3, DWORD a4); | |||
|  | static  _5A40E0* Old5A40E0; | |||
|  | DWORD  New5A40E0(DWORD a1, DWORD a2, DWORD a3, DWORD a4) { | |||
|  |     if (!InitGameFlag)return  Old5A40E0(a1, a2, a3, a4); | |||
|  |     if (a3 != *(int*)0x1AB7CDC)return Old5A40E0(a1, a2, a3, a4); | |||
|  | 
 | |||
|  |     DWORD ADDRESS = TFuncsub_GetSkillAddress(a1, 0, a2); | |||
|  | 
 | |||
|  |     SQInteger NutAddValue = 0; | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_Get_Ex_LevelData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, ADDRESS); | |||
|  |         Sq_pushinteger(v, a3); | |||
|  |         Sq_pushinteger(v, a1); | |||
|  |         Sq_call(v, 4, SQTrue, SQTrue); | |||
|  |         Sq_getinteger(v, -1, &NutAddValue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  |     int ret = NutAddValue + Old5A40E0(a1, a2, a3, a4); | |||
|  |     return ret; | |||
|  | } | |||
|  | //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HOOK
 | |||
|  | typedef struct LevelDataBuffer | |||
|  | { | |||
|  |     DWORD SkillAddresss; | |||
|  |     DWORD SkillIdx; | |||
|  |     DWORD ObjectAddress; | |||
|  | 
 | |||
|  | } RELevelDataBufferG; | |||
|  | LevelDataBuffer _LevelDataBuffer = { 0 }; | |||
|  | typedef DWORD(_75D1F0)(DWORD thisc); | |||
|  | static  _75D1F0* Old75D1F0; | |||
|  | DWORD  New75D1F0(DWORD thisc) { | |||
|  |     if (!InitGameFlag)return Old75D1F0(thisc); | |||
|  |     if (_LevelDataBuffer.ObjectAddress != *(int*)0x1AB7CDC)return Old75D1F0(thisc); | |||
|  | 
 | |||
|  |     SQInteger NutAddValue = 0; | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"Sq_Get_Ex_LevelData", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, _LevelDataBuffer.SkillAddresss); | |||
|  |         Sq_pushinteger(v, _LevelDataBuffer.SkillIdx); | |||
|  |         Sq_pushinteger(v, _LevelDataBuffer.ObjectAddress); | |||
|  |         Sq_call(v, 4, SQTrue, SQTrue); | |||
|  |         Sq_getinteger(v, -1, &NutAddValue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  | 
 | |||
|  |     if (NutAddValue != 0) { | |||
|  |         int ret = NutAddValue + Old75D1F0(thisc); | |||
|  |         _LevelDataBuffer.SkillAddresss = 0; | |||
|  |         _LevelDataBuffer.SkillIdx = 0; | |||
|  |         _LevelDataBuffer.ObjectAddress = 0; | |||
|  |         return ret; | |||
|  |     } | |||
|  |     return Old75D1F0(thisc); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | typedef DWORD(__fastcall _44E620)(void* thisc,DWORD Seat); | |||
|  | static  _44E620* Old44E620; | |||
|  | DWORD __fastcall New44E620(void* thisc, DWORD Seat) { | |||
|  |     //*(int*)((char*)thisc + 0xC) = 256;
 | |||
|  |     DWORD Ret = Old44E620(thisc, Seat); | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"L_Old_Window_Get", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, (int)thisc); | |||
|  |         Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  | 
 | |||
|  |     return Ret; | |||
|  | } | |||
|  | 
 | |||
|  | typedef char(__fastcall _11B3B70)(void* thisc, DWORD Seat,char Flag); | |||
|  | static  _11B3B70* Old11B3B70; | |||
|  | char __fastcall New11B3B70(void* thisc, DWORD Seat, char Flag) { | |||
|  | 
 | |||
|  |     char Ret = Old11B3B70(thisc, Seat, Flag); | |||
|  | 
 | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"L_Old_Window_Visible", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, (int)thisc); | |||
|  |         Sq_pushinteger(v, (int)Flag); | |||
|  |         Sq_call(v, 3, SQFalse, SQTrue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  | 
 | |||
|  |     return Ret; | |||
|  | } | |||
|  | 
 | |||
|  | typedef char(__fastcall _11D43A0)(void* thisc, DWORD Seat); | |||
|  | static  _11D43A0* Old11D43A0; | |||
|  | char __fastcall New11D43A0(void* thisc, DWORD Seat) { | |||
|  | 
 | |||
|  |     //char Ret = Old11D43A0(thisc, Seat);
 | |||
|  | 
 | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     SQBool Flag; | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"L_Character_Info_Window", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, (int)thisc); | |||
|  |         Sq_call(v, 2, SQTrue, SQTrue); | |||
|  |         Sq_getbool(v, -1, &Flag); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  | 
 | |||
|  |     if(!Flag)return Old11D43A0(thisc, Seat); | |||
|  |     return 0; | |||
|  | } | |||
|  | 
 | |||
|  | typedef DWORD(__fastcall _7CDA30)(void* thisc, DWORD Seat, DWORD*a2, DWORD a3, DWORD a4, DWORD a5, DWORD a6); | |||
|  | static  _7CDA30* Old7CDA30; | |||
|  | DWORD __fastcall New7CDA30(void* thisc, DWORD Seat, DWORD* a2, DWORD a3, DWORD a4, DWORD a5, DWORD a6) { | |||
|  | 
 | |||
|  |     DWORD Ret = Old7CDA30(thisc, Seat, a2, a3, a4, a5, a6); | |||
|  | 
 | |||
|  |     //std::cout << "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: " << *(int*)((int)thisc + 0x638) << std::endl;
 | |||
|  | 
 | |||
|  |     HSQUIRRELVM v = *(HSQUIRRELVM*)0x1AF3544; | |||
|  |     SQInteger Top = Sq_gettop(v); | |||
|  |     SQBool Flag; | |||
|  |     Sq_pushroottable(v); | |||
|  |     Sq_pushstring(v, L"L_Sync_Camera_Pos", -1); | |||
|  |     if (SQ_SUCCEEDED(Sq_get(v, -2))) { | |||
|  |         Sq_pushroottable(v); | |||
|  |         Sq_pushinteger(v, *(int*)((int)thisc + 0x638)); | |||
|  |         Sq_call(v, 2, SQFalse, SQTrue); | |||
|  |     } | |||
|  |     Sq_settop(v, Top); | |||
|  | 
 | |||
|  |     return Ret; | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | typedef int(_fastcall _Get_Img)(int thisc, void*, int a2); | |||
|  | static _Get_Img* OldGet_Img; | |||
|  | int _fastcall NewGet_Img(int thisc, void*, int a2) { | |||
|  | 
 | |||
|  |     if (a2 == 76) { | |||
|  |         std::cout << 12123123 << std::endl; | |||
|  |     } | |||
|  |     return OldGet_Img(thisc, 0, a2); | |||
|  | } | |||
|  | 
 | |||
|  | typedef int(_fastcall _4294A0)(int thisc, void*,int a2); | |||
|  | static _4294A0* Old4294A0; | |||
|  | int _fastcall New4294A0(int thisc, void*,int a2) { | |||
|  | 
 | |||
|  |     return 0; | |||
|  |     return Old4294A0(thisc, 0,a2); | |||
|  | } | |||
|  | 
 | |||
|  | 
 | |||
|  | void RegisterHook() { | |||
|  | 
 | |||
|  |     //InlineHook///
 | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD>Ҳ˵<D2B2>ѡ<EFBFBD><D1A1>HOOK <20>лص<D0BB>
 | |||
|  |     inlinehook SSS(0x001004B52, (int)&PlayerEach2); | |||
|  |     SSS.Motify_address(); | |||
|  |     //<2F><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |     //inlinehook MMM(0x011BDE05, (int)&MouseWheelUp);
 | |||
|  |     //MMM.Motify_address();
 | |||
|  |     //<2F><><EFBFBD>ڻ<EFBFBD><DABB><EFBFBD>HOOK
 | |||
|  |     inlinehook WindowDrawHook(0x066BE9A, (int)&DrawWindow_B_Hook); | |||
|  |     WindowDrawHook.Motify_address(); | |||
|  |     //<2F>˺<EFBFBD>HOOK
 | |||
|  |     inlinehook DamageHook(0xE5A2DE, (int)&Damage_Hook); | |||
|  |     DamageHook.Motify_address(); | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |     //Fundction Hook//
 | |||
|  |     MH_Initialize(); | |||
|  | 
 | |||
|  | 
 | |||
|  |     //<2F>ر<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD>̳<EFBFBD>
 | |||
|  |     //MH_CreateHook((void*)0x4294A0, &New4294A0, reinterpret_cast<void**>(&Old4294A0));
 | |||
|  |     //MH_EnableHook((void*)0x4294A0);
 | |||
|  | 
 | |||
|  | 
 | |||
|  |     //MH_CreateHook((void*)0x11AA190, &NewGet_Img, reinterpret_cast<void**>(&OldGet_Img));
 | |||
|  |     //MH_EnableHook((void*)0x11AA190);
 | |||
|  | 
 | |||
|  |     //<2F><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>HOOK
 | |||
|  |     MH_CreateHook((void*)0x7CDA30, &New7CDA30, reinterpret_cast<void**>(&Old7CDA30)); | |||
|  |     MH_EnableHook((void*)0x7CDA30); | |||
|  | 
 | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD>¼<EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x44E620, &New44E620, reinterpret_cast<void**>(&Old44E620)); | |||
|  |     MH_EnableHook((void*)0x44E620); | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>¼<EFBFBD>Hook  Ϊ<><CEAA>дUI<55><49><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD>Ⱦ<EFBFBD><C8BE><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD>Ϊ<EFBFBD>²<EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0xE6E070, &NewOpenWindow, reinterpret_cast<void**>(&OldOpenWindow)); | |||
|  |     MH_EnableHook((void*)0xE6E070); | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>HOOK
 | |||
|  |     MH_CreateHook((void*)0x11BDC90, &New11BDC90, reinterpret_cast<void**>(&Old11BDC90)); | |||
|  |     MH_EnableHook((void*)0x11BDC90); | |||
|  | 
 | |||
|  |     //N<><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ
 | |||
|  |     MH_CreateHook((void*)0x1030C30, &New1030C30, reinterpret_cast<void**>(&Old1030C30)); | |||
|  |     MH_EnableHook((void*)0x1030C30); | |||
|  | 
 | |||
|  |     //<2F>ٷ<EFBFBD><D9B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>NutHook
 | |||
|  |     MH_CreateHook((void*)0x674030, &New674030, reinterpret_cast<void**>(&Old674030)); | |||
|  |     MH_EnableHook((void*)0x674030); | |||
|  | 
 | |||
|  | 
 | |||
|  | 
 | |||
|  |     //DrawMain HOOK
 | |||
|  |     MH_CreateHook((void*)0x4C61F0, &New4C61F0, reinterpret_cast<void**>(&Old4C61F0)); | |||
|  |     MH_EnableHook((void*)0x4C61F0); | |||
|  | 
 | |||
|  |     //<2F>˺<EFBFBD><CBBA><EFBFBD><EFBFBD><EFBFBD> HOOK
 | |||
|  |     MH_CreateHook((void*)0x7EEED0, &New7EEED0, reinterpret_cast<void**>(&Old7EEED0)); | |||
|  |     MH_EnableHook((void*)0x7EEED0); | |||
|  | 
 | |||
|  |     //Hook<6F>հ<EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x721EA0, &H_Register_Pack, reinterpret_cast<void**>(&Lpfn_Init)); | |||
|  |     MH_EnableHook((void*)0x721EA0); | |||
|  | 
 | |||
|  |     //HookNut<75><74><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
 | |||
|  |     MH_CreateHook((void*)0x67B910, &H_Register_Nut, reinterpret_cast<void**>(&Register_Nut_Old)); | |||
|  |     MH_EnableHook((void*)0x67B910); | |||
|  | 
 | |||
|  |     //Hook<6F><6B><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x1206BD0, &H_Register_DrawCode, reinterpret_cast<void**>(&DrawCodeF)); | |||
|  |     MH_EnableHook((void*)0x1206BD0); | |||
|  | 
 | |||
|  | 
 | |||
|  |     //HOOK<4F><4B>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
 | |||
|  |     MH_CreateHook((void*)0x7AB080, &HookItemColor, reinterpret_cast<void**>(&OldHookItemColor)); | |||
|  |     MH_EnableHook((void*)0x7AB080); | |||
|  | 
 | |||
|  |     //HOOK<4F><4B><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ɫ
 | |||
|  |     MH_CreateHook((void*)0x7AAD00, &HookEquNameColor, reinterpret_cast<void**>(&OldHookEquNameColor)); | |||
|  |     MH_EnableHook((void*)0x7AAD00); | |||
|  | 
 | |||
|  |     //Hook<6F><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |     //HOOK<4F><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |     //MH_CreateHook((void*)0x1127D60, &NewSendPacksType, reinterpret_cast<void**>(&_OldSendPackType));
 | |||
|  |     //MH_EnableHook((void*)0x1127D60);
 | |||
|  |     //MH_CreateHook((void*)0x1128550, &NewSendPacksByte, reinterpret_cast<void**>(&_OldSendPackByte));
 | |||
|  |     //MH_EnableHook((void*)0x1128550);
 | |||
|  |     //MH_CreateHook((void*)0x1128580, &NewSendPacksWord, reinterpret_cast<void**>(&_OldSendPackWord));
 | |||
|  |     //MH_EnableHook((void*)0x1128580);
 | |||
|  |     //MH_CreateHook((void*)0x11285B0, &NewSendPacksDWord, reinterpret_cast<void**>(&_OldSendPackDWord));
 | |||
|  |     //MH_EnableHook((void*)0x11285B0);
 | |||
|  |     //MH_CreateHook((void*)0x11285E0, &NewSendPacksChar, reinterpret_cast<void**>(&_OldSendPackChar));
 | |||
|  |     //MH_EnableHook((void*)0x11285E0);
 | |||
|  |     MH_CreateHook((void*)0x1127EC0, &NewSend, reinterpret_cast<void**>(&_OldSend)); | |||
|  |     MH_EnableHook((void*)0x1127EC0); | |||
|  | 
 | |||
|  |     //exe<78>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x1220590, &Newsub1220590, reinterpret_cast<void**>(&sub1220590)); | |||
|  |     MH_EnableHook((void*)0x1220590); | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD>Item_ͼ<5F><CDBC>
 | |||
|  |     MH_CreateHook((void*)0x11A8F60, &newsub11A8F60, reinterpret_cast<void**>(&sub11A8F60)); | |||
|  |     MH_EnableHook((void*)0x11A8F60); | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰ټ<CBB0>UI
 | |||
|  |     FILE* file = fopen("ImagePacks2/!HUD_Yosin<69>ټ<EFBFBD>UI.NPK", "rb"); | |||
|  |     if (file) { | |||
|  |         //BUFFͼ<46><CDBC> <20><>ʾ
 | |||
|  |         inlinehook BuffIconHook(0x04C8C14, (int)&BuffIcon_Hook); | |||
|  |         BuffIconHook.Motify_address(); | |||
|  |         //BUFFͼ<46><CDBC> <20><><EFBFBD>ֱ<EFBFBD>ʶ
 | |||
|  |         inlinehook BuffIconHookB(0x04BF55E, (int)&BuffIcon_Hook_B); | |||
|  |         BuffIconHookB.Motify_address(); | |||
|  |         //Ѫ<>۱<EFBFBD><DBB1><EFBFBD>
 | |||
|  |         inlinehook HudBloodBackgroundHook(0x04CA035, (int)&HudBloodBackground); | |||
|  |         HudBloodBackgroundHook.Motify_address(); | |||
|  | 
 | |||
|  |         //<2F>ͼ<EEB6AF><CDBC>
 | |||
|  |         MH_CreateHook((void*)0x11B4030, &NewEvent, reinterpret_cast<void**>(&OldEvent)); | |||
|  |         MH_EnableHook((void*)0x11B4030); | |||
|  | 
 | |||
|  |         //ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |         //MH_CreateHook((void*)0xFC9440, &NewFC9440, reinterpret_cast<void**>(&OldFC9440));
 | |||
|  |         //MH_EnableHook((void*)0xFC9440);
 | |||
|  |         //ѡ<><D1A1>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |         MH_CreateHook((void*)0x10F2700, &New10F2700, reinterpret_cast<void**>(&Old10F2700)); | |||
|  |         MH_EnableHook((void*)0x10F2700); | |||
|  |         //ѡ<><D1A1><EFBFBD><EFBFBD>ɫ
 | |||
|  |         MH_CreateHook((void*)0x10F7660, &New10F7660, reinterpret_cast<void**>(&Old10F7660)); | |||
|  |         MH_EnableHook((void*)0x10F7660); | |||
|  |         inlinehook SelectCharacter(0x10F79C9, (int)&SelectCharacter_Hook); | |||
|  |         SelectCharacter.Motify_address(); | |||
|  |         inlinehook SelectCharacter1(0x10F7B43, (int)&SelectCharacter_Hook1); | |||
|  |         SelectCharacter1.Motify_address(); | |||
|  |         inlinehook SelectCharacter2(0x10F7F89, (int)&SelectCharacter_Hook2); | |||
|  |         SelectCharacter2.Motify_address(); | |||
|  |         inlinehook SelectCharacter3(0x10F8311, (int)&SelectCharacter_Hook3); | |||
|  |         SelectCharacter3.Motify_address(); | |||
|  |         inlinehook SelectCharacter4(0x10F8436, (int)&SelectCharacter_Hook4); | |||
|  |         SelectCharacter4.Motify_address(); | |||
|  |         inlinehook SelectCharacter5(0x10F85EA, (int)&SelectCharacter_Hook5); | |||
|  |         SelectCharacter5.Motify_address(); | |||
|  |         inlinehook SelectCharacter6(0x10F2C6E, (int)&SelectCharacter_Hook6); | |||
|  |         SelectCharacter6.Motify_address(); | |||
|  |         inlinehook SelectCharacter7(0x10F3478, (int)&SelectCharacter_Hook7); | |||
|  |         SelectCharacter7.Motify_address(); | |||
|  |         fclose(file); | |||
|  |     } | |||
|  | 
 | |||
|  |     //HOOK PushString
 | |||
|  |     MH_CreateHook((void*)0x1358A60, &LMySqPushString, reinterpret_cast<void**>(&LrealSqPushString)); | |||
|  |     MH_EnableHook((void*)0x1358A60); | |||
|  | 
 | |||
|  |     //<2F><>ȡ<EFBFBD><C8A1>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x908510, &New908510, reinterpret_cast<void**>(&Old908510)); | |||
|  |     MH_EnableHook((void*)0x908510); | |||
|  |     //<2F><>ȡ<EFBFBD><C8A1>ȴ
 | |||
|  |     MH_CreateHook((void*)0x909020, &New909020, reinterpret_cast<void**>(&Old909020)); | |||
|  |     MH_EnableHook((void*)0x909020); | |||
|  |     //<2F><>ȡ<EFBFBD><C8A1>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x090A4A0, &New90A4A0, reinterpret_cast<void**>(&Old90A4A0)); | |||
|  |     MH_EnableHook((void*)0x090A4A0); | |||
|  |     MH_CreateHook((void*)0x0BA89D0, &NewBA89D0, reinterpret_cast<void**>(&OldBA89D0)); | |||
|  |     MH_EnableHook((void*)0x0BA89D0); | |||
|  |     MH_CreateHook((void*)0x05A40E0, &New5A40E0, reinterpret_cast<void**>(&Old5A40E0)); | |||
|  |     MH_EnableHook((void*)0x05A40E0); | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HOOK
 | |||
|  |     MH_CreateHook((void*)0x075D1F0, &New75D1F0, reinterpret_cast<void**>(&Old75D1F0)); | |||
|  |     MH_EnableHook((void*)0x075D1F0); | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x11B3B70, &New11B3B70, reinterpret_cast<void**>(&Old11B3B70)); | |||
|  |     MH_EnableHook((void*)0x11B3B70); | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
 | |||
|  |     MH_CreateHook((void*)0x11D43A0, &New11D43A0, reinterpret_cast<void**>(&Old11D43A0)); | |||
|  |     MH_EnableHook((void*)0x11D43A0); | |||
|  | 
 | |||
|  | 
 | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢHook <20><>ֵ
 | |||
|  |     MH_CreateHook((void*)0xFA42D0, &NewFA42D0, reinterpret_cast<void**>(&OldFA42D0)); | |||
|  |     MH_EnableHook((void*)0xFA42D0); | |||
|  |     //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϢHook ͼ<><CDBC>
 | |||
|  |     //MH_CreateHook((void*)0xFA8230, &NewFA8230, reinterpret_cast<void**>(&OldFA8230));
 | |||
|  |     //MH_EnableHook((void*)0xFA8230);
 | |||
|  | } |