not sure what your intent is
i think you want to log a std::string that is being output by std::cout
to the log window of x64dbg based on the use of {s:whatever} syntax in your query.
if that is the case i hope you know std::string is a structure
and it may either contain the string if it is less than an implementation threshold limit
or a pointer if the string is long enough to cross the limit .
since your query also use rdx i assume you can see the string that would be printed in the registers window of x64dbg
and you would want to print that string to log window of x64dbg
if that is the case
try using log {s:rdx} or log "{s:rdx}" in the script input command window
you can see the string in status bar as well as log window
if you were on windbg i could show you how the string is part of a structure as below
0:000> lsa .
4: int main (void)
5: {
6: cout << "hello cout" << endl;
7: string longstr = "this is a very very loooooooooooooooooooooooooong stringgggggg";
> 8: cout << longstr << endl;
9: return 0;
10: }
11:
0:000> ? @rdx
Evaluate expression: 215422596808 = 00000032`282ff6c8
0:000> ?? ((cout!std::string )@rdx)->_Mypair._Myval2._Bx._Ptr
char 0x000001a1`86eadb40
"this is a very very loooooooooooooooooooooooooong stringgggggg"
0:000> .printf "%ma\n" , @@c++(((cout!std::string *)@rdx)->_Mypair._Myval2._Bx._Ptr)
this is a very very loooooooooooooooooooooooooong stringgggggg
i just flipped out an old version of x64dbg and gave it a whirl
if you want to log what i wrote above holds
if you wanted to alter the string (why bother with scripting when you can edit memory is beyond me ) but if you persist
you can use [rdx]?=hexencoded string like [rdx]?=0x41414141414141

x64dbg
's assembler to patch an instruction to reference a new string, which you are trying to creating usingx64dbg
's string formatting functionality when specifying the new assembly instruction? That does not seem legit to me. – Rolf Rolles Apr 09 '23 at 15:38lea rdx, ds:[memory addr]
in dump with the constant, then go up a bit, you will see the string. Then it's just a matter of changing the hex values. – clouded. Apr 18 '23 at 22:14