Quantcast
Viewing all articles
Browse latest Browse all 9556

【原创】BASE64解密代码(ASM)

全部自己编写,所以bug多多
CrackBase64 proc

xor ecx,ecx
xor ebx,ebx
xor edx,edx
xor ebp,ebp

.while(ecx<Hex_sum) ;Hex_sum 密文长度
shr ecx,2;寄存器不够用,经此而已

mov eax,[lpBuffer] ;lpBuffer密文字符串地址(指针)
mov eax,[eax+ecx*4]
xor edx,edx
xor ebx,ebx
.while(edx<4)
.if(al>=41h && al<=5ah)
sub al,41h
.elseif (al>=61h && al<=7ah)
sub al,47h
.elseif (al>=30h && al<=39h)
add al,4
.elseif(al==2bh)
mov al,3eh
.elseif (al==2fh)
mov al,3fh
.elseif(al==3dh)
mov al,00h
.else

.endif
mov ebp,eax
and ebp,3FH
add ebx,ebp
rol ebx,6
ror eax,8
inc edx
.endw
shr ebx,6
mov ebp,ecx
add ebp,ecx
add ebp,ecx

add ebp,lpBufferTemp (目标地址) (指针)
rol ebx ,10H
mov [ebp],bl
rol ebx,8

inc ebp

mov [ebp],bl
rol ebx,8

inc ebp
mov [ebp],bl

inc ebp

inc ecx
shl ecx,2
.endw

ret
CrackBase64 endp

Viewing all articles
Browse latest Browse all 9556

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>