Log in

View Full Version : Linex 1.0.3 DLL -- Random Party Loot Fix?


mcrabben7
03.06.2006, 14:42
Here some code snippets from a disassembled linex 1.0.3 dll (the unpacked one):

First Section of Function RecvPacket:
.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:
.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:
.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.

kelviow2
03.06.2006, 16:41
post DLL

kepler001
03.06.2006, 16:55
and fix max lvl 78 for fix bug exp lvl 79 and lvl 80

mcrabben7
03.06.2006, 18:35
The DLL is available for downloads on these forums, just go LOOK for it.

Also, the lvl 78 bug can be fixed, sure, but it's really not a big deal imho. Low priority lol.

There are a few bugs with del taking 0 days 0 hrs 0 mins and clan penalties and some other things. But, those variables are all listed and can easily be given proper values.



Does anyone know where I can jump inside that file and write some more code? I was thinking of adding it to the end but the PE_Exe Format I believe has a .data section at the end, but again, I could be wrong heh. Might go look up the PE format diagram again, or something :P

Btw, whenever I run this through Ollydbg it will crash whenever it tries to debug inside the DLL. I can't seem to get it to debug. I want to debug it >.<

I can think of one way to fix this too...make a DLL to inject linex.dll with a fix xD

Again, help would be appreciated. I posted this for hex help, not for "gimme DLL" posts.

top-gear
04.06.2006, 17:45
do you know how can we fix /invite crash?

hel
04.06.2006, 18:00
top-gear:
Just use Linex 1.0.3.

ShinHawk
05.06.2006, 02:40
no point in making max level 78, in C5 its going upto 80 anyway, why make more work for people in C5

mcrabben7
05.06.2006, 16:28
Seems this was already fixed. I tried anyways =)