Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .686
- .model flat
- extern _MessageBoxW@16 : PROC
- extern _ExitProcess@4 : PROC
- public _main
- .data
- tytul dw 't','y','t','u','l',0
- utf8_char db 11000100b,10000101b
- char_end db ?
- utf16_char dw ?
- if_long dw 1101100000000000b,1101110000000000b,0
- .code
- _main PROC
- mov ecx,char_end - utf8_char
- cmp ecx,1
- je byte_1
- cmp ecx,2
- je byte_2
- cmp ecx,3
- je byte_3
- cmp ecx,4
- je byte_4
- byte_1:
- jmp write
- byte_2:
- mov ebx,0
- mov edx,0
- mov dl, utf8_char[0];
- shl edx,27
- shr edx,21
- add ebx,edx
- mov edx,0
- mov dl,utf8_char[1];
- shl edx,26
- shr edx,26
- add ebx,edx
- mov utf16_char,bx
- mov utf16_char+2,0
- jmp write
- byte_3:
- jmp write
- byte_4:
- jmp write
- write:
- push 0
- push offset tytul
- push offset utf16_char
- push 0
- call _MessageBoxW@16
- sub esp,16
- push 0
- call _ExitProcess@4
- _main ENDP
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement