I'm trying to get from, for example:
&h12345678
to turn into...
&h38373635 and &h34333231
and the below code works, but doesn't seem very... inspired
&h12345678
to turn into...
&h38373635 and &h34333231
and the below code works, but doesn't seem very... inspired

Code:
!lea eax, q2 !mov ebx, [eax] ;&h12345678 for example does this: !movzx edx, bh ;&h00000056 !movzx ecx, bl ;&h00000078 !shl edx, 4 ;&h00000560 !shl ecx, 4 ;&h00000780 !shr dl, 4 ;&h00000506 !shr cl, 4 ;&h00000708 !shl edx, 16 ;&h05060000 !or edx, ecx ;&h05060708 !shr ebx, 16 ;&h00001234 !bswap edx ;&h08070605 !movzx eax, bh ;&h00000012 !movzx ecx, bl ;&h00000034 !shl eax, 4 ;&h00000120 !shl ecx, 4 ;&h00000340 !shr al, 4 ;&h00000102 !shr cl, 4 ;&h00000304 !shl eax, 16 ;&h01020000 !or eax, ecx ;&h01020304 !add edx,&h30303030 ;&h38373635 !bswap eax ;&h04030201 !add eax,&h30303030 ;&h34333231
Comment