forked from plasma-disassembler/plasma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbreak1.rev
54 lines (52 loc) · 1.52 KB
/
break1.rev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
function main (.text) {
0x400506: push rbp
0x400507: rbp = rsp
0x40050a: rsp -= 16
0x40050e: *(rbp - 4) = 0
0x400515: *(rbp - 8) = 2
0x40051c: jmp loop_0x400560
loop {
loop_0x400560:
# 0x400560: cmp dword ptr [rbp - 4], 9
# 0x400564: jg 0x400570
if (*(rbp - 4) > 9) goto ret_0x400570
0x400566: eax = *(rbp - 4)
0x400569: eax += eax
# 0x40056b: cmp eax, dword ptr [rbp - 8]
# 0x40056e: jne 0x40051e
if (eax == *(rbp - 8)) goto ret_0x400570
0x40051e: edi = 0x400614 "1"
0x400523: call puts
# 0x400528: cmp dword ptr [rbp - 4], 8
# 0x40052c: jne 0x400558
if (*(rbp - 4) == 8) goto break_0x40052e
0x400558: *(rbp - 4) += 1
0x40055c: *(rbp - 8) += 1
} ; loop_0x400560
break_0x40052e:
0x40052e: jmp loop_0x400543
loop {
loop_0x400543:
# 0x400543: cmp dword ptr [rbp - 8], 3
# 0x400547: jle 0x400530
if (*(rbp - 8) > 3) goto break_0x400549
0x400530: eax = *(rbp - 4)
0x400533: eax += 10
0x400536: *(rbp - 8) += eax
0x400539: edi = 0x400616 "2"
0x40053e: call puts
} ; loop_0x400543
break_0x400549:
0x400549: edx = *(rbp - 4)
0x40054c: eax = edx
0x40054e: eax <<= 3
0x400551: eax += edx
0x400553: *(rbp - 8) += eax
0x400556: jmp ret_0x400570
ret_0x400570:
0x400570: edi = 0x400618 "3"
0x400575: call puts
0x40057a: eax = 0
0x40057f: leave
0x400580: ret
}