thực ra cũng dễ dịch lắm. Nếu bạn nào rãnh rỗi cứ dịch ra cho anh em thì rất tốt.
viii-Các lệnh giống trong ASM:
Các lệnh này của Script đều có trong tập lệnh ASM, nên thật dễ dàng khi tiếp xúc các
lệnh này.
Quote:
ADD dest, src
Adds src to dest and stores result in dest
Example:
add x, 0F
add eax, x
add [401000], 5
add y, " times" // If y was 1000 before this command then y is "1000 times" after it
AND dest, src
ANDs src and dest and stores result in dest
Example:
and x, 0F
and eax, x
and [401000], 5
DEC var
Substracts 1 from variable
Example:
dec v
INC var
Adds 1 to variable
Example:
inc v
MOV dest, src
Move src to dest.
Src can be a long hex string in the format #<some hex numbers>#, for example #1234#.
Remember that the number of digits in the hex string must be even, i.e. 2, 4, 6, 8 etc.
Example:
mov x, 0F
mov y, "Hello world"
mov eax, ecx
mov [ecx], #00DEAD00BEEF00#
mov !CF, 1
mov !DF, !PF
OR dest, src
ORs src and dest and stores result in dest
Example:
or x, 0F
or eax, x
or [401000], 5
SHL dest, src
Shifts dest to the left src times and stores the result in dest.
Example:
mov x, 00000010
shl x, 8 // x is now 00001000
SHR dest, src
Shifts dest to the right src times and stores the result in dest.
Example:
mov x, 00001000
shr x, 8 // x is now 00000010
SUB dest, src
Substracts src from dest and stores result in dest
Example:
sub x, 0F
sub eax, x
sub [401000], 5
XOR dest, src
XORs src and dest and stores result in dest
Example:
xor x, 0F
xor eax, x
xor [401000], 5
Tóm lại: các lệnh sắp xếp trong mục này là:
Quote:
ADD,SUB, DEC,INC, AND,OR,XOR,SHL,SHR, MOV
ix-Lệnh nhảy và lệnh so sánh:
a>Label(Nhãn)
Trước hết phải nói về Nhãn (Label) vì lệnh nhảy lúc nào cũng liên quan đến Label. Trong
ngôn ngữ lập trình cấp cao, khi ta muốn điều khiển một lệnh nhảy , nhảy đến 1 routine
nào, thì ta phải khai báo trước routine đó một cái tên nhãn (label). Lúc đó chương trình
chúng ta mới biết đường mà nhảy . Trong Script, lables khai báo như sau:
Quote:
Labels
Labels được định nghĩa bằng cách đặt dấu “:” sau một cái name.
Example:
SOME_LABEL:
Sau đây tui cũng xin giới thiệu với các bạn một lệnh định nhãn của Script cho window
CPU.
Trong TUT “Let’s cracking by Olly” , tui có post về cách định một nhãn cho một dòng
lệnh trong Olly để khi nào ta muốn đến đó debug thì ta cho Olly nhảy đến nhãn đó là
xong. Lệnh định nhãn trong Olly là shotcut “:” . Trong Script, nó hổ trợ cho chúng ta
thực hiện lệnh trên như sau:
Quote:
LBL addr, text
Inserts a label at the specified address
Example:
lbl eip, "NiceJump"
b>Compare (Lệnh so sánh):
Như các bạn biết, lệnh so sánh lúc nào cũng đi chung với lệnh nhảy, nên tui sắp xếp
chúng vào một mục.
Quote:
CMP dest, src
Compares dest to src. Works like it's ASM counterpart.
Example:
cmp y, x
cmp eip, 401000
c>Jumps(Các lệnh nhảy):
Các lệnh nhảy trong Script:
Quote:
JA label
Use this after cmp. Works like it's asm counterpart.
Example:
ja SOME_LABEL
JAE label
Use this after cmp. Works like it's asm counterpart.
Example:
jae SOME_LABEL
JB label
Use this after cmp. Works like it's asm counterpart.
Example:
jb SOME_LABEL
JBE label
Use this after cmp. Works like it's asm counterpart.
Example:
jbe SOME_LABEL
JE label
Use this after cmp. Works like it's asm counterpart.
Example:
je SOME_LABEL
JMP label
Unconditionally jump to a label.
Example:
jmp SOME_LABEL
JNE label
Use this after cmp. Works like it's asm counterpart.
Example:
jne SOME_LABEL
===============
Tóm lại: Các lệnh trong mục này:
Quote:
Lables in file script;LBL;CMP;JA;JAE;JB;JBE;JE;JNE;JMP
x-Lệnh Patch thay đổi Code :
Nó tương tự như các lệnh Assemble (Shotcut space), Fill with NOPs, Edit Binary (Ctrl-
E):
Quote:
ASM addr, command
Assemble a command at some address.
Returns bytes assembled in the reserved $RESULT variable
Example:
asm eip, "mov eax, ecx"
FILL addr, len, value
Fills len bytes of memory at addr with value
Example:
fill 401000, 10, 90 // NOP 10h bytes
REPL addr, find, repl, len
Replace find with repl starting att addr for len bytes.
Wildcards are allowed
Example:
repl eip, #6a00#, #6b00#, 10
repl eip, #??00#, #??01#, 10
repl 401000, #41#, #90#, 1F