代码如下:
data segment
key1 db 'this is a simple'
key2 db 'program you are analyzing now!'
key3 db 'hello..do you have get the right result? no! it is not over',0Ah
key4 db 'this is true end! but you should not relax yourself!!! Be careful '
key5 db 'trap..congratulation! now is the end',0Ah
key6 db 'their sum is ..%d.'
key7 db 'can you have '
key8 db 'the ability of '
key9 db 'reverse analysis'
data ends
codesg segment
assume cs:codesg
start:
push ebp
mov ebp,esp
sub esp,0D8h
push ebx
push esi
push edi
lea edi,[ebp+FFFFFF28h]
mov ecx,36h
mov eax,0CCCCCCCCh
rep stos dword ptr es:[edi]
mov esi,esp
push ds:[0000h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[0011h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov dword ptr [ebp-8],39h
mov dword ptr [ebp-14h],3Ch
mov eax,dword ptr [ebp-8]
cmp eax,dword ptr [ebp-14h]
jle if_two
if_one:
mov esi,esp
push ds:[002Fh]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
jmp if_three
if_two:
mov eax,dword ptr [ebp-14h]
push eax
mov ecx,dword ptr [ebp-8]
push ecx
add esp,8
if_three:
mov dword ptr [ebp-14h],32h
mov eax,dword ptr [ebp-8]
cmp eax,dword ptr [ebp-14h]
jle if_five
if_four:
mov eax,dword ptr [ebp-14h]
push eax
mov ecx,dword ptr [ebp-8]
push ecx
add esp,8
if_five:
mov esi,esp
push ds:[006Ah]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[00ACh]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
xor eax,eax
pop edi
pop esi
pop ebx
add esp,0D8h
cmp ebp,esp
mov esp,ebp
pop ebp
ret
jmp if_six
if_six:
push ebp
mov ebp,esp
sub esp,0CCh
push ebx
push esi
push edi
lea edi,[ebp+FFFFFF34h]
mov ecx,33h
mov eax,0CCCCCCCCh
rep stos dword ptr es:[edi]
mov eax,dword ptr [ebp+8]
cmp eax,dword ptr [ebp+0Ch]
jl if_eight
if_seven:
mov eax,dword ptr [ebp+8]
sub eax,dword ptr [ebp+0Ch]
mov dword ptr [ebp-8],eax
jmp if_nine
if_eight:
mov eax,dword ptr [ebp+0Ch]
sub eax,dword ptr [ebp+8]
mov dword ptr [ebp-8],eax
if_nine:
mov esi,esp
mov eax,dword ptr [ebp-8]
push eax
push ds:[00D1h]
call dword ptr ds:[004182BCh]
add esp,8
cmp esi,esp
mov esi,esp
push ds:[00E3h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[00F0h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[00FFh]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov eax,dword ptr [ebp-8]
pop edi
pop esi
pop ebx
add esp,0CCh
cmp ebp,esp
mov esp,ebp
pop ebp
ret
codesg ends
end start
data segment
key1 db 'this is a simple'
key2 db 'program you are analyzing now!'
key3 db 'hello..do you have get the right result? no! it is not over',0Ah
key4 db 'this is true end! but you should not relax yourself!!! Be careful '
key5 db 'trap..congratulation! now is the end',0Ah
key6 db 'their sum is ..%d.'
key7 db 'can you have '
key8 db 'the ability of '
key9 db 'reverse analysis'
data ends
codesg segment
assume cs:codesg
start:
push ebp
mov ebp,esp
sub esp,0D8h
push ebx
push esi
push edi
lea edi,[ebp+FFFFFF28h]
mov ecx,36h
mov eax,0CCCCCCCCh
rep stos dword ptr es:[edi]
mov esi,esp
push ds:[0000h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[0011h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov dword ptr [ebp-8],39h
mov dword ptr [ebp-14h],3Ch
mov eax,dword ptr [ebp-8]
cmp eax,dword ptr [ebp-14h]
jle if_two
if_one:
mov esi,esp
push ds:[002Fh]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
jmp if_three
if_two:
mov eax,dword ptr [ebp-14h]
push eax
mov ecx,dword ptr [ebp-8]
push ecx
add esp,8
if_three:
mov dword ptr [ebp-14h],32h
mov eax,dword ptr [ebp-8]
cmp eax,dword ptr [ebp-14h]
jle if_five
if_four:
mov eax,dword ptr [ebp-14h]
push eax
mov ecx,dword ptr [ebp-8]
push ecx
add esp,8
if_five:
mov esi,esp
push ds:[006Ah]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[00ACh]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
xor eax,eax
pop edi
pop esi
pop ebx
add esp,0D8h
cmp ebp,esp
mov esp,ebp
pop ebp
ret
jmp if_six
if_six:
push ebp
mov ebp,esp
sub esp,0CCh
push ebx
push esi
push edi
lea edi,[ebp+FFFFFF34h]
mov ecx,33h
mov eax,0CCCCCCCCh
rep stos dword ptr es:[edi]
mov eax,dword ptr [ebp+8]
cmp eax,dword ptr [ebp+0Ch]
jl if_eight
if_seven:
mov eax,dword ptr [ebp+8]
sub eax,dword ptr [ebp+0Ch]
mov dword ptr [ebp-8],eax
jmp if_nine
if_eight:
mov eax,dword ptr [ebp+0Ch]
sub eax,dword ptr [ebp+8]
mov dword ptr [ebp-8],eax
if_nine:
mov esi,esp
mov eax,dword ptr [ebp-8]
push eax
push ds:[00D1h]
call dword ptr ds:[004182BCh]
add esp,8
cmp esi,esp
mov esi,esp
push ds:[00E3h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[00F0h]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov esi,esp
push ds:[00FFh]
call dword ptr ds:[004182BCh]
add esp,4
cmp esi,esp
mov eax,dword ptr [ebp-8]
pop edi
pop esi
pop ebx
add esp,0CCh
cmp ebp,esp
mov esp,ebp
pop ebp
ret
codesg ends
end start