Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 General

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 03.06.2006, 14:42   #1
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default Linex 1.0.3 DLL -- Random Party Loot Fix?

Here some code snippets from a disassembled linex 1.0.3 dll (the unpacked one):

First Section of Function RecvPacket:
Code:
.text:10007BA8 RecvPacket      proc near               ; CODE XREF: .text:10007DFCp
.text:10007BA8 
.text:10007BA8 var_8           = dword ptr -8
.text:10007BA8 var_4           = dword ptr -4
.text:10007BA8 arg_0           = dword ptr  8
.text:10007BA8 arg_4           = dword ptr  0Ch
.text:10007BA8 
.text:10007BA8                 push    ebp
.text:10007BA9                 mov     ebp, esp
.text:10007BAB                 add     esp, 0FFFFFFF8h
.text:10007BAE                 push    ebx
.text:10007BAF                 push    edi
.text:10007BB0                 push    esi
.text:10007BB1                 mov     ebx, [ebp+arg_0]
.text:10007BB4                 mov     edi, [ebp+arg_4]
.text:10007BB7                 mov     eax, [edi+1394h]
.text:10007BBD                 mov     [ebp+var_8], eax
.text:10007BC0                 cmp     [ebp+var_8], 0
.text:10007BC4                 jnz     short loc_10007BCF
.text:10007BC6                 xor     eax, eax
.text:10007BC8                 pop     esi
.text:10007BC9                 pop     edi
.text:10007BCA                 pop     ebx
.text:10007BCB                 leave
.text:10007BCC                 retn    8

plus does a few stack pointer manipulations down here before it starts checking packet headers, probably to fix the 208 error.
Function RecvPacket analyzing packet header 29h and the one before it:
Code:
.text:10007C44 loc_10007C44:                           ; CODE XREF: RecvPacket+87j
.text:10007C44                 cmp     eax, 21h
.text:10007C47                 jnz     short loc_10007C5C
.text:10007C49                 push    [ebp+arg_4]
.text:10007C4C                 push    [ebp+var_8]
.text:10007C4F                 push    [ebp+arg_0]
.text:10007C52                 call    sub_100062A0
.text:10007C57                 jmp     RecvPacketEnd
.text:10007C5C ;---------------------------------------------------------------------------
.text:10007C5C 
.text:10007C5C loc_10007C5C:                           ; CODE XREF: RecvPacket+9Fj
.text:10007C5C                 cmp     eax, 29h
.text:10007C5F                 jnz     short loc_10007C6E
.text:10007C61                 push    [ebp+arg_0]
.text:10007C64                 call    RecvPartyPacket
.text:10007C69                 jmp     RecvPacketEnd
.text:10007C6E ; ---------------------------------------------------------------------------
Function RecvPartyPacket:
Code:
.text:100064AB RecvPartyPacket proc near               ; CODE XREF: RecvPacket+BCp
.text:100064AB 
.text:100064AB var_4           = dword ptr -4
.text:100064AB arg_0           = dword ptr  8
.text:100064AB 
.text:100064AB                 push    ebp
.text:100064AC                 mov     ebp, esp
.text:100064AE                 add     esp, 0FFFFFFFCh
.text:100064B1                 push    ebx
.text:100064B2                 push    esi
.text:100064B3                 push    edi
.text:100064B4                 mov     ebx, [ebp+arg_0]
.text:100064B7                 lea     ecx, [ebx+1]
.text:100064BA                 push    ecx
.text:100064BB                 call    CharNameToObjectID
.text:100064C0                 or      eax, eax
.text:100064C2                 jz      short loc_100064CA
.text:100064C4                 mov     ecx, [eax+18h]
.text:100064C7                 mov     [ebp+var_4], ecx
.text:100064CA 
.text:100064CA loc_100064CA:                           ; CODE XREF: RecvPartyPacket+17j
.text:100064CA                 mov     eax, [ebp+var_4]
.text:100064CD                 mov     [ebx+1], eax
.text:100064D0                 mov     word ptr [ebx-2], 7
.text:100064D6                 pop     edi
.text:100064D7                 pop     esi
.text:100064D8                 pop     ebx
.text:100064D9                 leave
.text:100064DA                 retn    4
.text:100064DA RecvPartyPacket endp
I think I know how to fix it. I think all we need to do is make room to push [ebp+var_8] and maybe push [ebp+arg_4] as well.

Not 100% sure on how to modify the RecvPartyPacket function itself, since doing ESP manipulation is very annoying.

Also, there isn't any room left to edit in any new lines. Any programs that can 'push' all the lower code down and adjust the jump addresses / data addresses?

Anyways, would love for someone else to be able to help me finish a fix for this. Hints are helpful too. I've been trying to cmpare it to the cracked zzcats dll, but it handles the packet header comparisons using some funky ptr manipulation. I found the PartyPacketRecv function there if anyone is curious.
mcrabben7 is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 23:38.