Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-01-2015, 21:11
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
Not sure I really understand your question.
It seems you're asking on how to reconstruct the original register based instructions? That is not possible, as that information is destroyed.

For example, given that stack based VM, you cannot distinguish

Code:
mov eax,ebx
mov ecx,eax
mov edx,ecx
from

Code:
mov ebx,eax
mov edx,ebx
mov ecx,edx
What you can do however, is what in compiler construction is called "register allocation". It basically means, that you start with arbitrarily many variables (in this case your stack variables from the stack machine) and find an allocation of assigning these variables to registers while at the same time trying to minimize the amount of register spills. Even a greedy algorithm should work sufficiently well in that case.
OTOT, for what reason do you actually want to dos this anyway? Re-assemble VM code?
Reply With Quote
The Following User Gave Reputation+1 to mcp For This Useful Post:
Conquest (03-01-2015)
 


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
Sentinel SHK Virtual Machine phroyt General Discussion 4 07-05-2022 23:51
You do not have a Codewizard for C++ 4.3 license for this machine matrowang General Discussion 0 05-10-2004 15:19
Softice rebooting my machine Mok General Discussion 4 09-07-2003 00:01


All times are GMT +8. The time now is 21:47.


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