V-JoinServer.asm
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:3k
源码类别:
模拟服务器
开发平台:
Asm
- ;EasyCodeName=Module1,1
- ;-----------------------------------------------------------------------------------
- ; VeMU
- ; Its a package that allows the user to set his own server of the game
- ; "MuOnline", this is not an emulator since i am not "emulating"
- ; what the actual games does, i am "creating" a method for set a Server
- ; of this Game.
- ;
- ; Copyright (C) 2010 FelipeYa馿z
- ;
- ; This program is free software: you can redistribute it and/or modify
- ; it under the terms of the GNU General Public License as published by
- ; the Free Software Foundation, either version 3 of the License, or
- ; (at your option) any later version.
- ;
- ; This program is distributed in the hope that it will be useful,
- ; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ; GNU General Public License for more details.
- ;
- ; You should have received a copy of the GNU General Public License
- ; along with this program. If not, see http://www.gnu.org/licenses/.
- ;-----------------------------------------------------------------------------------
- ;-----------------------------------------------------------------------------------
- ; -----------------
- ; Coded /
- ; By /
- ; -={FeN$x)=-
- ; / Felipe Y.
- ; /
- ; -----------------
- ; Programming Lang: ASM
- ; Country: Chile
- ; My respect for all those who lost their lifes
- ; In the earthquake of my country...
- ; Let god take their spirits home...
- ;-----------------------------------------------------------------------------------
- V_JS_ProtocolCore Proto :DWord, :DWord, :DWord
- .Const
- .Data?
- .Data
- .Code
- V_JS_ProtocolCore Proc PacketHeader:DWord, pRecvBuffer:DWord, PacketLength:DWord
- .const
- JSProto_MaxHeader Equ 7BH
- .Data
- ;===========
- ;Case Code
- ;===========
- JSCaseCode Byte 2 Dup (0, 1)
- ;===========
- ;jump table
- ;===========
- Align 4
- JSjmpTable DD Offset JSCase0
- DD Offset JSCase1
- .Code
- Mov Eax, PacketHeader
- .If (Eax > JSProto_MaxHeader)
- .Else
- Xor Ecx, Ecx
- Mov Cl, Byte Ptr [Eax + JSCaseCode] ;Tomo el case code, ejemplo si el PacketHeader fuera 01 entonces obtendria el Case 1
- Jmp DWord Ptr [Ecx * 4 + JSjmpTable] ;Jump table optimisada de un .switch (C++)
- JSCase0: ;Invalid case, no me gusta el SubHeader 00
- Jmp JSEndProcedure
- JSCase1: ;SubHeader 01
- Jmp JSEndProcedure
- .Endif
- JSEndProcedure:
- Ret
- V_JS_ProtocolCore EndP