<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for The Binary Auditor™</title>
	<atom:link href="http://www.binary-auditing.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.binary-auditing.com</link>
	<description>free training modules for people with an attitude!</description>
	<lastBuildDate>Fri, 26 Mar 2010 08:46:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by rubendodge</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-442</link>
		<dc:creator>rubendodge</dc:creator>
		<pubDate>Fri, 26 Mar 2010 08:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-442</guid>
		<description>Oh and I think the example code would be something like this.

int Var1 = 5, Var2 = 5;
int temp = Var1;
Var1 = temp * Var2;
temp = Var1;
Var1 = temp * Var2;
int Var3 = Var2;

I dont know for sure if this is right but to me it looks like it would work.</description>
		<content:encoded><![CDATA[<p>Oh and I think the example code would be something like this.</p>
<p>int Var1 = 5, Var2 = 5;<br />
int temp = Var1;<br />
Var1 = temp * Var2;<br />
temp = Var1;<br />
Var1 = temp * Var2;<br />
int Var3 = Var2;</p>
<p>I dont know for sure if this is right but to me it looks like it would work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by rubendodge</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-441</link>
		<dc:creator>rubendodge</dc:creator>
		<pubDate>Fri, 26 Mar 2010 08:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-441</guid>
		<description>Okay here is my understanding of the code...

mov edx, Var1   //Move Var1 into register edx
mov ecx, Var2   //Move Var2 into register ecx
mov eax, edx    //Move edx(which holds Var1) into eax
imul ecx        //Multiply registers ecx and eax
mov edx, eax    //Move register eax into edx
imul edx, eax   //Multiply edx and eax
mov Var3, ecx   //Move value of ecx into Var3</description>
		<content:encoded><![CDATA[<p>Okay here is my understanding of the code&#8230;</p>
<p>mov edx, Var1   //Move Var1 into register edx<br />
mov ecx, Var2   //Move Var2 into register ecx<br />
mov eax, edx    //Move edx(which holds Var1) into eax<br />
imul ecx        //Multiply registers ecx and eax<br />
mov edx, eax    //Move register eax into edx<br />
imul edx, eax   //Multiply edx and eax<br />
mov Var3, ecx   //Move value of ecx into Var3</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Binary Auditor™ now optimized for iPhone by bigar</title>
		<link>http://www.binary-auditing.com/2009/11/the-binary-auditor%e2%84%a2-now-optimized-for-iphone/comment-page-1/#comment-440</link>
		<dc:creator>bigar</dc:creator>
		<pubDate>Wed, 24 Mar 2010 06:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1984#comment-440</guid>
		<description>Hi, i was using Orbit to download 5 video from video section, i am able to get the 5 .flv video but unable to play it, the video stopped during the first load. It took me 24 hours to get the video, they are large file, i dont want to lose it, i am using VLC Player and K-Lite Codec on MPC, both are not working. Please help me, i am very intended to learn reverse engineering from your video section. Thank you, i am very glad to this release of binary-auditing.</description>
		<content:encoded><![CDATA[<p>Hi, i was using Orbit to download 5 video from video section, i am able to get the 5 .flv video but unable to play it, the video stopped during the first load. It took me 24 hours to get the video, they are large file, i dont want to lose it, i am using VLC Player and K-Lite Codec on MPC, both are not working. Please help me, i am very intended to learn reverse engineering from your video section. Thank you, i am very glad to this release of binary-auditing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0003] Understanding RVAs and Import Tables by 911</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0003-understanding-rvas-and-import-tables/comment-page-1/#comment-438</link>
		<dc:creator>911</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1262#comment-438</guid>
		<description>Damn....!!!!
for whole life i m searching this info in one module....
Thanks, and well organized tutorials form A to Z...</description>
		<content:encoded><![CDATA[<p>Damn&#8230;.!!!!<br />
for whole life i m searching this info in one module&#8230;.<br />
Thanks, and well organized tutorials form A to Z&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by vince</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-397</link>
		<dc:creator>vince</dc:creator>
		<pubDate>Fri, 22 Jan 2010 15:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-397</guid>
		<description>good word in noting that imul ecx actually left ecx alone since it puts the results in edx:eax

you can also deduct that there is some casts in there since edx (the high part of the long long results is always discarted)

tmp  = (long)(Var1 * Var2) * (long)(Var1 * Var2);
Var3 = Var2;

you can also assume that tmp will be used later (if optimizations are on)</description>
		<content:encoded><![CDATA[<p>good word in noting that imul ecx actually left ecx alone since it puts the results in edx:eax</p>
<p>you can also deduct that there is some casts in there since edx (the high part of the long long results is always discarted)</p>
<p>tmp  = (long)(Var1 * Var2) * (long)(Var1 * Var2);<br />
Var3 = Var2;</p>
<p>you can also assume that tmp will be used later (if optimizations are on)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by Carl Federer</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-396</link>
		<dc:creator>Carl Federer</dc:creator>
		<pubDate>Fri, 15 Jan 2010 15:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-396</guid>
		<description>(Var1 * Var2) ^ 2;
Var3 = Var2;

Could this be the solution?</description>
		<content:encoded><![CDATA[<p>(Var1 * Var2) ^ 2;<br />
Var3 = Var2;</p>
<p>Could this be the solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0002] Simple manual decompilation exercise for beginners &#8211; Part 2 by SanjoX</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0002-simple-manual-decompilation-exercise-for-beginners-part-2/comment-page-1/#comment-392</link>
		<dc:creator>SanjoX</dc:creator>
		<pubDate>Wed, 06 Jan 2010 16:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1232#comment-392</guid>
		<description>I have the same result like tadas.

int result = 1; // [esi]
for(int i = 0; i &lt; 8; i++) // i is [ebx]
{
   result *= result;
}

Like shokora said, result is always 1. So you can simplify it and just write &quot;result = 1&quot; with the same result :D

Here is my first version of the C++-Code for the ones who have problems to get the solution:

int p_esi = 1;
int edx = 0;
int p_ebx = edx;
int ecx;
while(p_ebx &lt; 8)
{
   ecx = p_esi;
   ecx = ecx * p_esi
   p_esi = ecx
   p_ebx++;
}</description>
		<content:encoded><![CDATA[<p>I have the same result like tadas.</p>
<p>int result = 1; // [esi]<br />
for(int i = 0; i &lt; 8; i++) // i is [ebx]<br />
{<br />
   result *= result;<br />
}</p>
<p>Like shokora said, result is always 1. So you can simplify it and just write &quot;result = 1&quot; with the same result :D</p>
<p>Here is my first version of the C++-Code for the ones who have problems to get the solution:</p>
<p>int p_esi = 1;<br />
int edx = 0;<br />
int p_ebx = edx;<br />
int ecx;<br />
while(p_ebx &lt; 8)<br />
{<br />
   ecx = p_esi;<br />
   ecx = ecx * p_esi<br />
   p_esi = ecx<br />
   p_ebx++;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0011] Time Shift by Mike</title>
		<link>http://www.binary-auditing.com/2009/12/exercise-0011-time-shift/comment-page-1/#comment-390</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sun, 03 Jan 2010 02:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2065#comment-390</guid>
		<description>Pseudo code:

&lt;code&gt;
var_4=1;
var_8=0;

while(var_8&lt;6)
{
  var_4=var_4*2;
  var_8++;
}

var_8=0;

while(var_8&lt;4)
{
  var_4=var_4/2;
  var_8++;
}
exit;

&lt;/code&gt;   

var_4 goes from 1 to 64 then back down to 4 as its final value

mazuki&#039;s optimized code is probably the actual source.</description>
		<content:encoded><![CDATA[<p>Pseudo code:</p>
<p><code><br />
var_4=1;<br />
var_8=0;</p>
<p>while(var_8&lt;6)<br />
{<br />
  var_4=var_4*2;<br />
  var_8++;<br />
}</p>
<p>var_8=0;</p>
<p>while(var_8&lt;4)<br />
{<br />
  var_4=var_4/2;<br />
  var_8++;<br />
}<br />
exit;</p>
<p></code>   </p>
<p>var_4 goes from 1 to 64 then back down to 4 as its final value</p>
<p>mazuki&#8217;s optimized code is probably the actual source.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0005] Mad #define constant by Mike</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0005-mad-define-constant/comment-page-1/#comment-389</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 01 Jan 2010 15:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2016#comment-389</guid>
		<description>The code looks correct, but if this is lifted from the modules, it looks like the first constant is 5.0, not pi. In my binary I have 5.0 and 6.28318 (2*PI).</description>
		<content:encoded><![CDATA[<p>The code looks correct, but if this is lifted from the modules, it looks like the first constant is 5.0, not pi. In my binary I have 5.0 and 6.28318 (2*PI).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0004] Identify Variables by Mike</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0004-identify-variables/comment-page-1/#comment-376</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 30 Dec 2009 01:18:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1994#comment-376</guid>
		<description>Duh, two&#039;s complement...never mind, brain not engaged.</description>
		<content:encoded><![CDATA[<p>Duh, two&#8217;s complement&#8230;never mind, brain not engaged.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0004] Identify Variables by Mike</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0004-identify-variables/comment-page-1/#comment-375</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 29 Dec 2009 23:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1994#comment-375</guid>
		<description>I&#039;m working through this with the help of Chris Eagles book and IDA 5.5. Where could I get an explanation of how the signs are interpreted in the various lines above.

Dr. Schnieder, an explanation of how the lines in C\C++ translate to the lines of ASM would be helpful.</description>
		<content:encoded><![CDATA[<p>I&#8217;m working through this with the help of Chris Eagles book and IDA 5.5. Where could I get an explanation of how the signs are interpreted in the various lines above.</p>
<p>Dr. Schnieder, an explanation of how the lines in C\C++ translate to the lines of ASM would be helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0002] Simple manual decompilation exercise for beginners &#8211; Part 2 by shokora</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0002-simple-manual-decompilation-exercise-for-beginners-part-2/comment-page-1/#comment-374</link>
		<dc:creator>shokora</dc:creator>
		<pubDate>Sun, 27 Dec 2009 14:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1232#comment-374</guid>
		<description>I think the above comments are correct but it&#039;s kind of weird to choose &#039;1&#039; as base for the power (since 1^x == 1).</description>
		<content:encoded><![CDATA[<p>I think the above comments are correct but it&#8217;s kind of weird to choose &#8217;1&#8242; as base for the power (since 1^x == 1).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0010] All are equal? by mazuki</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0010-all-are-equal/comment-page-1/#comment-373</link>
		<dc:creator>mazuki</dc:creator>
		<pubDate>Sun, 27 Dec 2009 07:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2035#comment-373</guid>
		<description>they are not equal, but then again, it will only ever go through 1 way (hence the green lines)

if you XOR eax by itself, you will ALWAYS get a 0, never anything different, it&#039;s impossible.

so this will automatically make the zero flag set, which makes the JZ execute

then you get to mov ecx,1 then test ecx,ecx well a test is a lot like a cmp with itself, so if it&#039;s true it will jump, as a test will return 0 if it&#039;s true and set the zero flag

so you will end up with eax being 0 and ecx being 1 regardless of what parameters are pushed it seems</description>
		<content:encoded><![CDATA[<p>they are not equal, but then again, it will only ever go through 1 way (hence the green lines)</p>
<p>if you XOR eax by itself, you will ALWAYS get a 0, never anything different, it&#8217;s impossible.</p>
<p>so this will automatically make the zero flag set, which makes the JZ execute</p>
<p>then you get to mov ecx,1 then test ecx,ecx well a test is a lot like a cmp with itself, so if it&#8217;s true it will jump, as a test will return 0 if it&#8217;s true and set the zero flag</p>
<p>so you will end up with eax being 0 and ecx being 1 regardless of what parameters are pushed it seems</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0011] Time Shift by mazuki</title>
		<link>http://www.binary-auditing.com/2009/12/exercise-0011-time-shift/comment-page-1/#comment-372</link>
		<dc:creator>mazuki</dc:creator>
		<pubDate>Thu, 24 Dec 2009 01:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2065#comment-372</guid>
		<description>here&#039;s what i got from it

variables 
	a,i

while i &gt; -1{
	if i &lt; 6 {a = a SHL 1}
	else {
		i = 0;
		while i &lt; 4 {
			a = a SHR 1}
		exit;
	}

a is the constant 1 stored in the code, eax will always return 0 and the var_4 will always return 0x04

i optimized the code to be something like this:

for i = 0 to 10
	if i &lt; 6{a = a*2;}
	else{a = a/2;}</description>
		<content:encoded><![CDATA[<p>here&#8217;s what i got from it</p>
<p>variables<br />
	a,i</p>
<p>while i &gt; -1{<br />
	if i &lt; 6 {a = a SHL 1}<br />
	else {<br />
		i = 0;<br />
		while i &lt; 4 {<br />
			a = a SHR 1}<br />
		exit;<br />
	}</p>
<p>a is the constant 1 stored in the code, eax will always return 0 and the var_4 will always return 0&#215;04</p>
<p>i optimized the code to be something like this:</p>
<p>for i = 0 to 10<br />
	if i &lt; 6{a = a*2;}<br />
	else{a = a/2;}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0012] Something floating around&#8230; by XX</title>
		<link>http://www.binary-auditing.com/2009/12/exercise-0012-something-floating-around/comment-page-1/#comment-366</link>
		<dc:creator>XX</dc:creator>
		<pubDate>Sat, 19 Dec 2009 23:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2069#comment-366</guid>
		<description>int main(int argc, char **argv, char *envp){
long a;
float b;

b = 3.14;
a = (long)b;
}</description>
		<content:encoded><![CDATA[<p>int main(int argc, char **argv, char *envp){<br />
long a;<br />
float b;</p>
<p>b = 3.14;<br />
a = (long)b;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0004] Identify Variables by Dr. Thorsten Schneider</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0004-identify-variables/comment-page-1/#comment-359</link>
		<dc:creator>Dr. Thorsten Schneider</dc:creator>
		<pubDate>Tue, 15 Dec 2009 07:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1994#comment-359</guid>
		<description>Here we go with the solution. The original code was:

int main(int argc, char* argv[])
{
	unsigned char myChar; myChar = 0; myChar = 255; // 1 byte
	signed char mySignedChar; mySignedChar = -128; mySignedChar = 127; // 2 bytes

	unsigned short int myShort; myShort = 0; myShort = 65535;
	signed short int mySignedShort; mySignedShort = -32768; mySignedShort = 32767;

	unsigned int myInt; myInt = 0; myInt = 4294967295 ; // 4 bytes
	signed int mySignedInt; myInt = -2147483648; myInt = 2147483647; // 4 bytes

	unsigned long int myLong; myLong=0; myLong=4294967295; // 4 bytes
	signed long int mySignedLong; mySignedLong=-2147483648; mySignedLong=2147483647; // 4 bytes

	bool myTrue; myTrue = true; // 1 byte
	bool myFalse; myFalse = false; // 1 byte

	float myFloat; myFloat = 5.3431243774; // 4 bytes

	double myDouble; myDouble = 5.3431243774; // 8 bytes
	
	long double myLongDouble; myLongDouble = 5.3431243774; // 8 bytes

	wchar_t myWChar; myWChar = &#039;A&#039;; //2 or 4 bytes

	return 0;
}</description>
		<content:encoded><![CDATA[<p>Here we go with the solution. The original code was:</p>
<p>int main(int argc, char* argv[])<br />
{<br />
	unsigned char myChar; myChar = 0; myChar = 255; // 1 byte<br />
	signed char mySignedChar; mySignedChar = -128; mySignedChar = 127; // 2 bytes</p>
<p>	unsigned short int myShort; myShort = 0; myShort = 65535;<br />
	signed short int mySignedShort; mySignedShort = -32768; mySignedShort = 32767;</p>
<p>	unsigned int myInt; myInt = 0; myInt = 4294967295 ; // 4 bytes<br />
	signed int mySignedInt; myInt = -2147483648; myInt = 2147483647; // 4 bytes</p>
<p>	unsigned long int myLong; myLong=0; myLong=4294967295; // 4 bytes<br />
	signed long int mySignedLong; mySignedLong=-2147483648; mySignedLong=2147483647; // 4 bytes</p>
<p>	bool myTrue; myTrue = true; // 1 byte<br />
	bool myFalse; myFalse = false; // 1 byte</p>
<p>	float myFloat; myFloat = 5.3431243774; // 4 bytes</p>
<p>	double myDouble; myDouble = 5.3431243774; // 8 bytes</p>
<p>	long double myLongDouble; myLongDouble = 5.3431243774; // 8 bytes</p>
<p>	wchar_t myWChar; myWChar = &#8216;A&#8217;; //2 or 4 bytes</p>
<p>	return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0008] WTF? Where is my modulo? by Slow</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0008-wtf-where-is-my-modulo/comment-page-1/#comment-355</link>
		<dc:creator>Slow</dc:creator>
		<pubDate>Sat, 12 Dec 2009 04:11:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2030#comment-355</guid>
		<description>Yeah what Steve said, optimization took out some instructions. Further instructions remove the variable size build up and tear down and even further optimization turns this whole function into 0x90 :-)</description>
		<content:encoded><![CDATA[<p>Yeah what Steve said, optimization took out some instructions. Further instructions remove the variable size build up and tear down and even further optimization turns this whole function into 0&#215;90 :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0004] Identify Variables by Slow</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0004-identify-variables/comment-page-1/#comment-354</link>
		<dc:creator>Slow</dc:creator>
		<pubDate>Sat, 12 Dec 2009 03:56:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1994#comment-354</guid>
		<description>We get the Floating Point ones first, those are easy due to FLD/FSTP instructions 
referencing the memory values:
8 double, var_38 (or var_8)
8 long double, var_8 (or var_38)
4 float, var_C

Next we have these types, my byte sizes from the usual x86 compiler defaults 
don&#039;t match up with the sizes I see declared. I have one more DWORD and one less BYTE
sized values. Even if my stuff did match up the best I could do is a guess, you CAN&#039;T know
that something is a char just because you move 0x41 &#039;A&#039; into it. Also I can&#039;t presume a var is
signed just because you move 0xFF(-1) into it, it could just be holding 0xFF in an unsigned manner!

1 unsigned char, 
1 signed char, 
1 bool, 
2 unsigned short int, 
2 signed short int, 
2 wchar_t,
4 unsigned long int, 
4 signed long int, 
4 unsigned int, 
4 signed int, 

So I think the correct answer is, you can tell the floats, but you AT BEST can take a wild guess as
to the types of the other variables.</description>
		<content:encoded><![CDATA[<p>We get the Floating Point ones first, those are easy due to FLD/FSTP instructions<br />
referencing the memory values:<br />
8 double, var_38 (or var_8)<br />
8 long double, var_8 (or var_38)<br />
4 float, var_C</p>
<p>Next we have these types, my byte sizes from the usual x86 compiler defaults<br />
don&#8217;t match up with the sizes I see declared. I have one more DWORD and one less BYTE<br />
sized values. Even if my stuff did match up the best I could do is a guess, you CAN&#8217;T know<br />
that something is a char just because you move 0&#215;41 &#8216;A&#8217; into it. Also I can&#8217;t presume a var is<br />
signed just because you move 0xFF(-1) into it, it could just be holding 0xFF in an unsigned manner!</p>
<p>1 unsigned char,<br />
1 signed char,<br />
1 bool,<br />
2 unsigned short int,<br />
2 signed short int,<br />
2 wchar_t,<br />
4 unsigned long int,<br />
4 signed long int,<br />
4 unsigned int,<br />
4 signed int, </p>
<p>So I think the correct answer is, you can tell the floats, but you AT BEST can take a wild guess as<br />
to the types of the other variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0002] Simple manual decompilation exercise for beginners &#8211; Part 2 by duc</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0002-simple-manual-decompilation-exercise-for-beginners-part-2/comment-page-1/#comment-353</link>
		<dc:creator>duc</dc:creator>
		<pubDate>Fri, 11 Dec 2009 22:29:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1232#comment-353</guid>
		<description>mov dword ptr [esi], 1		        ; move 1 into esi pointer , [esi] = 1
xor edx, edx				        ; edx = 0
mov [ebx], edx				; EBX = 0
jmp short loop_until_8		; jmp sub loop_until_8	

loop_until_8:				        ;{	
mov ecx, [esi]				; ecx = 1			
imul ecx, [esi]				; 1 * 1 = 1
mov [esi], ecx				; [esi] = 1
inc dword ptr [ebx]			; EBX  = ebx + 1 ; (2) ebx = ebx + 1.. until EBX = 8

compare_ebx:
cmp dword ptr [ebx], 8		; if(EBX &gt;= 8) break; 
jl loop_until_8			        ; } 
-------------------------------------
var_esi = 1;
var_ebx = 0;
for(var_ebx = 0; var_ebx &lt; 8;var_ebx++){
	var_ecx = var_esi;					 // 1;
	var_esi = var_ecx * var_esi;		        // var_esi = 1 * 1 	
}

Any feedback would be appreciated. 
-Daniel Clemens</description>
		<content:encoded><![CDATA[<p>mov dword ptr [esi], 1		        ; move 1 into esi pointer , [esi] = 1<br />
xor edx, edx				        ; edx = 0<br />
mov [ebx], edx				; EBX = 0<br />
jmp short loop_until_8		; jmp sub loop_until_8	</p>
<p>loop_until_8:				        ;{<br />
mov ecx, [esi]				; ecx = 1<br />
imul ecx, [esi]				; 1 * 1 = 1<br />
mov [esi], ecx				; [esi] = 1<br />
inc dword ptr [ebx]			; EBX  = ebx + 1 ; (2) ebx = ebx + 1.. until EBX = 8</p>
<p>compare_ebx:<br />
cmp dword ptr [ebx], 8		; if(EBX &gt;= 8) break;<br />
jl loop_until_8			        ; }<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
var_esi = 1;<br />
var_ebx = 0;<br />
for(var_ebx = 0; var_ebx &lt; 8;var_ebx++){<br />
	var_ecx = var_esi;					 // 1;<br />
	var_esi = var_ecx * var_esi;		        // var_esi = 1 * 1<br />
}</p>
<p>Any feedback would be appreciated.<br />
-Daniel Clemens</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by zork</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-348</link>
		<dc:creator>zork</dc:creator>
		<pubDate>Thu, 10 Dec 2009 04:57:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-348</guid>
		<description>imul edx, eax

is a variant of imul that generates a 32 (vice 64) bit result into the destination register (in this case edx).  Here you have effectively:

edx *= eax;

with no extension to 64 bits.  Any overflow is simply lost.  The single register version uses edx:eax as the implied destination register</description>
		<content:encoded><![CDATA[<p>imul edx, eax</p>
<p>is a variant of imul that generates a 32 (vice 64) bit result into the destination register (in this case edx).  Here you have effectively:</p>
<p>edx *= eax;</p>
<p>with no extension to 64 bits.  Any overflow is simply lost.  The single register version uses edx:eax as the implied destination register</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0004] Identify Variables by zork</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0004-identify-variables/comment-page-1/#comment-347</link>
		<dc:creator>zork</dc:creator>
		<pubDate>Thu, 10 Dec 2009 04:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1994#comment-347</guid>
		<description>Frankly, there are a lot of ambiguous types since you don&#039;t really do anything with them.  Based on the disassembly I would say you have 4 1-byte int variables and only 3 4 byte int variables which contradicts what you say you have.  The integer constants that you use might imply some things, but at the assembly level they don&#039;t tell you anything definite other than the size of the variable. 

float var_C;
unsigned char var_D;
bool var_E;
bool var_F;  
double var_8;
short var_14;
unsigned short var_18;
int var_1C;
wchar_t var_20;
unsigned int var_24;
char var_25;
long var_2C;
long double var_38;</description>
		<content:encoded><![CDATA[<p>Frankly, there are a lot of ambiguous types since you don&#8217;t really do anything with them.  Based on the disassembly I would say you have 4 1-byte int variables and only 3 4 byte int variables which contradicts what you say you have.  The integer constants that you use might imply some things, but at the assembly level they don&#8217;t tell you anything definite other than the size of the variable. </p>
<p>float var_C;<br />
unsigned char var_D;<br />
bool var_E;<br />
bool var_F;<br />
double var_8;<br />
short var_14;<br />
unsigned short var_18;<br />
int var_1C;<br />
wchar_t var_20;<br />
unsigned int var_24;<br />
char var_25;<br />
long var_2C;<br />
long double var_38;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0005] Mad #define constant by zork</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0005-mad-define-constant/comment-page-1/#comment-346</link>
		<dc:creator>zork</dc:creator>
		<pubDate>Thu, 10 Dec 2009 04:13:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=2016#comment-346</guid>
		<description>How about

#define PI 3.14159265
#define PI2 (2 * PI)

int main() {
   double var_10 = 1.0;
   double var_8 = PI2 * var_10;
   return 0;
}</description>
		<content:encoded><![CDATA[<p>How about</p>
<p>#define PI 3.14159265<br />
#define PI2 (2 * PI)</p>
<p>int main() {<br />
   double var_10 = 1.0;<br />
   double var_8 = PI2 * var_10;<br />
   return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by ghost-writer</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-345</link>
		<dc:creator>ghost-writer</dc:creator>
		<pubDate>Wed, 09 Dec 2009 21:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-345</guid>
		<description>&gt;snip&gt;
imul edx, eax
&gt;snip&gt;
the imul instruction takes only one operand not two..wtf</description>
		<content:encoded><![CDATA[<p>&gt;snip&gt;<br />
imul edx, eax<br />
&gt;snip&gt;<br />
the imul instruction takes only one operand not two..wtf</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0001] Simple manual decompilation exercise for beginners by h3x</title>
		<link>http://www.binary-auditing.com/2009/09/exercise-0001-simple-manual-decompilation-exercise-for-beginners/comment-page-1/#comment-338</link>
		<dc:creator>h3x</dc:creator>
		<pubDate>Thu, 03 Dec 2009 16:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1227#comment-338</guid>
		<description>imul ecx is equivalent to:
EDX:EAX &lt;- ecx * eax
which is:
EDX:EAX &lt;- Var1 * Var2
Var1 and Var2 are presumably 32 bits each. 32bit * 32bit could result in a 64 bit number.

So EDX could be storing the upper 32bits of the result of the multiplication.

The next instruction:
mov edx,eax

moves the lower 32 bits of the product into EDX, thus overwriting the upper 32 bits of the product which EDX was storing.

correct?</description>
		<content:encoded><![CDATA[<p>imul ecx is equivalent to:<br />
EDX:EAX &lt;- ecx * eax<br />
which is:<br />
EDX:EAX &lt;- Var1 * Var2<br />
Var1 and Var2 are presumably 32 bits each. 32bit * 32bit could result in a 64 bit number.</p>
<p>So EDX could be storing the upper 32bits of the result of the multiplication.</p>
<p>The next instruction:<br />
mov edx,eax</p>
<p>moves the lower 32 bits of the product into EDX, thus overwriting the upper 32 bits of the product which EDX was storing.</p>
<p>correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on [EXERCISE 0002] Simple manual decompilation exercise for beginners &#8211; Part 2 by tadas</title>
		<link>http://www.binary-auditing.com/2009/11/exercise-0002-simple-manual-decompilation-exercise-for-beginners-part-2/comment-page-1/#comment-336</link>
		<dc:creator>tadas</dc:creator>
		<pubDate>Fri, 27 Nov 2009 18:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.binary-auditing.com/?p=1232#comment-336</guid>
		<description>I would say it&#039;s something like this:

int n = 1;
for (int i = 0; i &lt; 8; i++)
    n = n * n;</description>
		<content:encoded><![CDATA[<p>I would say it&#8217;s something like this:</p>
<p>int n = 1;<br />
for (int i = 0; i &lt; 8; i++)<br />
    n = n * n;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
