奇迹mu游戏服务器[GS修改]添加扩展DLL的方法
奇迹mu游戏服务器添加扩展DLL的方法不是技术的技术0050A260 .添加扩展DLL的方法:
68 6C737005 PUSH gameserv.0570736C0050A265 .
68 746D6800 PUSH gameserv.00686D74 ;ASCII "1.02.05"0050A26A .
6A 00 PUSH 00050A26C . 8A0D 48549A06 MOV CL,BYTE PTR DS:0050A272 . 51 PUSH ECX0050A273 . 8B15 70549A06 MOV EDX,DWORD PTR DS:0050A279 . 52 PUSH EDX0050A27A . B9 C852D806 MOV ECX,gameserv.06D852C80050A27F . E8 DF91EFFF CALL gameserv.00403463装载文件完毕后开始正式启动的时候加0050A284 . E8 771D0A00 CALL gameserv.005AC000 这里我们自己添加的,直接跳转的添加DLL的代码005AC000 /$ 68 40C05A00 PUSH gameserv.005AC040 ; /FileName = "PNProc.dll"\\005AC040= "PNProc.dll"\\其他的类同005AC005 |. E8 4274FCFF CALL <JMP.&;KERNEL32.LoadLibraryA> ; \LoadLibraryA005AC00A |. 09C0 OR EAX,EAX005AC00C |. 0F84 9B000000 JE gameserv.005AC0AD005AC012 |. 68 50C05A00 PUSH gameserv.005AC050 ; /ProcNameOrOrdinal = "PNLoadProc"005AC017 |. 50 PUSH EAX ; |hModule005AC018 |. E8 2974FCFF CALL <JMP.&;KERNEL32.GetProcAddress> ; \GetProcAddress\\这个就是获取DLL中函数的API\\我的函数名字为PNLoadProc005AC01D |. A3 60C15A00 MOV DWORD PTR DS:,EAX005AC022 |. 09C0 OR EAX,EAX005AC024 |. 0F84 83000000 JE gameserv.005AC0AD005AC02A |. EB 65 JMP SHORT gameserv.005AC091 \\
这里跳转到下面对DLL进行处理...005AC091 |> \6A 30 PUSH 30 ; /Style = MB_OK|MB_ICONEXCLAMATION|MB_APPLMODAL005AC093 |. 68 D0C05A00 PUSH gameserv.005AC0D0 ; |Title = "文件加载完成..."005AC098 |. 68 F0C05A00 PUSH gameserv.005AC0F0 ; |Text = "PNProc.dll加载完成,正在进行其它装载..."005AC09D |. 6A 00 PUSH 0 ; |hOwner = NULL005AC09F |. FF15 1082D906 CALL DWORD PTR DS:[<&;USER32.MessageBoxA>>; \MessageBoxA005AC0A5 |. A1 60C15A00 MOV EAX,DWORD PTR DS:005AC0AA |. FFD0 CALL EAX \\正式调用DLL中函数005AC0AC |. C3 RETN005AC0AD |> 6A 10 PUSH 10 ; /Style = MB_OK|MB_ICONHAND|MB_APPLMODAL005AC0AF |. 68 20C15A00 PUSH gameserv.005AC120 ; |Title = "发生错误!"005AC0B4 |. 68 30C15A00 PUSH gameserv.005AC130 ; |Text = "PNProc.dll加载出错,程序不能正常运行..."005AC0B9 |. 6A 00 PUSH 0 ; |hOwner = NULL005AC0BB |. FF15 1082D906 CALL DWORD PTR DS:[<&;USER32.MessageBoxA>>; \MessageBoxA005AC0C1 \. C3 RETN
页:
[1]