豪杰超级解霸3000[英雄版]算法分析
2007-07-24 16:45:26 来源:WEB开发网核心提示: -CALL 2 分析---:004029F0 55push ebp:004029F1 8BECmov ebp, esp:004029F3 53push ebx:004029F4 8A4508mov al, byte ptr [ebp+08] <取第一个参数,即上面ECX的值:0040
-----------------CALL 2 分析--------------------------------------
-----------------------------------------------------------------
:004029F0 55 push ebp
:004029F1 8BEC mov ebp, esp
:004029F3 53 push ebx
:004029F4 8A4508 mov al, byte ptr [ebp+08] <----取第一个参数,即上面ECX的值
:004029F7 8A5D0C mov bl, byte ptr [ebp+0C] <----取第二个参数,即上面DL的值
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
:00402A04(C)
:004029FA F6C3C3 test bl, C3 <----将BL与C3进行逻辑与后看结果是否为偶数
:004029FD 7A01 jpe 00402A00 <----是偶数就不跳.
:004029FF F9 stc <----将CF置1
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
:004029FD(C)
:00402A00 D0DB rcr bl, 1 <----通过CF进行向右位移
:00402A02 FEC8 dec al
:00402A04 75F4 jne 004029FA <----循环,直到AL为0
:00402A06 885D0C mov byte ptr [ebp+0C], bl
:00402A09 8A450C mov al, byte ptr [ebp+0C] <----将结果放入AL中返回
:00402A0C 5B pop ebx
:00402A0D 5D pop ebp
:00402A0E C3 ret
----------------此CALL结束-----------------------------------------
更多精彩
赞助商链接