冬
冬月
Unregistered / Unconfirmed
GUEST, unregistred user!
两个参数放入汇编代码,得到一个返回值,显示出来,请汇编高手调试下,
var
edx1,eax1:string;
begin
edx1:='kongyang';
eax1:='888888888888';
asm
push ebp
mov ebp, [esp+$0C] { 将用户名地址放入EBP,也就是EDX的地址}
push esi
push edi
mov edi, [esp+$018]
mov ecx, 3 { ECX置3}
xor esi, esi { ESI清零}
xor eax, eax { EAX清零}
cmp edi, ecx
jle @TraceMe_00401379
push ebx
@TraceMe_00401359:
cmp eax, 7 { 比较EAX是否小于7,循环}
jle @TraceMe_00401360
xor eax, eax { EAX大于7将EAX清零}
@TraceMe_00401360:
xor edx, edx { EAX于7将用EDX清零}
xor ebx, ebx { EBX清零}
mov dl, [ecx+ebp]
mov bl, [eax+$0405030]
imul edx, ebx
add esi, edx
inc ecx
inc eax
cmp ecx, edi
jl @TraceMe_00401359
pop ebx
@TraceMe_00401379:
push esi
push $0405078 { ASCII "%ld"}
push ebp
//call [<&USER32.wsprintfA>] { USER32.wsprintfA}
mov eax, [esp+$01C]
add esp, $0C
push ebp
push eax
//call [<&KERNEL32.lstrcmpA>] { kernel32.lstrcmpA}
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebp
retn {<= Procedure End}
end;
var
edx1,eax1:string;
begin
edx1:='kongyang';
eax1:='888888888888';
asm
push ebp
mov ebp, [esp+$0C] { 将用户名地址放入EBP,也就是EDX的地址}
push esi
push edi
mov edi, [esp+$018]
mov ecx, 3 { ECX置3}
xor esi, esi { ESI清零}
xor eax, eax { EAX清零}
cmp edi, ecx
jle @TraceMe_00401379
push ebx
@TraceMe_00401359:
cmp eax, 7 { 比较EAX是否小于7,循环}
jle @TraceMe_00401360
xor eax, eax { EAX大于7将EAX清零}
@TraceMe_00401360:
xor edx, edx { EAX于7将用EDX清零}
xor ebx, ebx { EBX清零}
mov dl, [ecx+ebp]
mov bl, [eax+$0405030]
imul edx, ebx
add esi, edx
inc ecx
inc eax
cmp ecx, edi
jl @TraceMe_00401359
pop ebx
@TraceMe_00401379:
push esi
push $0405078 { ASCII "%ld"}
push ebp
//call [<&USER32.wsprintfA>] { USER32.wsprintfA}
mov eax, [esp+$01C]
add esp, $0C
push ebp
push eax
//call [<&KERNEL32.lstrcmpA>] { kernel32.lstrcmpA}
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebp
retn {<= Procedure End}
end;