hi,all
I have a question on string conversion
eg:
.data
szbuf db 50 dup (0)
szform db "%c",0
str1 db "624E4373664D4747",0
str2 db "bNCsfMGG",0
.code
...
The str2 can converted to str1 by using 'invoke wsprinf addrszbuf... ', Then how can I convert the str1 to str2?
Thanks
When you say "convert" are you just copying one string to another or are you modifying the string as well ?
hi,hutch--
when changing "bNCsfMGG"to hexdata, the result is "624E4373664D4747".
I just have got the idea, use the String convert Lib of Donkey, here is my codes
includelib Convert.lib
hex2dw PROTO :DWORD,:DWORD
.data
myvalue db "65443749",0
szBuffer db 20 dup (0)
.code
start:
invoke lstrlen,addr myvalue
invoke hex2dw,addr myvalue,eax
lea esi,szBuffer
mov dword ptr [esi],eax
invoke ExitProcess,0
end start