Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-19-2017, 08:23
mcp mcp is offline
Friend
 
Join Date: Dec 2011
Posts: 73
Rept. Given: 4
Rept. Rcvd 12 Times in 11 Posts
Thanks Given: 7
Thanks Rcvd at 47 Times in 35 Posts
mcp Reputation: 12
You can move the value to a register and use NEG on it (assuming x86, 32 bit):
Code:
mov eax, [val]
neg eax
mov [val], eax
Alternatively, subtract from zero:
Code:
xor exc, ecx
mov eax, [val]
sub ecx, eax
mov [val], ecx
Reply With Quote
The Following User Says Thank You to mcp For This Useful Post:
chants (01-19-2017)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hex-Rays and negative structure offsets jonwil General Discussion 3 02-20-2019 10:37


All times are GMT +8. The time now is 23:18.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )