Another one :
.386
.model flat,stdcall
option casemap:none
ExitProcess PROTO :DWORD
UniStrLen PROTO :DWORD
includelib \PellesC\lib\Win\kernel32.lib
.data
str1 dw 'This is a test.',0
.code
start:
invoke UniStrLen,ADDR str1
invoke ExitProcess,0
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
UniStrLen PROC string:DWORD
push ebx
mov ebx,0FFFF0000h
mov eax,DWORD PTR [esp+8]
mov ecx,4
sub eax,ecx
@@:
add eax,ecx
mov edx,DWORD PTR [eax]
test dx,dx
je @f
test edx,ebx
jnz @b
add eax,2
@@:
sub eax,DWORD PTR [esp+8]
shr eax,1
pop ebx
retn 4
UniStrLen ENDP
OPTION PROLOGUE:PROLOGUEDEF
OPTION EPILOGUE:EPILOGUEDEF
END start