Missed "^" char?
.386
.MODEL flat, stdcall
OPTION casemap :none
INCLUDE windows.inc
INCLUDE kernel32.inc
INCLUDE masm32.inc
INCLUDELIB kernel32.lib
INCLUDELIB masm32.lib
.DATA
charset01 db "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789^", 0
charset02 db "DEFACzIJGHy01KS34VYZabcPQRjklmTo8pqrWXstuvLwdeBfghiMNOx256Un79^", 0
txtorg db "r0ger^PRF", 0
crlf db 13, 10, 0
txttgt db 20 dup(0)
.CODE
Encode proc ptxtOrg:dword, ptxttgt:dword, pchar1:dword, pchar2:dword
mov esi, [ptxtOrg]
mov edx, [pchar1] ; charset01
mov ebx, [ptxttgt] ; txttgt
@Bucle:
mov al, byte ptr [esi]
cmp al, 0
jz @Fin
mov edi, edx
repnz scasb
jne @Fin ; No encontrado
push ebx
mov eax, edi
sub eax, edx
dec eax
mov ebx, [pchar2]
mov al, byte ptr [ebx+eax]
pop ebx
mov byte ptr [ebx], al
inc ebx
inc esi
jmp @Bucle
@Fin:
ret
Encode endp
start:
INVOKE StdOut, offset txtorg
INVOKE StdOut, offset crlf
invoke Encode, offset txtorg, offset txttgt, offset charset01, offset charset02
INVOKE StdOut, offset txttgt
INVOKE ExitProcess, 0
END start