I found Hutch's Mangle tool.
I got as far as inserting the procedure and prototype, but don't understand
the rest.
Can the text be used in a MessageBox ?
HOW DO YOU USE THIS TOOL ?
Paste your text into the edit window and press the toolbar conversion button (The Gear)
then type in the proc name you require.
Add a prototype for the procedure then call the procedure when your application needs
the text. The return value in EAX is the memory address that the results are written to.
When you have finished with the text, free the memory with the API function GlobalFree()
or use the MASM32 macro "free".
Store the mangled text as if it were a normal string in your program.
When you need the original string, pass the mangled version to the function to decode it, store the return value.
Use the return value as a pointer to the original string (e.g. pass it directly to the messagebox.)
Call GlobalFree with the returned value, to free it.
For efficiency, mangle a group of strings at once, then demangle them at the start of your program and use them without needing to demangle each time; remember to free the block at the end.
Is this the right way to use GlobalFree ?
start:
call Mangle ; Return value in EAX is the memory address that the results are written to.
invoke MessageBox, NULL,eax,addr Box, MB_OK
invoke GlobalFree,NULL ; free up memory
invoke ExitProcess,0
Mangle proc
LOCAL pMem :DWORD
push ebx
push esi
push edi
mov pMem, alloc(17) ; 17 bytes of memory
mov esi, pMem
mov DWORD PTR [esi+4], 1836171052
mov DWORD PTR [esi+12], 2053203587
mov DWORD PTR [esi+0], 2676751432
mov DWORD PTR [esi+8], 2201283713
.data?
hMemBlock dd ?
.code
;
;
;
call Mangle ; Return value in EAX is the memory address that the results are written to.
mov hMemBlock,eax
invokeĀ MessageBox, NULL,eax,addr Box, MB_OK
invoke GlobalFree,hMemBlock ; free up memory
of course, hMemBlock can be a local variable or otherwise stored on the stack