View Single Post
  #5  
Old 01-09-2006, 08:56
Sarge
 
Posts: n/a
VB PCode is very stack oriented. Many arithmetic operations are performed via the stack. If you notice the line :

CD NeR8 <> =Perform a NotEqual operation on 2 8-Byte Real numbers

you can see that a comparison is performed there. The two numbers being compared are almost certainly the top two entries on the stack.

Likewise, the line

001D242B: FB2F EqVar =

is performing a comparison for EqualTo, with the compared values also almost certainly on the top two positions of the stack; the line

001D244C: E1 GeR8 >=

is performing a comparison for GreaterThanOrEqualTo, and again, almost certainly the top two postions on the stack.

Ok, this type of stuff is pretty obvious based on the names, but some stuff isn't so obvious. How do you handle that? And, what about your question of what is compared and where is it, and even where is the answer found? This is where the parameter values come in. For example, look at the lines

001D2442: 0A ImpAdCallFPR4 Val()
001D2447: ED CR8R8

(Never mind what they do for now). Notice that, with "0a" is found at xxx42, and "ED" found at xxx47, we are missing 43,44,45,46 = 4 bytes. It just so happens that the "0A" opcode takes 4 bytes of parameter data. (Any guesses as to which 4 bytes?- Duh!)
So, the line should really be

001D2442: 0A,xx,xx,xx,xx ImpAdCallFPR4 Val()

The xx represents the missing 4 parameter bytes. That info is what will tell you where the actual values live in memory/stack/frame, and therefore which values are actually being used in the comparisons and computations and manipulations that the exe is performing. So, if we knew what those parameter bytes were...?

Sarge

Last edited by Sarge; 01-09-2006 at 09:02. Reason: Typo
Reply With Quote