77D5BA5B > 8BFF MOV EDI,EDI
77D5BA5D /. 55 PUSH EBP
77D5BA5E |. 8BEC MOV EBP,ESP
77D5BA60 |. 81EC D4000000 SUB ESP,0D4
77D5BA66 |. A1 B801D777 MOV EAX,DWORD PTR DS:[77D701B8]
77D5BA6B |. 8B4D 10 MOV ECX,DWORD PTR SS:[EBP+10]
77D5BA6E |. 53 PUSH EBX
77D5BA6F |. 33DB XOR EBX,EBX
77D5BA71 |. 3BCB CMP ECX,EBX
77D5BA73 |. 8945 FC MOV DWORD PTR SS:[EBP-4],EAX
77D5BA76 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
77D5BA79 |. 898D 2CFFFFFF MOV DWORD PTR SS:[EBP-D4],ECX
77D5BA7F |. 899D 30FFFFFF MOV DWORD PTR SS:[EBP-D0],EBX
77D5BA85 |. 74 02 JE SHORT user32.77D5BA89
77D5BA87 |. 8919 MOV DWORD PTR DS:[ECX],EBX
77D5BA89 |> 6A 2F PUSH 2F ; /Count = 2F (47.)
77D5BA8B |. 8D8D 3CFFFFFF LEA ECX,DWORD PTR SS:[EBP-C4] ; |
77D5BA91 |. 51 PUSH ECX ; |Buffer = NULL
77D5BA92 |. FF75 0C PUSH DWORD PTR SS:[EBP+C] ; |ControlID = 113 (275.)
77D5BA95 |. 50 PUSH EAX ; |hWnd = 7FFDF000
77D5BA96 |. E8 CA82FCFF CALL user32.GetDlgItemTextW ; \GetDlgItemTextW
77D5BA9B |. 85C0 TEST EAX,EAX
77D5BA9D |. 0F84 FC000000 JE user32.77D5BB9F
77D5BAA3 |. 66:83BD 3CFFF>CMP WORD PTR SS:[EBP-C4],20
77D5BAAB |. 8D85 3CFFFFFF LEA EAX,DWORD PTR SS:[EBP-C4]
77D5BAB1 |. 75 08 JNZ SHORT user32.77D5BABB
77D5BAB3 |> 40 /INC EAX
77D5BAB4 |. 40 |INC EAX
77D5BAB5 |. 66:8338 20 |CMP WORD PTR DS:[EAX],20
77D5BAB9 |.^ 74 F8 \JE SHORT user32.77D5BAB3
77D5BABB |> 395D 14 CMP DWORD PTR SS:[EBP+14],EBX
77D5BABE |. 57 PUSH EDI
77D5BABF |. 899D 38FFFFFF MOV DWORD PTR SS:[EBP-C8],EBX
77D5BAC5 |. 74 29 JE SHORT user32.77D5BAF0
77D5BAC7 |> 66:8B08 /MOV CX,WORD PTR DS:[EAX]
77D5BACA |. 66:83F9 2D |CMP CX,2D
77D5BACE |. 74 07 |JE SHORT user32.77D5BAD7
77D5BAD0 |. 66:81F9 1222 |CMP CX,2212
77D5BAD5 |. 75 0B |JNZ SHORT user32.77D5BAE2
77D5BAD7 |> 40 |INC EAX
77D5BAD8 |. 40 |INC EAX
77D5BAD9 |. 83B5 38FFFFFF>|XOR DWORD PTR SS:[EBP-C8],1
77D5BAE0 |.^ EB E5 \JMP SHORT user32.77D5BAC7
77D5BAE2 |> C785 34FFFFFF>MOV DWORD PTR SS:[EBP-CC],0CCCCCCC
77D5BAEC |. 6A 07 PUSH 7
77D5BAEE |. EB 0C JMP SHORT user32.77D5BAFC
77D5BAF0 |> C785 34FFFFFF>MOV DWORD PTR SS:[EBP-CC],19999999
77D5BAFA |. 6A 05 PUSH 5
77D5BAFC |> 5F POP EDI ; 定时器实.00401015
77D5BAFD |. 56 PUSH ESI ; 定时器实.00401000
77D5BAFE |. 6A 30 PUSH 30
77D5BB00 |. 8D4D 9C LEA ECX,DWORD PTR SS:[EBP-64]
77D5BB03 |. 51 PUSH ECX
77D5BB04 |. 6A FF PUSH -1
77D5BB06 |. 50 PUSH EAX
77D5BB07 |. 68 80000000 PUSH 80
77D5BB0C |. FF15 3412D177 CALL DWORD PTR DS:[<&KERNEL32.FoldString>; kernel32.FoldStringW
77D5BB12 |. 0FB74D 9C MOVZX ECX,WORD PTR SS:[EBP-64] ; 这里取出数字
77D5BB16 |. 8D75 9C LEA ESI,DWORD PTR SS:[EBP-64]
77D5BB19 |. 33C0 XOR EAX,EAX
77D5BB1B |. EB 48 JMP SHORT user32.77D5BB65
77D5BB1D |> 46 /INC ESI ; 定时器实.00401000
77D5BB1E |. 8D51 D0 |LEA EDX,DWORD PTR DS:[ECX-30]
77D5BB21 |. 46 |INC ESI ; 定时器实.00401000
77D5BB22 |. 3BD3 |CMP EDX,EBX
77D5BB24 |. 7C 43 |JL SHORT user32.77D5BB69
77D5BB26 |. 83FA 09 |CMP EDX,9
77D5BB29 |. 7F 3E |JG SHORT user32.77D5BB69
77D5BB2B |. 3B85 34FFFFFF |CMP EAX,DWORD PTR SS:[EBP-CC]
77D5BB31 |. 72 1D |JB SHORT user32.77D5BB50
77D5BB33 |. 75 60 |JNZ SHORT user32.77D5BB95
77D5BB35 |. 8D5F 01 |LEA EBX,DWORD PTR DS:[EDI+1]
77D5BB38 |. 3BD3 |CMP EDX,EBX
77D5BB3A |. 75 10 |JNZ SHORT user32.77D5BB4C
77D5BB3C |. 83BD 38FFFFFF>|CMP DWORD PTR SS:[EBP-C8],0
77D5BB43 |. 74 07 |JE SHORT user32.77D5BB4C
77D5BB45 |. 33DB |XOR EBX,EBX
77D5BB47 |. 66:391E |CMP WORD PTR DS:[ESI],BX
77D5BB4A |. 74 42 |JE SHORT user32.77D5BB8E
77D5BB4C |> 3BD7 |CMP EDX,EDI
77D5BB4E |. 7F 45 |JG SHORT user32.77D5BB95
77D5BB50 |> 0FB70E |MOVZX ECX,WORD PTR DS:[ESI]
;这里是算法关键
77D5BB53 |. 8D0480 |LEA EAX,DWORD PTR DS:[EAX+EAX*4]
77D5BB56 |. C785 30FFFFFF>|MOV DWORD PTR SS:[EBP-D0],1
77D5BB60 |. 8D0442 |LEA EAX,DWORD PTR DS:[EDX+EAX*2]77D5BB63 |. 33DB |XOR EBX,EBX
77D5BB65 |> 3BCB CMP ECX,EBX
77D5BB67 |.^ 75 B4 \JNZ SHORT user32.77D5BB1D
77D5BB69 |> 399D 38FFFFFF CMP DWORD PTR SS:[EBP-C8],EBX
77D5BB6F |. 74 02 JE SHORT user32.77D5BB73
77D5BB71 |. F7D8 NEG EAX
77D5BB73 |> 8B95 2CFFFFFF MOV EDX,DWORD PTR SS:[EBP-D4] ; user32.77D1D559
77D5BB79 |. 3BD3 CMP EDX,EBX
77D5BB7B |. 74 20 JE SHORT user32.77D5BB9D
77D5BB7D |. 3BCB CMP ECX,EBX
77D5BB7F |. 75 18 JNZ SHORT user32.77D5BB99
77D5BB81 |. 399D 30FFFFFF CMP DWORD PTR SS:[EBP-D0],EBX
77D5BB87 |. 74 10 JE SHORT user32.77D5BB99
77D5BB89 |. 33C9 XOR ECX,ECX
77D5BB8B |. 41 INC ECX
77D5BB8C |. EB 0D JMP SHORT user32.77D5BB9B
77D5BB8E |> B8 00000080 MOV EAX,80000000
77D5BB93 |.^ EB DE JMP SHORT user32.77D5BB73
77D5BB95 |> 33C0 XOR EAX,EAX
77D5BB97 |. EB 04 JMP SHORT user32.77D5BB9D
77D5BB99 |> 33C9 XOR ECX,ECX
77D5BB9B |> 890A MOV DWORD PTR DS:[EDX],ECX
77D5BB9D |> 5E POP ESI ; 定时器实.00401015
77D5BB9E |. 5F POP EDI ; 定时器实.00401015
77D5BB9F |> 8B4D FC MOV ECX,DWORD PTR SS:[EBP-4]
77D5BBA2 |. 5B POP EBX ; 定时器实.00401015
77D5BBA3 |. E8 CCCAFBFF CALL user32.77D18674
77D5BBA8 |. C9 LEAVE
77D5BBA9 \. C2 1000 RETN 10
77D5BB53 |. 8D0480 |LEA EAX,DWORD PTR DS:[EAX+EAX*4]
77D5BB56 |. C785 30FFFFFF>|MOV DWORD PTR SS:[EBP-D0],1
77D5BB60 |. 8D0442 |LEA EAX,DWORD PTR DS:[EDX+EAX*2] 就是搞不明白 这里 怎么计算 输出的就成 16 进制数了
汇编版
StoH proc
lea esi,szBuffer
;lea edi,szBuf ;初始化
;--------------------------
int 3
xor eax,eax
.while TRUE
mov cl,byte ptr ds:[esi]
.break .if cl == 0
lea edx,[ecx-30h] ;edx == ecx -30h 这个是过滤成1,2,3表示的16进制数
inc esi
lea eax,[eax+eax*4]
lea eax,[edx+eax*2]
.endw
;--------------------------
ret
StoH endp
输入 ASCII 输出 就是 16 进制的数了
输入 的是 1 - 9 的 ASCII 处理位数有限
返回在 EAX
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课