-
-
[求助]汇编代码逆向为C的问题?
-
发表于:
2007-11-2 13:39
5386
-
ebp+arg_0是字符缓冲区指针,ebp+arg_4是字符串的长度。
调用的方式为:
decry(char * buff,int len);
我就是不明白
.text:08051B6D lea edx, [eax+eax]
这句是什么意思?
.text:08051B55 loc_8051B55: ; CODE XREF: decry+DAj
.text:08051B55 mov eax, [ebp+var_4]
.text:08051B58 cmp eax, [ebp+arg_4]
.text:08051B5B jge loc_8051C03
.text:08051B61 mov eax, [ebp+var_4]
.text:08051B64 add eax, [ebp+arg_0]
.text:08051B67 movzx eax, byte ptr [eax]
.text:08051B6A and eax, 1
.text:08051B6D lea edx, [eax+eax]
.text:08051B70 mov eax, [ebp+var_4]
.text:08051B73 add eax, [ebp+arg_0]
.text:08051B76 movzx eax, byte ptr [eax]
.text:08051B79 and eax, 2
.text:08051B7C shl eax, 6
.text:08051B7F or edx, eax
.text:08051B81 mov eax, [ebp+var_4]
.text:08051B84 add eax, [ebp+arg_0]
.text:08051B87 movzx eax, byte ptr [eax]
.text:08051B8A and eax, 4
.text:08051B8D shl eax, 4
.text:08051B90 or edx, eax
.text:08051B92 mov eax, [ebp+var_4]
.text:08051B95 add eax, [ebp+arg_0]
.text:08051B98 movzx eax, byte ptr [eax]
.text:08051B9B and eax, 8
.text:08051B9E shl eax, 2
.text:08051BA1 or edx, eax
.text:08051BA3 mov eax, [ebp+var_4]
.text:08051BA6 add eax, [ebp+arg_0]
.text:08051BA9 movzx eax, byte ptr [eax]
.text:08051BAC and eax, 10h
.text:08051BAF sar eax, 2
.text:08051BB2 or edx, eax
.text:08051BB4 mov eax, [ebp+var_4]
.text:08051BB7 add eax, [ebp+arg_0]
.text:08051BBA movzx eax, byte ptr [eax]
.text:08051BBD and eax, 20h
.text:08051BC0 sar eax, 2
.text:08051BC3 or edx, eax
.text:08051BC5 mov eax, [ebp+var_4]
.text:08051BC8 add eax, [ebp+arg_0]
.text:08051BCB movzx eax, byte ptr [eax]
.text:08051BCE and eax, 40h
.text:08051BD1 sar eax, 2
.text:08051BD4 or edx, eax
.text:08051BD6 mov eax, [ebp+var_4]
.text:08051BD9 add eax, [ebp+arg_0]
.text:08051BDC movzx eax, byte ptr [eax]
.text:08051BDF and eax, 80h
.text:08051BE4 sar eax, 7
.text:08051BE7 or eax, edx
.text:08051BE9 mov [ebp+var_5], al
.text:08051BEC mov eax, [ebp+var_4]
.text:08051BEF mov edx, [ebp+arg_0]
.text:08051BF2 add edx, eax
.text:08051BF4 mov al, [ebp+var_5]
.text:08051BF7 mov [edx], al
.text:08051BF9 lea eax, [ebp+var_4]
.text:08051BFC inc dword ptr [eax]
.text:08051BFE jmp loc_8051B55
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课