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
| [code]
.text:00401726 interrestingFunction2 proc near ; CODE XREF: interrestingFunction1+35↓p
.text:00401726
.text:00401726 Format = dword ptr -28h
.text:00401726 var_C = dword ptr -0Ch
.text:00401726 arg_0 = dword ptr 8
.text:00401726 arg_4 = dword ptr 0Ch
.text:00401726
.text:00401726 push ebp
.text:00401727 mov ebp, esp
.text:00401729 sub esp, 28h
.text:0040172C mov [ebp+var_C], 0
.text:00401733 cmp [ebp+arg_4], 7 ; The password is 7 characters long.
.text:00401737 jnz short loc_4017AA ; the wrong password location
.text:00401739 mov eax, [ebp+arg_0]
.text:0040173C movzx eax, byte ptr [eax]
.text:0040173F cmp al, 'S' ; Here's the begining of the password.
.text:00401741 jnz short loc_4017AA
.text:00401743 mov eax, [ebp+arg_0]
.text:00401746 add eax, 1
.text:00401749 movzx eax, byte ptr [eax]
.text:0040174C cmp al, 'P'
.text:0040174E jnz short loc_4017AA
.text:00401750 mov eax, [ebp+arg_0]
.text:00401753 add eax, 2
.text:00401756 movzx eax, byte ptr [eax]
.text:00401759 cmp al, 'a'
.text:0040175B jnz short loc_4017AA
.text:0040175D mov eax, [ebp+arg_0]
.text:00401760 add eax, 3
.text:00401763 movzx eax, byte ptr [eax]
.text:00401766 cmp al, 'C'
.text:00401768 jnz short loc_4017AA
.text:0040176A mov eax, [ebp+arg_0]
.text:0040176D add eax, 4
.text:00401770 movzx eax, byte ptr [eax]
.text:00401773 cmp al, 'I'
.text:00401775 jnz short loc_4017AA
.text:00401777 mov eax, [ebp+arg_0]
.text:0040177A add eax, 5
.text:0040177D movzx eax, byte ptr [eax]
.text:00401780 cmp al, 'o'
.text:00401782 jnz short loc_4017AA
.text:00401784 mov eax, [ebp+arg_0]
.text:00401787 add eax, 6
.text:0040178A movzx eax, byte ptr [eax]
.text:0040178D cmp al, 'S'
.text:0040178F jnz short loc_4017AA
.text:00401791 mov eax, offset aGratzMan ; "Gratz man :)" ; the password confirmation message
.text:00401796 mov [esp+28h+Format], eax ; Format
.text:00401799 call printf
.text:0040179E mov [esp+28h+Format], 0
.text:004017A5 call exit
|