cleanup 59NL NoSellRare client patch
This commit is contained in:
@@ -1,71 +1,27 @@
|
|||||||
# Credits to Soly from Blue Burst Patch Project
|
# Credits to Soly from Blue Burst Patch Project
|
||||||
|
|
||||||
.meta name="No rare selling"
|
.meta name="Unsellable rare items"
|
||||||
.meta description="Stops you from accidentally\nselling rares to vendor"
|
.meta description="Stops you from accidentally\nselling rares to vendor"
|
||||||
|
|
||||||
entry_ptr:
|
entry_ptr:
|
||||||
reloc0:
|
reloc0:
|
||||||
.offsetof start
|
.offsetof start
|
||||||
start:
|
start:
|
||||||
push ebx
|
xor eax, eax
|
||||||
jmp get_patch_data_ptr
|
mov [0x005D25AF], eax # Rare Armor
|
||||||
|
mov [0x005D26F1], eax # Untekked Weapons
|
||||||
get_patch_data_ptr_ret:
|
mov [0x005D2706], eax # Rare Weapons
|
||||||
pop ebx # ebx = patch header
|
|
||||||
|
|
||||||
apply_next_patch:
|
|
||||||
cmp dword [ebx + 4], 0
|
|
||||||
jne copy_code_and_apply_again
|
|
||||||
pop ebx
|
|
||||||
jmp patch_code_start
|
|
||||||
|
|
||||||
copy_code_and_apply_again:
|
|
||||||
xor ecx, ecx # ecx = offset
|
|
||||||
mov edx, [ebx] # edx = dest addr
|
|
||||||
|
|
||||||
copy_next_byte:
|
|
||||||
mov al, [ebx + ecx + 8] # copy one byte to dest
|
|
||||||
mov [edx + ecx], al
|
|
||||||
inc ecx # offset++
|
|
||||||
cmp [ebx + 4], ecx # check if all bytes have been copied
|
|
||||||
jne copy_next_byte
|
|
||||||
|
|
||||||
lea ebx, [ebx + ecx + 8] # advance to next block
|
|
||||||
jmp apply_next_patch
|
|
||||||
|
|
||||||
get_patch_data_ptr:
|
|
||||||
call get_patch_data_ptr_ret
|
|
||||||
|
|
||||||
first_patch_header:
|
|
||||||
.data 0x005D25AF # Rare Armor
|
|
||||||
.data 0x00000004
|
|
||||||
.data 0x00000000
|
|
||||||
|
|
||||||
.data 0x005D26F1 # Untekked Weapons
|
|
||||||
.data 0x00000004
|
|
||||||
.data 0x00000000
|
|
||||||
|
|
||||||
.data 0x005D2706 # Rare Weapons
|
|
||||||
.data 0x00000004
|
|
||||||
.data 0x00000000
|
|
||||||
|
|
||||||
.data 0x00000000
|
|
||||||
.data 0x00000000
|
|
||||||
|
|
||||||
patch_code_start:
|
|
||||||
pop ecx
|
pop ecx
|
||||||
push 5
|
push 5
|
||||||
push 0x005D2528
|
push 0x005D2528
|
||||||
call get_code_size
|
call get_code_size
|
||||||
.deltaof patch_code, patch_code_end
|
.deltaof patch_code, patch_code_end
|
||||||
|
|
||||||
get_code_size:
|
get_code_size:
|
||||||
pop eax
|
pop eax
|
||||||
push dword [eax]
|
push dword [eax]
|
||||||
call patch_code_end
|
call patch_code_end
|
||||||
|
|
||||||
patch_code:
|
patch_code:
|
||||||
mov edi, 0x005D2576 # change return address
|
mov edi, 0x005D2576 # change return address
|
||||||
mov [esp], edi
|
mov [esp], edi
|
||||||
mov edi, [eax + 0x14]
|
mov edi, [eax + 0x14]
|
||||||
and edi, 0x80
|
and edi, 0x80
|
||||||
|
|||||||
Reference in New Issue
Block a user