Quote:
Originally Posted by remnikalija
ye i trayed with skill point 8 but i get disconected i trayed with 9 still disconected idk why only stat points when i make it works
|
you can't have 8 * level + Cst this way.
the list of possible multiple compliant with LEA was right but it doesn't mean they are all valid there. and indeed expression like "r32 * n + Cst" codes Cst as a 32 bits values; "r32 * n + r32 + Cst" encode Cst as a 8-bit value.
in clear:
Code:
expression: meaning is coded
lea edx,[eax+eax+5] 2 lvl + 5 8D 54 00 05
lea edx,[eax+eax*2+5] 3 lvl + 5 8D 54 40 05
lea edx,[eax*4+5] 4 lvl + 5 8D 14 85 05000000
lea edx,[eax+eax*4+5] 5 lvl + 5 8D 54 80 05
lea edx,[eax*8+5] 8 lvl + 5 8D 14 C5 05000000
lea edx,[eax+eax*8+5] 9 lvl + 5 8D 54 C0 05
the original code "lea edx,[eax+eax*4+5]" needs 4 bytes; your modif certainly needs more and thus has shifted the code or corrupt it.
you can only use expressions that require 4 bytes or 3 bytes ("lea edx,[eax + eax * n]") + 1 NOP.
note that the 5 increment can be any value in 1..255, the value does not change the way expression is encoded.
so to achieve 8 * level:
Code:
replace
lea edx,ds:[eax+eax*4+5] 3E 8D 54 80 05
mov word ptr DS:[ESI+0x13A],DX
with:
imul eax,eax,8 6B C0 08
add al,5 04 05
mov word ptr DS:[ESI+0x13A],AX (instead of DX)
in the "add al,Cst" Cst must be in 1..7 to not generate an overflow of AL register.
also note that EAX is loaded with ESI immediately after that code, so changing EAX (instead of EDX) has no bad side.