Undecidability of closure under reverse of language accepted by TM
Ok , first consider this clearer proof which takes a similar approach :
Assume S is decidable , we show a reduction ATM ≤m S , obtaining a contradiction
We map &lt;M,w&gt; to &lt;M'&gt; such that :
M' = &quot; on input x :
If x = 01 accept ,
If x = 10 reject ,
If x = 10 simulate M on w , if M accepts w accept , if M halts and rejects w then reject
Now , if M accepts w , meaning &lt;M,w&gt;   ∈ ATM  , then the L(M') would be =  {01 (which is always accepted) , 10 (which is only accepted if M accepts w) } and thus &lt;M'&gt; ∈ S
If M rejects w or loops on w , meaning &lt;M,w&gt; does not belong to ATM , then L(M') = {01} and thus &lt;M'&gt; does not belong to S , completing our reduction , and thus if S is decidable ATM is decidable which is a contradiction , thus S is undecidable
The point is to construct M' such that it accepts a string and it's reverse if M accepts w so that also S accepts M' or accept a single string if M rejects w so S rejects M' since M' doesn't also accept the reverse of the string
You could have used any 2 different strings as long as one is the reverse of the other , instead of 01,10 feel free to use 110,011 hopefully you get the point
Following the link the reduction is from ATM , the only difference is that if M accepts w , then L(M') is ∅ so S accepts M' and if M rejects w or loops on w L(M) = {01 (which could have been chosen to be any string) } and thus M' does not belong to S
Finally it's worth reminding that ATM is the language where M accepts w , while Halting is the language where M halts on w , you may find it a good exercise to try showing a reduction from Halting to S , the proof would be very similar