<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-634552548975853762</id><updated>2011-08-02T11:35:28.006-07:00</updated><category term='winzip'/><category term='debug'/><category term='serial'/><category term='Genuine'/><category term='xor'/><category term='key'/><category term='enable'/><category term='Player'/><category term='solution'/><category term='wzcsvc'/><category term='11'/><category term='check'/><category term='Advantage'/><category term='reverse engineering'/><category term='cd'/><category term='bored'/><category term='netstumbler'/><category term='calculate'/><category term='ollydbg'/><category term='Windows'/><category term='algorithm'/><category term='Wars'/><category term='Apple'/><category term='br0ken'/><category term='Apple Itunes IsDebuggerPresent API SoftICE detect'/><category term='Acker'/><category term='IsDebuggerPresent'/><category term='explained'/><category term='starcraft'/><category term='CrackMe4'/><category term='practice'/><category term='PC-Guard'/><category term='crackme'/><category term='Audio'/><category term='Install'/><category term='Bypass'/><category term='JNZ'/><category term='Ripper'/><category term='fishing'/><category term='Dope'/><category term='Itunes'/><category term='Collatz'/><category term='DVD'/><category term='conjecture'/><category term='password'/><category term='Media'/><category term='Parental Controls'/><category term='patch'/><title type='text'>Reverse engineering software</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6499938072489723782</id><published>2010-02-26T14:53:00.000-08:00</published><updated>2010-02-26T15:05:17.856-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ollydbg'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='starcraft'/><title type='text'>Reverse Engineering Starcraft - Getting it to run in Ollydbg</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Reverse Engineering Starcraft - Getting it to run in Ollydbg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;This is for the newer Starcraft on CD that requires a 26 digit key.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hash of “StarCraft (Windows).exe” – the file on the CD&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MD5 &lt;/span&gt;= 2833bac84adaa0dc1350614883d3440e&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SHA1 &lt;/span&gt;= 3f15b9fd0ebd1ac2840bb01aa9eb2bd2baf5332e&lt;br /&gt;&lt;br /&gt;Hash of “Installer.exe” – the file created in the temporary directory&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MD5 &lt;/span&gt;= 05b29444d4649f2a709cc1b5c23490cb&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SHA1 &lt;/span&gt;= 411ffcd2bfb19e32d4fcc93b0209ad8d22796606&lt;br /&gt;&lt;br /&gt;Performed on a Windows 7 Ultimate virtual machine running in VMware Workstation 7.0.0 build-203739 using FCIV (to generate the MD5 and SHA1 hashes), PEID (to identify if any of the files are packed), Ollydbg (live analysis), and Ida Pro 5.5 (static analysis). Microsoft Visual Studio 2008 Professional Edition version 9.0.30729.1 SP with Windows SDK v7.0 used to create and compile C++ code.&lt;br /&gt;&lt;br /&gt;Upon running “StarCraft (Windows).exe”, it creates a folder by first using the &lt;span style="font-weight: bold;"&gt;GetTempPath() &lt;/span&gt;function to determine where the system’s temporary folder is. It then calls &lt;span style="font-weight: bold;"&gt;GetTickCount()&lt;/span&gt;. The results from the first two functions are combined together with “&lt;span style="color: rgb(51, 204, 255);"&gt;%sBlizzard Installer Bootstrap - %08x\&lt;/span&gt;” before &lt;span style="font-weight: bold;"&gt;CreateDirectory()&lt;/span&gt; is called. The directory created will have the name of “&lt;span style="color: rgb(255, 204, 0);"&gt;Blizzard Installer Bootstrap – Some_Hexadecimal_Number&lt;/span&gt;”. The hexadecimal number is from the &lt;span style="font-weight: bold;"&gt;GetTickCount()&lt;/span&gt; function (this is to make a unique directory name). Running “Installer.exe” by itself will result in an error message. Further debugging of the “StarCraft (Windows).exe” has revealed it uses&lt;span style="font-weight: bold;"&gt; CreateProcess()&lt;/span&gt; to run “Installer.exe” with the argument “&lt;span style="color: rgb(51, 204, 255);"&gt;--path=&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 255);"&gt;Path_to_ StarCraft (Windows).exe&lt;/span&gt;” before terminating itself.&lt;br /&gt;&lt;br /&gt;To get it running in Ollydbg without the need of the CD, copy “&lt;span style="color: rgb(255, 0, 0);"&gt;StarCraft (Windows).exe&lt;/span&gt;” (from the CD), “&lt;span style="color: rgb(255, 0, 0);"&gt;Installer.exe&lt;/span&gt;” (from the temporary folder), and “&lt;span style="color: rgb(255, 0, 0);"&gt;Installer Tome.mpq&lt;/span&gt;” (from the CD; make sure you have enough disk space since it is 652MB) to the same directory of your choosing. Run Ollydbg and press F3 to get the open file window. Browse to where you copied “Installer.exe” and select it (do not click “Open” yet). At the bottom of the open file window you will see “Arguments:”. Type in: &lt;span style="color: rgb(51, 204, 255);"&gt;--path="&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(51, 204, 255);"&gt;Path_to_ StarCraft (Windows).exe&lt;/span&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;”&lt;/span&gt;. With only the double quotes around the path. You can now debug Installer.exe in Ollydbg.&lt;br /&gt;&lt;br /&gt;The source code below is just for me to better understand what is going on when “Installer.exe” is executed (yeah I know it doesn't display correctly; &lt;iostream&gt; and &lt;windows.h&gt;).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#include &lt;iostream&gt;&lt;br /&gt;#include &lt;windows.h&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;DWORD bufferLength;&lt;br /&gt;/* This is how the temp directory is generated */&lt;br /&gt;/* To find the location of the temp directory that the process is running&lt;br /&gt;just access the Windows Task Manager and right-click the 'Installer' process&lt;br /&gt;and select 'Open File Location' */&lt;br /&gt;bufferLength = GetTempPath(0, NULL); //Since the length of the path is unknown&lt;br /&gt;TCHAR *tempPath = new TCHAR[bufferLength];&lt;br /&gt;GetTempPath(bufferLength, tempPath);&lt;br /&gt;DWORD tickCount = GetTickCount(); //Number of milliseconds elapsed since&lt;br /&gt;//machine was started.&lt;br /&gt;wprintf(L"%sBlizzard Installer Bootstrap - %08x\\", tempPath, tickCount);&lt;br /&gt;//CreateDirectory()&lt;br /&gt;/* This is how the new process is created */&lt;br /&gt;const DWORD FILE_NAME_LENGTH = 260; //Don't know why Blizzard chose this number&lt;br /&gt;TCHAR *fileName = new TCHAR[FILE_NAME_LENGTH];&lt;br /&gt;GetModuleFileName(NULL, fileName, FILE_NAME_LENGTH);&lt;br /&gt;wprintf(L"%sBlizzard Installer Bootstrap - %08x\\ --path=\"%s\"", tempPath, tickCount, fileName);&lt;br /&gt;//CreateProcess(NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, ?, ?, GetModuleHandle())&lt;br /&gt;delete [] tempPath;&lt;br /&gt;delete [] fileName;&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/windows.h&gt;&lt;/iostream&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6499938072489723782?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6499938072489723782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6499938072489723782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6499938072489723782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6499938072489723782'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2010/02/reverse-engineering-starcraft-getting.html' title='Reverse Engineering Starcraft - Getting it to run in Ollydbg'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-8566370947709440537</id><published>2010-01-24T00:31:00.000-08:00</published><updated>2010-01-24T00:46:38.430-08:00</updated><title type='text'>Thoughts on Starcraft 26 character algorithm</title><content type='html'>I was actually working on it back in December 2009 and into the first 2 weeks of January 2010. So far I figured out how to get to run in Ollydbg (frustrating at first since I was single stepping each line) and was able to get my hands on Ida Pro to enable me to visualize to what code does the conditional jump take me to (powerful software which I barely know how to use). Anyway, it looks like there are 4 functions that make up the algorithm that checks the key. I only figured out 2 of the 4. Number 3 is driving me nuts and I don't want to look at Number 4 (both are long and tedious to single step through; Yes, I am aware that Ida Pro comes with a decompiler but that is not much help). I don't know for sure but I have a feeling that the algorithm is one-way, as in you can only check the key but not generate one like the older algorithm for the 13 digit key. I will probably post my findings so far (assembly code and C++ source code) before the end of February.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-8566370947709440537?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/8566370947709440537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=8566370947709440537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8566370947709440537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8566370947709440537'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2010/01/thoughts-on-starcraft-26-character.html' title='Thoughts on Starcraft 26 character algorithm'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6739384104593771919</id><published>2010-01-24T00:25:00.000-08:00</published><updated>2010-01-24T00:29:23.405-08:00</updated><title type='text'>Analysis of Cisco Press CCNP ISCW Test software</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NpFAQJ7VFOY/S1wEu7kxXcI/AAAAAAAAADs/ZPBwoHFyhx8/s1600-h/03real.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 253px;" src="http://3.bp.blogspot.com/_NpFAQJ7VFOY/S1wEu7kxXcI/AAAAAAAAADs/ZPBwoHFyhx8/s320/03real.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5430220455014391234" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NpFAQJ7VFOY/S1wEuh2L-iI/AAAAAAAAADk/Q5S1tEnODEM/s1600-h/04.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 70px;" src="http://4.bp.blogspot.com/_NpFAQJ7VFOY/S1wEuh2L-iI/AAAAAAAAADk/Q5S1tEnODEM/s320/04.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5430220448108116514" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_NpFAQJ7VFOY/S1wEuC9SvlI/AAAAAAAAADc/Hj3kqih5bLM/s1600-h/03.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 222px;" src="http://1.bp.blogspot.com/_NpFAQJ7VFOY/S1wEuC9SvlI/AAAAAAAAADc/Hj3kqih5bLM/s320/03.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5430220439816420946" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NpFAQJ7VFOY/S1wEt3xEo6I/AAAAAAAAADU/KRNkW4c3q7A/s1600-h/02.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 257px;" src="http://2.bp.blogspot.com/_NpFAQJ7VFOY/S1wEt3xEo6I/AAAAAAAAADU/KRNkW4c3q7A/s320/02.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5430220436812374946" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NpFAQJ7VFOY/S1wEtTNUVxI/AAAAAAAAADM/KYSXVibtxBY/s1600-h/01.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 255px;" src="http://4.bp.blogspot.com/_NpFAQJ7VFOY/S1wEtTNUVxI/AAAAAAAAADM/KYSXVibtxBY/s320/01.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5430220426998732562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;i&gt;NOTE: I heard Cisco will be changing the requirements for the CCNP and ISCW won't be needed anymore.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style=" Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;Analysis of Cisco Press CCNP ISCW Test software&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style=" Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;Target:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;Cisco Press CCNP ISCW Test software that came on a CD included with the book: &lt;u&gt;CCNP ISCW – Official Exam Certification Guide&lt;/u&gt; (ISBN-13:978-1-58720-150-9; ISBN-10:1-58720-150-X).&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Specifically, the register.exe file located in the directory that the software has installed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style=" Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;Materials and Methods:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;The program was analyzed on 32-bit Windows Vista Ultimate SP2 with the latest updates using Ollydbg 1.10 and PEiD 0.95. Microsoft’s FCIV was used to generate the MD5 and SHA1 hashes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style=" Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;Introduction:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;After installation of the software, executing it for the first time will generate a message box that asks the user to register the CD-ROM using the “Software Registration Wizard”. Clicking “Next” will lead to a screen with a very long EULA which most people don’t read. If one actually spent the time reading it, then it is apparent that the software is restricted to a &lt;b style="mso-bidi-font-weight:normal"&gt;single computer&lt;/b&gt; and that “&lt;i style="mso-bidi-font-style:normal"&gt;the User is not able to transfer the license to another computer after registration through Boson’s unique copy protection&lt;/i&gt;”. If one hasn’t guessed the copy protection already, it is quite obvious after moving on to the next screen. The “copy protection” requires one to enter in a 9 digit serial number that came with the disc and &lt;b style="mso-bidi-font-weight:normal"&gt;activate&lt;/b&gt; via the Internet or telephone. The activation is how Boson reinforces the EULA and prevents people who bought the book and CD &lt;b style="mso-bidi-font-weight:normal"&gt;used&lt;/b&gt; from freely using the practice tests because it was already activated.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;In this post, I will discuss of circumventing such draconian restrictions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style=" Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;Discussion:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;PEiD will reveal that register.exe is not packed and is coded in MS Visual Basic 5.0/6.0. There are 3 flaws with the copy protection in place:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:0in;margin-right:0in;margin-bottom:0in; margin-left:38.7pt;margin-bottom:.0001pt;text-indent:-.25in;line-height:normal; mso-list:l0 level1 lfo1"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-Times New Roman&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-list:Ignore"&gt;1.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;The “Unique Serial Number” is only unique in a sense if one is to contact Boson by Internet or telephone in order to activate the software.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Circumvention allows for a 9 digit random number to be entered in.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;This number does not have any effect on the activation key, since the key is tied to the “Computer Unique Serial Number”, which is irrelevant due to patching or serial fishing. &lt;b style="mso-bidi-font-weight: normal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:0in;margin-right:0in;margin-bottom:0in; margin-left:38.7pt;margin-bottom:.0001pt;text-indent:-.25in;line-height:normal; mso-list:l0 level1 lfo1"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-Times New Roman&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-list:Ignore"&gt;2.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;The activation key can be serial fished from memory (hint – it has 3 dashes “-“ and can be seen in memory being compared with the invalid activation key entered).&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;If activation is successful, the activation key is stored in a file with a “key” extension located in the directory that the program is installed in.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;It can be opened up with Notepad or Wordpad.&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:0in;margin-right:0in;margin-bottom:0in; margin-left:38.7pt;margin-bottom:.0001pt;text-indent:-.25in;line-height:normal; mso-list:l0 level1 lfo1"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-Times New Roman&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;&lt;span style="mso-list:Ignore"&gt;3.&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;font-size:12.0pt;"&gt;Patching 3 conditional jumps with NOPs is all it takes to crack the software (hint – the text string “SUCCESS” should appear in two places; all one needs to do is to look at the code above where the text string appears).&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;It will accept any activation valid/invalid key (as long as the length is greater than or equal to 5, which can also be patched but let’s keep that to a minimum.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;My personal rule on patching is to do the least amount of patching that gets the program cracked) or activate the program if the Internet option is chosen even though the computer is not connected.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;This is the best method to use if one wants to activate on multiple computers by installing the software and using the patched register.exe file.&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;The MD5/SHA1 hashes for the original and patched register.exe files are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;register.exe - &lt;span style="mso-tab-count:1"&gt;   &lt;/span&gt;MD5 - a54807f4bb1959f6a265436bfe55869e &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:0in;margin-right:0in;margin-bottom:0in; margin-left:.5in;margin-bottom:.0001pt;text-indent:.5in;line-height:normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;SHA1 - 4e55ed937712c56b813c516d3f255d7c549f4e35&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;register_crack.exe – &lt;span style="mso-tab-count:1"&gt;    &lt;/span&gt;MD5 – 5eef0d991ff0f1a6cd29a38c8f8e5eff&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;&lt;span style="mso-tab-count:3"&gt;                                    &lt;/span&gt;SHA1 - 7a7e28cf18549072ea64829cebc68d70c0239b45&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;Conclusion:&lt;/span&gt;&lt;/b&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span style="Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;font-family:&amp;quot;;"&gt;&lt;span style="mso-tab-count:1"&gt;            &lt;/span&gt;I believe that this program is simple and easy enough for those who are beginning to reverse engineer software to be able to circumvent Boson’s “unique copy protection”, so that is why I will not go in depth or give step-by-step instructions of how to do it (plus it will make this a shorter post to read).&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The circumvention and learning is left up to you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span class="Apple-style-span"  style="font-family:'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6739384104593771919?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6739384104593771919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6739384104593771919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6739384104593771919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6739384104593771919'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2010/01/analysis-of-cisco-press-ccnp-iscw-test.html' title='Analysis of Cisco Press CCNP ISCW Test software'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NpFAQJ7VFOY/S1wEu7kxXcI/AAAAAAAAADs/ZPBwoHFyhx8/s72-c/03real.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-7924877322431735764</id><published>2009-02-19T10:02:00.001-08:00</published><updated>2009-02-19T10:07:54.098-08:00</updated><title type='text'>SmartVersion 1.00 - 2.00 Keygen C++ source code</title><content type='html'>&lt;pre&gt;&lt;span class="comment"  style="font-size:100%;"&gt;//The algorithm for SmartVersion is exactly the same as the one mentioned in&lt;br /&gt;//WinImage, except for the fact that differect edition constant numbers are used.&lt;br /&gt;&lt;br /&gt;// SmartVersion Keygen.cpp&lt;br /&gt;// Generates working and valid keys for all versions 1.00 - 2.00&lt;br /&gt;&lt;/span&gt;&lt;span class="pre"  style="font-size:100%;"&gt;&lt;br /&gt;#include "stdafx.h"&lt;br /&gt;#include &amp;lt;iomanip&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;string&amp;gt;&lt;br /&gt;#include &amp;lt;windows.h&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;&lt;br /&gt;using namespace&lt;/span&gt;&lt;span style="font-size:100%;"&gt; std&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; LENGTH&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 256&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt; //Size of the character arrays&lt;br /&gt;&lt;br /&gt;//Constants used in the generation of the raw serial number.&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; THREE_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x3&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; SEVEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x7&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; FOURTEEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x0E&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; TWENTYSEVEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x27&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; SERIAL_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x47694C&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;//Edition constant numbers for SmartVersion 1.00.  Will register version 2.00.&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; version100&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[] = {&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;      0x12091999&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;                                  0x31121999&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;                                  0x2062000&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;         };&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;//Edition constant numbers for SmartVersion 2.00. Will NOT register version 1.00.&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt;const&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt; int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; version200&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[] = {&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;          0x13062004&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;                                  0x21032004&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;                                  0x28032004&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;                                  0x5052005&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;                                  0x29052005&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt;&lt;br /&gt;                                  0x1122004&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;&lt;br /&gt;                      };&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;//The "semiraw_serial" is produced after the raw serial and edition&lt;br /&gt;//constant number are added together.  After this function is executed&lt;br /&gt;//"semiraw_serial" will contain the actual serial key.&lt;br /&gt;//This function will switch the 8/B in the semiraw serial to B/8 respectively.&lt;br /&gt;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;void&lt;/span&gt;&lt;span style="font-size:100%;"&gt; processSerial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;TCHAR semiraw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[])&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;char&lt;/span&gt;&lt;span style="font-size:100%;"&gt; al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;for&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;unsigned int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; wcslen&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;semiraw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;++)&lt;br /&gt;{&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; semiraw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;];&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; if&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; ==&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x0038&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;)&lt;br /&gt; {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;  al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; +&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x000A&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt; else if&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; ==&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x0042&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;)&lt;br /&gt; {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;  al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; +&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0x00F6&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; semiraw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;] =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; al&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;//This function will print the serial numbers for all versions&lt;br /&gt;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;void&lt;/span&gt;&lt;span style="font-size:100%;"&gt; PrintSerial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; raw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;TCHAR temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;LENGTH&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;];&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;printf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;printf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"version 1.00\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;  for&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; (&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 3&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;++)&lt;br /&gt;  {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; wsprintf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span style="font-size:100%;"&gt; TEXT&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; (&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"%lX"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;),&lt;/span&gt;&lt;span style="font-size:100%;"&gt; raw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; +&lt;/span&gt;&lt;span style="font-size:100%;"&gt; version100&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;]);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; processSerial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; wprintf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;L"Registration #: %s\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;br /&gt;  }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;printf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;  printf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"version 2.00\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;  for&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; (&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 6&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;++)&lt;br /&gt;  {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; wsprintf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span style="font-size:100%;"&gt; TEXT&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; (&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"%lX"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;),&lt;/span&gt;&lt;span style="font-size:100%;"&gt; raw_serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; +&lt;/span&gt;&lt;span style="font-size:100%;"&gt; version200&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;]);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; processSerial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; wprintf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;L"Registration #: %s\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;,&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;br /&gt;  }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;printf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span class="keyword"  style="font-size:100%;"&gt; main&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EBX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; FOURTEEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; TWENTYSEVEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; SERIAL_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;char&lt;/span&gt;&lt;span style="font-size:100%;"&gt; name&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;LENGTH&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;];&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;//Asks the user to type in the name to register the program&lt;br /&gt;//with.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; printf&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="string"  style="font-size:100%;"&gt;"SmartVersion v1.00 - 2.00 Keygen\nName:"&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;gets&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;name&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;//Algorithm that generates the raw serial number from the&lt;br /&gt;//specified name.  The edition constant number needs to be added&lt;br /&gt;//to the raw serial before being processed.&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt; for&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span class="type"  style="font-size:100%;"&gt;unsigned int&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; strlen&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;name&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;++)&lt;br /&gt;{&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; /&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EBX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; %&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EBX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; if&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; ==&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;)&lt;br /&gt; {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;  EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; TWENTYSEVEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; toupper&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;name&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;]);&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; i&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; +&lt;/span&gt;&lt;span style="font-size:100%;"&gt; THREE_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; *&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; +&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; EAX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; /&lt;/span&gt;&lt;span style="font-size:100%;"&gt; FOURTEEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt; EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; temp&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; %&lt;/span&gt;&lt;span style="font-size:100%;"&gt; FOURTEEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; if&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;EDX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; ==&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;)&lt;br /&gt; {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;  EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; *&lt;/span&gt;&lt;span style="font-size:100%;"&gt; SEVEN_HEX&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt; else&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;&lt;br /&gt; {&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;  EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; =&lt;/span&gt;&lt;span style="font-size:100%;"&gt; EDI&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt; *&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 3&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt; }&lt;br /&gt;}&lt;/span&gt;&lt;span class="comment"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  //Prints the generated serial numbers&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; PrintSerial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;(&lt;/span&gt;&lt;span style="font-size:100%;"&gt;serial&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;);&lt;/span&gt;&lt;span class="flow"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;return&lt;/span&gt;&lt;span class="int"  style="font-size:100%;"&gt; 0&lt;/span&gt;&lt;span class="operator"  style="font-size:100%;"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-7924877322431735764?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/7924877322431735764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=7924877322431735764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/7924877322431735764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/7924877322431735764'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2009/02/smartversion-100-200-keygen-c-source.html' title='SmartVersion 1.00 - 2.00 Keygen C++ source code'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-9111482854547924584</id><published>2009-02-19T09:38:00.000-08:00</published><updated>2009-02-19T10:01:02.185-08:00</updated><title type='text'>Analysis of WinImage 3.00 - 8.10</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Analysis of WinImage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Abstract:&lt;/span&gt;&lt;br /&gt; The target audience are those who are just getting started in reverse engineering ("cracking") programs.  Though, this is not a guide that will hand-hold you through the process.  Instead, I hope enough information is provided so that my work can be replicated.  I assume you, the reader, have some knowledge in Intel x86&lt;br /&gt;assembly, in using a debugger, and had experience with some crackmes.  I will explain the process of generating the valid keys for WinImage.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Keyword(s)&lt;/span&gt;: &lt;span style="font-style: italic;"&gt;algorithm, cracking, keygen, Ollydbg, WinImage&lt;/span&gt;    &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Purpose:&lt;/span&gt;&lt;br /&gt; To reverse engineer and analyze how the serial registration algorithm works in WinImage in order to construct a key generator.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Materials and methods:&lt;/span&gt;&lt;br /&gt; Ollydbg v1.10 was used to analyze WinImage 6.00.6000 in Windows XP running as a virtual machine in VMWare Workstation.  Packer detection was done using PEiD v0.95.  The key generator is written in C++ and compiled with Visual Studio 2008 on a computer system running Windows Server 2008 Standard x86-64. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Discussion:&lt;/span&gt;&lt;br /&gt; The main executable, "winimage.exe", is not packed.  To register the program, go to Options-&gt;Registering and enter in a random name and registration code to get the error message.  The program was then closed before being opened under Ollydbg.  The error message was searched for in the "referenced text string" option but could not be found.  This method did work in programs like Starcraft or Winzip 7.0 SR-1 (both mentioned in previous blog postings), but for WinImage no. One can place a breakpoint on the MessageBox api using "bp MessageBoxA" and working backwards from the error message.  Another method is to place a breakpoint on the GetDlgItemText api using "bp GetDlgItemTextA".  This works because the program needs a way to get the inputted name and registration number from the dialog box.  From there, it is necessary to trace through the code to see where the user inputted registration code is checked against the real code.  The real code will appear if you look in the registers.  The function "strcmp" is used to compare the codes.  This comparison is done 6 times, since the code can specify an edition and/or version.  A breakpoint on wsprintf can also be done ("bp wsprintfA") and if one looks above the code, one can see the serial algorithm.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Analysis of the algorithm:&lt;/span&gt;&lt;br /&gt; The registration code is generated from a name after going through a two step process.  The first step involves converting the alphabet characters in the name to uppercase.  After such conversion, the hexadecimal values of each characters are put through multiplication and division before being added to 0x47694C to get the raw serial. This raw serial is then converted to a wide character string with the function, wsprintf, before being checked to see if any characters in are '8' or 'B'.  If it detects such characters, 0x000A or 0x00F6 are added respectively to the hexadecimal value of the character.  After the check, the serial (will be called 'semiraw') can be used to register the program and enable the standard edition features.  However, it is possible to generate 5 other keys that are able to register the program.  Other keys are generated by adding the semiraw key with an "edition constant number" (can't think of a better name to call it).  From testing, it seems that different edition constant numbers produce keys that enabled certain editions (standard or professional) and were valid or invalid for certain versions of the program.  I searched other versions of the program and was able to find a total of 10 unique edition constant numbers (5 for standard and 5 for professional).  It is possible for a key to be valid for a wide range of WinImage version 3.00 to 8.10 if one uses the right edition constant number.&lt;br /&gt;&lt;br /&gt;//Main algorithm from WinImage 6.00.6000&lt;br /&gt;0043A24E  |&gt; 8BC1           /MOV EAX,ECX&lt;br /&gt;0043A250  |. 6A 0E          |PUSH 0E&lt;br /&gt;0043A252  |. 99             |CDQ&lt;br /&gt;0043A253  |. 5B             |POP EBX; &lt;span style="color: rgb(255, 0, 0);"&gt;EBX = 0xE&lt;/span&gt;&lt;br /&gt;0043A254  |. F7FB           |IDIV EBX&lt;br /&gt;0043A256  |. 85D2           |TEST EDX,EDX&lt;br /&gt;0043A258  |. 75 03          |JNZ SHORT winimage.0043A25D&lt;br /&gt;0043A25A  |. 6A 27          |PUSH 27&lt;br /&gt;0043A25C  |. 5F             |POP EDI; &lt;span style="color: rgb(255, 0, 0);"&gt;EDI = 0x27&lt;/span&gt;&lt;br /&gt;0043A25D  |&gt; 0FB6540E 03    |MOVZX EDX,BYTE PTR DS:[ESI+ECX+3]&lt;br /&gt;0043A262  |. 8D41 03        |LEA EAX,DWORD PTR DS:[ECX+3]&lt;br /&gt;0043A265  |. 0FAFD7         |IMUL EDX,EDI; &lt;span style="color: rgb(255, 0, 0);"&gt;EDX = EDX * EDI&lt;/span&gt;&lt;br /&gt;0043A268  |. 0155 FC        |ADD DWORD PTR SS:[EBP-4],EDX&lt;br /&gt;0043A26B  |. 6A 0E          |PUSH 0E&lt;br /&gt;0043A26D  |. 99             |CDQ&lt;br /&gt;0043A26E  |. 5B             |POP EBX; &lt;span style="color: rgb(255, 0, 0);"&gt;EBX = 0xE&lt;/span&gt;&lt;br /&gt;0043A26F  |. F7FB           |IDIV EBX&lt;br /&gt;0043A271  |. 85D2           |TEST EDX,EDX&lt;br /&gt;0043A273  |. 74 05          |JE SHORT winimage.0043A27A&lt;br /&gt;0043A275  |. 8D3C7F         |LEA EDI,DWORD PTR DS:[EDI+EDI*2]; &lt;span style="color: rgb(255, 0, 0);"&gt;EDI = EDI * 3&lt;br /&gt;&lt;/span&gt;0043A278  |. EB 03          |JMP SHORT winimage.0043A27D&lt;br /&gt;0043A27A  |&gt; 6BFF 07        |IMUL EDI,EDI,7; &lt;span style="color: rgb(255, 0, 0);"&gt;EDI = EDI * 7&lt;/span&gt;&lt;br /&gt;0043A27D  |&gt; 41             |INC ECX&lt;br /&gt;0043A27E  |. 3B4D 08        |CMP ECX,DWORD PTR SS:[EBP+8]&lt;br /&gt;0043A281  |.^7C CB          \JL SHORT winimage.0043A24E&lt;br /&gt;&lt;br /&gt;//How the serial number is processed from WinImage 6.00.6000&lt;br /&gt;0043A295  |. FF75 0C        PUSH DWORD PTR SS:[EBP+C]                ; /&lt;%lX&gt;&lt;br /&gt;0043A298  |. 8D45 F0        LEA EAX,DWORD PTR SS:[EBP-10]            ; |&lt;br /&gt;0043A29B  |. 68 9CBA4400    PUSH winimage.0044BA9C                   ; |Format = "%lX"&lt;br /&gt;0043A2A0  |. 50             PUSH EAX                                 ; |s&lt;br /&gt;0043A2A1  |. FF15 64FB4400  CALL DWORD PTR DS:[&lt;&amp;amp;USER32.wsprintfA&gt;]  ; \wsprintfA&lt;br /&gt;0043A2A7  |. 8A45 F0        MOV AL,BYTE PTR SS:[EBP-10]&lt;br /&gt;0043A2AA  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;0043A2AD  |. 84C0           TEST AL,AL&lt;br /&gt;0043A2AF  |. 74 1E          JE SHORT winimage.0043A2CF&lt;br /&gt;0043A2B1  |. 8D4D F0        LEA ECX,DWORD PTR SS:[EBP-10]&lt;br /&gt;0043A2B4  |. 2BCE           SUB ECX,ESI&lt;br /&gt;0043A2B6  |&gt; 3C 38          /CMP AL,38&lt;br /&gt;0043A2B8  |. 75 04          |JNZ SHORT winimage.0043A2BE&lt;br /&gt;0043A2BA  |. 04 0A          |ADD AL,0A&lt;br /&gt;0043A2BC  |. EB 06          |JMP SHORT winimage.0043A2C4&lt;br /&gt;0043A2BE  |&gt; 3C 42          |CMP AL,42&lt;br /&gt;0043A2C0  |. 75 02          |JNZ SHORT winimage.0043A2C4&lt;br /&gt;0043A2C2  |. 04 F6          |ADD AL,0F6&lt;br /&gt;0043A2C4  |&gt; 8806           |MOV BYTE PTR DS:[ESI],AL&lt;br /&gt;0043A2C6  |. 8A4431 01      |MOV AL,BYTE PTR DS:[ECX+ESI+1]&lt;br /&gt;0043A2CA  |. 46             |INC ESI&lt;br /&gt;0043A2CB  |. 84C0           |TEST AL,AL&lt;br /&gt;0043A2CD  |.^75 E7          \JNZ SHORT winimage.0043A2B6&lt;br /&gt;&lt;br /&gt;//Some of the edition constant numbers from 8.10&lt;br /&gt;0041294D   . 8D86 48190514  LEA EAX,DWORD PTR DS:[ESI+14051948]&lt;br /&gt;0041296E   . 8D86 54190617  LEA EAX,DWORD PTR DS:[ESI+17061954]&lt;br /&gt;0041298F   . 8D86 81190510  LEA EAX,DWORD PTR DS:[ESI+10051981]&lt;br /&gt;004129AC   . 8D86 95190104  LEA EAX,DWORD PTR DS:[ESI+4011995]&lt;br /&gt;004129CD   . 8D86 97190602  LEA EAX,DWORD PTR DS:[ESI+2061997]&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion:&lt;/span&gt;&lt;br /&gt; In my opinion, I think the level of difficulty reverse engineering this program is on par with Winzip 7.0 SR-1. The draft version of the keygen produced correct and defective registration codes for some names.  After tracing, through I found out that I was dividing by the wrong number.  Even after fixing that problem, the keygen was still producing some wrong codes.  After more tracing, I found out that the serial numbers are processed&lt;br /&gt; (as mentioned above).  After figuring out how that was done, my focus was on how the other keys were generated. This involved more tracing over the code until figuring out what the edition constant numbers were. After coding the keygen, much time was spent testing and debugging it on all versions of WinImage from 3.00 to&lt;br /&gt;the latest 8.10.8100.  I know one can google the serial or crack for this program, but why do this and risk infecting your computer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Keygen Source code:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="comment"&gt;// WinImage Keygen.cpp&lt;br /&gt;// Generates working and valid keys for all versions 3.00 - 8.10&lt;br /&gt;// of the standard and professional editions.&lt;br /&gt;&lt;/span&gt;&lt;span class="pre"&gt;&lt;br /&gt;#include "stdafx.h"&lt;br /&gt;#include &amp;lt;iomanip&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;string&amp;gt;&lt;br /&gt;#include &amp;lt;windows.h&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;using namespace&lt;/span&gt; std&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; LENGTH&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 256&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt; //Size of the character arrays&lt;br /&gt;&lt;br /&gt;//Constants used in the generation of the raw serial number.&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; THREE_HEX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0x3&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; SEVEN_HEX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0x7&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; FOURTEEN_HEX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0x0E&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; TWENTYSEVEN_HEX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0x27&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; SERIAL_HEX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0x47694C&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//Numbers that are added to the raw serial number before it is&lt;br /&gt;//processed.  With the exception of the first one, the numbers&lt;br /&gt;//are expressed in hexadecimal format.  The comments to the right&lt;br /&gt;//of each of the numbers are the versions the program that the&lt;br /&gt;//key generated will work on.&lt;br /&gt;//The numbers will be called "edition constant numbers".&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; STANDARD_EDITION&lt;span class="operator"&gt;[] = {&lt;/span&gt;&lt;span class="int"&gt;  0&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //3.00 - 8.10.8100 not &lt;br /&gt;           //an edition constant number&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;        0x14051948&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //3.00 - 8.10.8100&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;        0x17061954&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //3.00 - 8.10.8100&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;        0x4011995&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt;  //4.00.4000 - 8.10.8100&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;        0x21042002&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //7.0.7000 - 8.10.8100 &lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;        0x09112005&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //8.0.8000 - 8.10.8100&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt;          };&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//This array is for displaying to the user the program version the&lt;br /&gt;//generated key will work on.&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;const&lt;/span&gt; string SE_NOTES&lt;span class="operator"&gt;[] = {&lt;/span&gt;&lt;span class="string"&gt; "3.00 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "3.00 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "3.00 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "4.00.4000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "7.0.7000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt;&lt;br /&gt;&lt;br /&gt;       "8.0.8000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;        };&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//Numbers that are added to the raw serial number before it is&lt;br /&gt;//processed.  With the exception of the first one, the numbers&lt;br /&gt;//are expressed in hexadecimal format.  The comments to the right&lt;br /&gt;//of each of the numbers are the versions the program that the&lt;br /&gt;//key generated will work on.&lt;br /&gt;//The numbers will be called "edition constant numbers".&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;const&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; PROFESSIONAL_EDITION&lt;span class="operator"&gt;[] = {&lt;/span&gt;&lt;span class="int"&gt;0x10051981&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //3.00 - 8.10.8100&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;         0x2061997&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt;  //4.00.4000 - 8.10.8100&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;         0x16062004&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //7.0.7000 - 8.10.8100&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;         0x13062004&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //7.0.7000 - 8.10.8100&lt;br /&gt;&lt;/span&gt;&lt;span class="int"&gt;         0x24112005&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="comment"&gt; //8.0.8000 - 8.10.8100&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt;          };&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//This array is for displaying to the user the program version the&lt;br /&gt;//generated key will work on.&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;const&lt;/span&gt; string PE_NOTES&lt;span class="operator"&gt;[] = {&lt;/span&gt;&lt;span class="string"&gt; "3.00 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "4.00.4000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "7.0.7000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "7.0.7000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="string"&gt; &lt;br /&gt;       "8.0.8000 - 8.10.8100"&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;&lt;br /&gt;        };&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;//The "semiraw_serial" is produced after the raw serial and edition&lt;br /&gt;//constant number are added together.  After this function is executed&lt;br /&gt;//"semiraw_serial" will contain the actual serial key.&lt;br /&gt;//This function will switch the 8/B in the semiraw serial to B/8 respectively.&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt;void&lt;/span&gt; processSerial&lt;span class="operator"&gt;(&lt;/span&gt;TCHAR semiraw_serial&lt;span class="operator"&gt;[])&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; char&lt;/span&gt; al&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;unsigned int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; wcslen&lt;span class="operator"&gt;(&lt;/span&gt;semiraw_serial&lt;span class="operator"&gt;);&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  al&lt;span class="operator"&gt; =&lt;/span&gt; semiraw_serial&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;];&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;al&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 0x0038&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   al&lt;span class="operator"&gt; =&lt;/span&gt; al&lt;span class="operator"&gt; +&lt;/span&gt;&lt;span class="int"&gt; 0x000A&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  else if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;al&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 0x0042&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   al&lt;span class="operator"&gt; =&lt;/span&gt; al&lt;span class="operator"&gt; +&lt;/span&gt;&lt;span class="int"&gt; 0x00F6&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;/span&gt;&lt;br /&gt;  semiraw_serial&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] =&lt;/span&gt; al&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;br /&gt;}&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//This function will print the serial numbers for all editions and&lt;br /&gt;//versions of WinImage.&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt;void&lt;/span&gt; PrintSerial&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; raw_serial&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt; TCHAR temp&lt;span class="operator"&gt;[&lt;/span&gt;LENGTH&lt;span class="operator"&gt;];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"STANDARD EDITION\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"&gt; 6&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  wsprintf&lt;span class="operator"&gt;(&lt;/span&gt;temp&lt;span class="operator"&gt;,&lt;/span&gt; TEXT&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"%lX"&lt;/span&gt;&lt;span class="operator"&gt;),&lt;/span&gt; raw_serial&lt;span class="operator"&gt; +&lt;/span&gt; STANDARD_EDITION&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  processSerial&lt;span class="operator"&gt;(&lt;/span&gt;temp&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;  wprintf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;L"Registration #: %s"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; temp&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;  cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; setw&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="int"&gt;5&lt;/span&gt;&lt;span class="operator"&gt; + (&lt;/span&gt;&lt;span class="int"&gt;5&lt;/span&gt;&lt;span class="operator"&gt; -&lt;/span&gt; wcslen&lt;span class="operator"&gt;(&lt;/span&gt;temp&lt;span class="operator"&gt;))) &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; ""&lt;/span&gt;&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; SE_NOTES&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"PROFESSIONAL EDITION\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"&gt; 5&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  wsprintf&lt;span class="operator"&gt;(&lt;/span&gt;temp&lt;span class="operator"&gt;,&lt;/span&gt; TEXT&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="string"&gt;"%lX"&lt;/span&gt;&lt;span class="operator"&gt;),&lt;/span&gt; raw_serial&lt;span class="operator"&gt; +&lt;/span&gt; PROFESSIONAL_EDITION&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  processSerial&lt;span class="operator"&gt;(&lt;/span&gt;temp&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;  wprintf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;L"Registration #: %s"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; temp&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;  cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; setw&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="int"&gt;5&lt;/span&gt;&lt;span class="operator"&gt; + (&lt;/span&gt;&lt;span class="int"&gt;5&lt;/span&gt;&lt;span class="operator"&gt; -&lt;/span&gt; wcslen&lt;span class="operator"&gt;(&lt;/span&gt;temp&lt;span class="operator"&gt;))) &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; ""&lt;/span&gt;&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; PE_NOTES&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"=========================================\n"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span class="keyword"&gt; main&lt;/span&gt;&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; EAX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; int&lt;/span&gt; EBX&lt;span class="operator"&gt; =&lt;/span&gt; FOURTEEN_HEX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; EDX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; int&lt;/span&gt; EDI&lt;span class="operator"&gt; =&lt;/span&gt; TWENTYSEVEN_HEX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; serial&lt;span class="operator"&gt; =&lt;/span&gt; SERIAL_HEX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; int&lt;/span&gt; temp&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; char&lt;/span&gt; name&lt;span class="operator"&gt;[&lt;/span&gt;LENGTH&lt;span class="operator"&gt;];&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt; &lt;br /&gt; //Asks the user to type in the name to register the program&lt;br /&gt; //with.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"WinImage 3.00 - 8.10 Keygen\nName:"&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt; gets&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Algorithm that generates the raw serial number from the&lt;br /&gt; //specified name.  The edition constant number needs to be added&lt;br /&gt; //to the raw serial before being processed.&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;unsigned int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; strlen&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;);&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  EAX&lt;span class="operator"&gt; =&lt;/span&gt; i&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  temp&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  EAX&lt;span class="operator"&gt; =&lt;/span&gt; temp&lt;span class="operator"&gt; /&lt;/span&gt; EBX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  EDX&lt;span class="operator"&gt; =&lt;/span&gt; temp&lt;span class="operator"&gt; %&lt;/span&gt; EBX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  &lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;EDX&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   EDI&lt;span class="operator"&gt; =&lt;/span&gt; TWENTYSEVEN_HEX&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  EDX&lt;span class="operator"&gt; =&lt;/span&gt; toupper&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;]);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  EAX&lt;span class="operator"&gt; =&lt;/span&gt; i&lt;span class="operator"&gt; +&lt;/span&gt; THREE_HEX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  temp&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  EDX&lt;span class="operator"&gt; =&lt;/span&gt; EDX&lt;span class="operator"&gt; *&lt;/span&gt; EDI&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  serial&lt;span class="operator"&gt; =&lt;/span&gt; serial&lt;span class="operator"&gt; +&lt;/span&gt; EDX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;  EAX&lt;span class="operator"&gt; =&lt;/span&gt; temp&lt;span class="operator"&gt; /&lt;/span&gt; FOURTEEN_HEX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  EDX&lt;span class="operator"&gt; =&lt;/span&gt; temp&lt;span class="operator"&gt; %&lt;/span&gt; FOURTEEN_HEX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;EDX&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   EDI&lt;span class="operator"&gt; =&lt;/span&gt; EDI&lt;span class="operator"&gt; *&lt;/span&gt; SEVEN_HEX&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  else&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   EDI&lt;span class="operator"&gt; =&lt;/span&gt; EDI&lt;span class="operator"&gt; *&lt;/span&gt;&lt;span class="int"&gt; 3&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;br /&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; PrintSerial&lt;span class="operator"&gt;(&lt;/span&gt;serial&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; return&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-9111482854547924584?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/9111482854547924584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=9111482854547924584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/9111482854547924584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/9111482854547924584'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2009/02/analysis-of-winimage-300-810.html' title='Analysis of WinImage 3.00 - 8.10'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6037911777777958617</id><published>2008-09-30T10:15:00.000-07:00</published><updated>2008-09-30T10:27:34.883-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IsDebuggerPresent'/><category scheme='http://www.blogger.com/atom/ns#' term='password'/><category scheme='http://www.blogger.com/atom/ns#' term='check'/><category scheme='http://www.blogger.com/atom/ns#' term='Itunes'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><category scheme='http://www.blogger.com/atom/ns#' term='Parental Controls'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><title type='text'>Analysis of iTunes Antidebug and Parental Controls</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Target:&lt;/span&gt; Apple Itunes 8.0.0.35&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Filename:&lt;/span&gt; iTunes.exe&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;File MD5:&lt;/span&gt; 8b8ea6aff1e43b927e49228287f9711b&lt;br /&gt;&lt;br /&gt;The antidebug features has not change that much since version 7.6.1.9.  There are still the 3 &lt;span style="font-style: italic;"&gt;IsDebuggerPresent&lt;/span&gt; API calls and 1 of them terminates iTunes if it detects a debugger.  I still haven't figured out how the other two are called.  Anyway, it still checks for the presence of SoftICE by querying the registry.&lt;br /&gt;Here is the section of code that terminates iTunes if a debugger is detected:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 51);"&gt;004FC80E  |. 74 08          JE SHORT iTunes.004FC818&lt;/span&gt;&lt;br /&gt;004FC810  |. 6A 00          PUSH 0                                   ; /ExitCode = 0&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;004FC812  |. FF15 C863E200  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.ExitProces&gt;; \ExitProcess&lt;/span&gt;&lt;br /&gt;004FC818  |&gt; 8935 E0AB0701  MOV DWORD PTR DS:[107ABE0],ESI&lt;br /&gt;004FC81E  |&gt; 5E             POP ESI&lt;br /&gt;004FC81F  \. C3             RETN&lt;br /&gt;&lt;br /&gt;To get around this, just change &lt;span style="font-weight: bold;"&gt;JE SHORT iTunes.004FC818&lt;/span&gt; to&lt;span style="font-weight: bold;"&gt; JMP SHORT iTunes.004FC818&lt;/span&gt; and save the file or you can use a plug in to hide Ollydbg from this type of detection technique.  Anyway, it looks like iTunes could care less if it was patched since I was able to run the patch executable.  Anyway, I was looking over iTunes to see what I can do with it and I found out a way to &lt;span style="font-weight: bold;"&gt;bypass the parental controls password check&lt;/span&gt;, however there is a catch (which I will explain later).  Three jumps must be patched in order for this to work.  I will list my method below in order for others to reproduce:&lt;br /&gt;&lt;br /&gt;1.  Search for the text "&lt;span style="color: rgb(0, 0, 0); font-style: italic;"&gt;ParentalAuthDialog&lt;/span&gt;" and scroll down to see the code below.&lt;br /&gt;2.  NOP out the JNZ Short after the two loops.&lt;br /&gt;3.  After TEST AL, AL change JNZ to JMP&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;00717240  |. 68 2CA3E700    PUSH iTunes2.00E7A32C                    ;  UNICODE "ParentalAuthDialog"&lt;/span&gt;&lt;br /&gt;00717245  |. E8 1660D0FF    CALL iTunes2.0041D260&lt;br /&gt;0071724A  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;0071724D  |. 66:3D 6500     CMP AX,65&lt;br /&gt;.&lt;br /&gt;. Boring code edited out&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;007172C0  |&gt; C600 00        /MOV BYTE PTR DS:[EAX],0  ; Loop Begin&lt;br /&gt;007172C3  |. 83C0 01        |ADD EAX,1    ; Body&lt;br /&gt;007172C6  |. 83E9 01        |SUB ECX,1    ; Body&lt;br /&gt;007172C9  |.^75 F5          \JNZ SHORT iTunes2.007172C0 ; Loop Condition&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;007172D7  |&gt; C600 00        /MOV BYTE PTR DS:[EAX],0  ; Loop Begin&lt;br /&gt;007172DA  |. 83C0 01        |ADD EAX,1    ; Body&lt;br /&gt;007172DD  |. 83E9 01        |SUB ECX,1    ; Body&lt;br /&gt;007172E0  |.^75 F5          \JNZ SHORT iTunes2.007172D7 ; Loop Condition&lt;br /&gt;007172E2  |. 3BF7           CMP ESI,EDI&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;007172E4     75 16          JNZ SHORT iTunes2.007172FC               ;  NOP out this line of code&lt;/span&gt;&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;007172F3  |. 84C0           TEST AL,AL&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;007172F5     75 2F          JNZ SHORT iTunes2.00717326               ;  Change JNZ to JMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4.  Search for the API "&lt;span style="font-weight: bold;"&gt;LogonUserW&lt;/span&gt;" and after the CMP EAX, EBX instruction change the JNZ to JMP.  You can search for this API on MSDN, but it is interesting that the password appears in plaintext here.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;0062FD05   . FF15 3060E200  CALL DWORD PTR DS:[&lt;&amp;amp;ADVAPI32.LogonUserW&gt;;  ADVAPI32.LogonUserW&lt;/span&gt;&lt;br /&gt;0062FD0B   . 3BC3           CMP EAX,EBX                            &lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;0062FD0D     75 2F          JNZ SHORT iTunes2.0062FD3E ; Change JNZ to JMP&lt;/span&gt;&lt;br /&gt;0062FD0F   . FF15 D465E200  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.GetLastErr&gt;; [GetLastError&lt;br /&gt;&lt;br /&gt;5. Save file.&lt;br /&gt;  The MD5 hash that I got for the patched file is &lt;span style="font-weight: bold;"&gt;74721636e344bfe16d2a7860c82b7e7f&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To unlock the parental controls, you type in an administrator account and any random password.  Before the patch, one must know the correct password to lock/unlock the parental controls.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;CAVEAT&lt;/span&gt; - In order for this bypass to be successful, one needs access to an administrator account to replace the original one in the Itunes folder (which may require social engineering). &lt;span style="font-style: italic;"&gt; It seems that the parental controls can only be bypassed if you are logged in with an account with administrator privileges.  I tried bypassing it from a limited account and it will not work.&lt;/span&gt;  I may look into this matter later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6037911777777958617?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6037911777777958617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6037911777777958617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6037911777777958617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6037911777777958617'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/09/analysis-of-itunes-antidebug-and.html' title='Analysis of iTunes Antidebug and Parental Controls'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-7817915106691614287</id><published>2008-08-27T22:50:00.000-07:00</published><updated>2008-08-27T23:13:27.129-07:00</updated><title type='text'>Numbers generated with Collatz Conjecture Calculator</title><content type='html'>Okay so I couldn't help it but I ended up testing 9,223,372,036,854,775,807 and it worked, sort of.  It looks like there is a problem with the number ending with 7.  When I input the number ending with the 6 then it generates the rest as normal.  27670116110564327422 is suppose to come after the number ending with the 7 since it is odd so it had to be used in the equation 3n+1. Here is the list it generated:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;9223372036854775807, 9223372036854775806&lt;/span&gt;, 4611686018427387903, 13835058055282163&lt;br /&gt;710, 6917529027641081855, 2305843009213693950, 1152921504606846975, 345876451382&lt;br /&gt;0540926, 1729382256910270463, 5188146770730811390, 2594073385365405695, 77822201&lt;br /&gt;56096217086, 3891110078048108543, 11673330234144325630, 5836665117072162815, 175&lt;br /&gt;09995351216488446, 8754997675608244223, 7818248953115181054, 3909124476557590527&lt;br /&gt;, 11727373429672771582, 5863686714836385791, 17591060144509157374, 8795530072254&lt;br /&gt;578687, 7939846143054184446, 3969923071527092223, 11909769214581276670, 59548846&lt;br /&gt;07290638335, 17864653821871915006, 8932326910935957503, 8350236659098320894, 417&lt;br /&gt;5118329549160447, 12525354988647481342, 6262677494323740671, 341288409261670398,&lt;br /&gt;170644204630835199, 511932613892505598, 255966306946252799, 767898920838758398,&lt;br /&gt;383949460419379199, 1151848381258137598, 575924190629068799, 172777257188720639&lt;br /&gt;8, 863886285943603199, 2591658857830809598, 1295829428915404799, 388748828674621&lt;br /&gt;4398, 1943744143373107199, 5831232430119321598, 2915616215059660799, 87468486451&lt;br /&gt;78982398, 4373424322589491199, 13120272967768473598, 6560136483884236799, 123366&lt;br /&gt;5377943158782, 616832688971579391, 1850498066914738174, 925249033457369087, 2775&lt;br /&gt;747100372107262, 1387873550186053631, 4163620650558160894, 2081810325279080447,&lt;br /&gt;6245430975837241342, 3122715487918620671, 9368146463755862014, 46840732318779310&lt;br /&gt;07, 14052219695633793022, 7026109847816896511, 2631585469741137918, 131579273487&lt;br /&gt;0568959, 3947378204611706878, 1973689102305853439, 5921067306917560318, 29605336&lt;br /&gt;53458780159, 8881600960376340478, 4440800480188170239, 13322401440564510718, 666&lt;br /&gt;1200720282255359, 1536858087137214462, 768429043568607231, 2305287130705821694,&lt;br /&gt;1152643565352910847, 3457930696058732542, 1728965348029366271, 51868960440880988&lt;br /&gt;14, 2593448022044049407, 7780344066132148222, 3890172033066074111, 1167051609919&lt;br /&gt;8222334, 5835258049599111167, 17505774148797333502, 8752887074398666751, 7811917&lt;br /&gt;149486448638, 3905958574743224319, 11717875724229672958, 5858937862114836479, 17&lt;br /&gt;576813586344509438, 8788406793172254719, 7918476305807212542, 395923815290360627&lt;br /&gt;1, 11877714458710818814, 5938857229355409407, 17816571688066228222, 890828584403&lt;br /&gt;3114111, 8278113458389790718, 4139056729194895359, 12417170187584686078, 6208585&lt;br /&gt;093792343039, 179011207667477502, 89505603833738751, 268516811501216254, 1342584&lt;br /&gt;05750608127, 402775217251824382, 201387608625912191, 604162825877736574, 3020814&lt;br /&gt;12938868287, 906244238816604862, 453122119408302431, 1359366358224907294, 679683&lt;br /&gt;179112453647, 2039049537337360942, 1019524768668680471, 3058574306006041414, 152&lt;br /&gt;9287153003020707, 4587861459009062122, 2293930729504531061, 6881792188513593184,&lt;br /&gt;3440896094256796592, 1720448047128398296, 860224023564199148, 43011201178209957&lt;br /&gt;4, 215056005891049787, 645168017673149362, 322584008836574681, 96775202650972404&lt;br /&gt;4, 483876013254862022, 241938006627431011, 725814019882293034, 36290700994114651&lt;br /&gt;7, 1088721029823439552, 544360514911719776, 272180257455859888, 1360901287279299&lt;br /&gt;44, 68045064363964972, 34022532181982486, 17011266090991243, 51033798272973730,&lt;br /&gt;25516899136486865, 76550697409460596, 38275348704730298, 19137674352365149, 5741&lt;br /&gt;3023057095448, 28706511528547724, 14353255764273862, 7176627882136931, 215298836&lt;br /&gt;46410794, 10764941823205397, 32294825469616192, 16147412734808096, 8073706367404&lt;br /&gt;048, 4036853183702024, 2018426591851012, 1009213295925506, 504606647962753, 1513&lt;br /&gt;819943888260, 756909971944130, 378454985972065, 1135364957916196, 56768247895809&lt;br /&gt;8, 283841239479049, 851523718437148, 425761859218574, 212880929609287, 638642788&lt;br /&gt;827862, 319321394413931, 957964183241794, 478982091620897, 1436946274862692, 718&lt;br /&gt;473137431346, 359236568715673, 1077709706147020, 538854853073510, 26942742653675&lt;br /&gt;5, 808282279610266, 404141139805133, 1212423419415400, 606211709707700, 30310585&lt;br /&gt;4853850, 151552927426925, 454658782280776, 227329391140388, 113664695570194, 568&lt;br /&gt;32347785097, 170497043355292, 85248521677646, 42624260838823, 127872782516470, 6&lt;br /&gt;3936391258235, 191809173774706, 95904586887353, 287713760662060, 143856880331030&lt;br /&gt;, 71928440165515, 215785320496546, 107892660248273, 323677980744820, 16183899037&lt;br /&gt;2410, 80919495186205, 242758485558616, 121379242779308, 60689621389654, 30344810&lt;br /&gt;694827, 91034432084482, 45517216042241, 136551648126724, 68275824063362, 3413791&lt;br /&gt;2031681, 102413736095044, 51206868047522, 25603434023761, 76810302071284, 384051&lt;br /&gt;51035642, 19202575517821, 57607726553464, 28803863276732, 14401931638366, 720096&lt;br /&gt;5819183, 21602897457550, 10801448728775, 32404346186326, 16202173093163, 4860651&lt;br /&gt;9279490, 24303259639745, 72909778919236, 36454889459618, 18227444729809, 5468233&lt;br /&gt;4189428, 27341167094714, 13670583547357, 41011750642072, 20505875321036, 1025293&lt;br /&gt;7660518, 5126468830259, 15379406490778, 7689703245389, 23069109736168, 115345548&lt;br /&gt;68084, 5767277434042, 2883638717021, 8650916151064, 4325458075532, 2162729037766&lt;br /&gt;, 1081364518883, 3244093556650, 1622046778325, 4866140334976, 2433070167488, 121&lt;br /&gt;6535083744, 608267541872, 304133770936, 152066885468, 76033442734, 38016721367,&lt;br /&gt;114050164102, 57025082051, 171075246154, 85537623077, 256612869232, 128306434616&lt;br /&gt;, 64153217308, 32076608654, 16038304327, 48114912982, 24057456491, 72172369474,&lt;br /&gt;36086184737, 108258554212, 54129277106, 27064638553, 81193915660, 40596957830, 2&lt;br /&gt;0298478915, 60895436746, 30447718373, 91343155120, 45671577560, 22835788780, 114&lt;br /&gt;17894390, 5708947195, 17126841586, 8563420793, 25690262380, 12845131190, 6422565&lt;br /&gt;595, 19267696786, 9633848393, 28901545180, 14450772590, 7225386295, 21676158886,&lt;br /&gt;10838079443, 32514238330, 16257119165, 48771357496, 24385678748, 12192839374, 6&lt;br /&gt;096419687, 18289259062, 9144629531, 27433888594, 13716944297, 41150832892, 20575&lt;br /&gt;416446, 10287708223, 30863124670, 15431562335, 46294687006, 23147343503, 6944203&lt;br /&gt;0510, 34721015255, 104163045766, 52081522883, 156244568650, 78122284325, 2343668&lt;br /&gt;52976, 117183426488, 58591713244, 29295856622, 14647928311, 43943784934, 2197189&lt;br /&gt;2467, 65915677402, 32957838701, 98873516104, 49436758052, 24718379026, 123591895&lt;br /&gt;13, 37077568540, 18538784270, 9269392135, 27808176406, 13904088203, 41712264610,&lt;br /&gt;20856132305, 62568396916, 31284198458, 15642099229, 46926297688, 23463148844, 1&lt;br /&gt;1731574422, 5865787211, 17597361634, 8798680817, 26396042452, 13198021226, 65990&lt;br /&gt;10613, 19797031840, 9898515920, 4949257960, 2474628980, 1237314490, 618657245, 1&lt;br /&gt;855971736, 927985868, 463992934, 231996467, 695989402, 347994701, 1043984104, 52&lt;br /&gt;1992052, 260996026, 130498013, 391494040, 195747020, 97873510, 48936755, 1468102&lt;br /&gt;66, 73405133, 220215400, 110107700, 55053850, 27526925, 82580776, 41290388, 2064&lt;br /&gt;5194, 10322597, 30967792, 15483896, 7741948, 3870974, 1935487, 5806462, 2903231,&lt;br /&gt;8709694, 4354847, 13064542, 6532271, 19596814, 9798407, 29395222, 14697611, 440&lt;br /&gt;92834, 22046417, 66139252, 33069626, 16534813, 49604440, 24802220, 12401110, 620&lt;br /&gt;0555, 18601666, 9300833, 27902500, 13951250, 6975625, 20926876, 10463438, 523171&lt;br /&gt;9, 15695158, 7847579, 23542738, 11771369, 35314108, 17657054, 8828527, 26485582,&lt;br /&gt;13242791, 39728374, 19864187, 59592562, 29796281, 89388844, 44694422, 22347211,&lt;br /&gt;67041634, 33520817, 100562452, 50281226, 25140613, 75421840, 37710920, 18855460&lt;br /&gt;, 9427730, 4713865, 14141596, 7070798, 3535399, 10606198, 5303099, 15909298, 795&lt;br /&gt;4649, 23863948, 11931974, 5965987, 17897962, 8948981, 26846944, 13423472, 671173&lt;br /&gt;6, 3355868, 1677934, 838967, 2516902, 1258451, 3775354, 1887677, 5663032, 283151&lt;br /&gt;6, 1415758, 707879, 2123638, 1061819, 3185458, 1592729, 4778188, 2389094, 119454&lt;br /&gt;7, 3583642, 1791821, 5375464, 2687732, 1343866, 671933, 2015800, 1007900, 503950&lt;br /&gt;, 251975, 755926, 377963, 1133890, 566945, 1700836, 850418, 425209, 1275628, 637&lt;br /&gt;814, 318907, 956722, 478361, 1435084, 717542, 358771, 1076314, 538157, 1614472,&lt;br /&gt;807236, 403618, 201809, 605428, 302714, 151357, 454072, 227036, 113518, 56759, 1&lt;br /&gt;70278, 85139, 255418, 127709, 383128, 191564, 95782, 47891, 143674, 71837, 21551&lt;br /&gt;2, 107756, 53878, 26939, 80818, 40409, 121228, 60614, 30307, 90922, 45461, 13638&lt;br /&gt;4, 68192, 34096, 17048, 8524, 4262, 2131, 6394, 3197, 9592, 4796, 2398, 1199, 35&lt;br /&gt;98, 1799, 5398, 2699, 8098, 4049, 12148, 6074, 3037, 9112, 4556, 2278, 1139, 341&lt;br /&gt;8, 1709, 5128, 2564, 1282, 641, 1924, 962, 481, 1444, 722, 361, 1084, 542, 271,&lt;br /&gt;814, 407, 1222, 611, 1834, 917, 2752, 1376, 688, 344, 172, 86, 43, 130, 65, 196,&lt;br /&gt;98, 49, 148, 74, 37, 112, 56, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10&lt;br /&gt;, 5, 16, 8, 4, 2, 1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-7817915106691614287?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/7817915106691614287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=7817915106691614287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/7817915106691614287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/7817915106691614287'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/08/numbers-generated-with-collatz.html' title='Numbers generated with Collatz Conjecture Calculator'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6668087545469773590</id><published>2008-08-27T22:34:00.000-07:00</published><updated>2008-08-27T22:48:29.301-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Collatz'/><category scheme='http://www.blogger.com/atom/ns#' term='conjecture'/><category scheme='http://www.blogger.com/atom/ns#' term='calculate'/><title type='text'>Collatz Conjecture Calculator</title><content type='html'>&lt;p&gt;I am taking a discrete mathematics course and just for fun I decided to code a program to calculate and display on the numbers from an integer that the user enters in.  I couldn't believe it myself but the numbers I put in all end up going to 1.  I tested using numbers as large as 2,147,483,647 and it would not give my computer any trouble in calculating.  I am pretty sure it can use larger numbers since I code it to store the number in an "unsigned __int64".  Anyway, here is the code:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.comment { color: #999999; font-style: italic; }&lt;br /&gt;.pre { color: #000099; }&lt;br /&gt;.string { color: #009900; }&lt;br /&gt;.char { color: #009900; }&lt;br /&gt;.float { color: #996600; }&lt;br /&gt;.int { color: #999900; }&lt;br /&gt;.bool { color: #000000; font-weight: bold; }&lt;br /&gt;.type { color: #FF6633; }&lt;br /&gt;.flow { color: #FF0000; }&lt;br /&gt;.keyword { color: #990000; }&lt;br /&gt;.operator { color: #663300; font-weight: bold; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;span class="pre"&gt;#include "stdafx.h"&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using namespace&lt;/span&gt; std&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span class="keyword"&gt; main&lt;/span&gt;&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; unsigned&lt;/span&gt; __int64 n&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Collatz Conjecture Calculator v1.0\n"&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Enter an integer greater than 1: "&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; cin&lt;span class="operator"&gt; &amp;gt;&amp;gt;&lt;/span&gt; n&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; n&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; ", "&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; while&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;n&lt;span class="operator"&gt;!=&lt;/span&gt;&lt;span class="int"&gt;1&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt; {&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt; n&lt;span class="operator"&gt; %&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt; )&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   n&lt;span class="operator"&gt; =&lt;/span&gt; n&lt;span class="operator"&gt; /&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  else&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   n&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 3&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; n&lt;span class="operator"&gt; +&lt;/span&gt;&lt;span class="int"&gt; 1&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;  }&lt;/span&gt;&lt;br /&gt;  cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; n&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; ", "&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; return&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6668087545469773590?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6668087545469773590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6668087545469773590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6668087545469773590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6668087545469773590'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/08/collatz-conjecture-calculator.html' title='Collatz Conjecture Calculator'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-8832913068442801859</id><published>2008-07-18T01:54:00.000-07:00</published><updated>2008-07-19T15:30:25.676-07:00</updated><title type='text'>Winzip 7.0 SR-1 Keygen with both algorithms</title><content type='html'>&lt;span class="comment"&gt;&lt;span style="font-weight: bold;"&gt;*Note* The keys generated from the code below has been tested to work up to Winzip 8.1 SR-1 (5266) .  Beyond that, they used another algorithm that I don't have experience in reversing.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;// keygen.cpp : Defines the entry point for the console application.&lt;br /&gt;//&lt;br /&gt;&lt;/span&gt;&lt;span class="pre"&gt;&lt;br /&gt;#include "stdafx.h"&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;iso646.h&amp;gt;&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;#include &amp;lt;string&amp;gt;&lt;br /&gt;#include &amp;lt;vector&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;using namespace&lt;/span&gt; std&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; algorithm&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;char&lt;/span&gt; a&lt;span class="operator"&gt;[&lt;/span&gt;&lt;span class="int"&gt;256&lt;/span&gt;&lt;span class="operator"&gt;],&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; b&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; c&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//Algorithm that generates the serial's FIRST 4 digits&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt; unsigned&lt;/span&gt; __int16 EAX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;unsigned&lt;/span&gt; __int16 ESI&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;unsigned&lt;/span&gt; __int16 ECX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;int&lt;/span&gt; EDX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt; name_length&lt;span class="operator"&gt; =&lt;/span&gt; b&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; ECX&lt;span class="operator"&gt; =&lt;/span&gt; a&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] *&lt;/span&gt;&lt;span class="int"&gt; 256&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; EDX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 8&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; do&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;  ESI&lt;span class="operator"&gt; =&lt;/span&gt; ECX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  ESI&lt;span class="operator"&gt; =&lt;/span&gt; ESI&lt;span class="keyword"&gt; xor&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;ESI&lt;span class="operator"&gt; &amp;lt;=&lt;/span&gt;&lt;span class="int"&gt; 32768&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   EAX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   ECX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; ECX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;   EDX&lt;span class="operator"&gt;--;&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  else&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   EAX&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt; +&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;   EAX&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="keyword"&gt; xor&lt;/span&gt;&lt;span class="int"&gt; 4129&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   ECX&lt;span class="operator"&gt; =&lt;/span&gt; ECX&lt;span class="operator"&gt; *&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;   EDX&lt;span class="operator"&gt;--;&lt;br /&gt;  }&lt;br /&gt; }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt; while&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;EDX&lt;span class="operator"&gt; &amp;gt;&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;EAX&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt; +&lt;/span&gt;&lt;span class="int"&gt; 99&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//Algorithm that generates the serial's LAST four digits&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; EDI&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; EDI&lt;span class="operator"&gt; =&lt;/span&gt; EDI&lt;span class="operator"&gt; + (&lt;/span&gt;a&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] *&lt;/span&gt; i&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//Displays serial generated&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;c&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 1&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt; //cout &amp;lt;&amp;lt; '\n';&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"Algorithm #1 Serial: %.4X" "%.4X"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt;EAX&lt;span class="operator"&gt;,&lt;/span&gt;EDI&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;else if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;c&lt;span class="operator"&gt; ==&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Combines first and last parts of the serial number together&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt;  int&lt;/span&gt; first&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; serial&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; first&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt; *&lt;/span&gt;&lt;span class="int"&gt; 10000&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; serial&lt;span class="operator"&gt; =&lt;/span&gt; first&lt;span class="operator"&gt; +&lt;/span&gt; EDI&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; //Displays the serial number generated&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt;  if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;serial&lt;span class="operator"&gt; &amp;gt;&lt;/span&gt;&lt;span class="int"&gt; 99999999&lt;/span&gt;&lt;span class="operator"&gt;)&lt;/span&gt;&lt;span class="comment"&gt; //if the serial number is greater 8 digits&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt;  {&lt;/span&gt;&lt;br /&gt;  serial&lt;span class="operator"&gt; =&lt;/span&gt; serial&lt;span class="operator"&gt; /&lt;/span&gt;&lt;span class="int"&gt; 10&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt; // then divide it by 10 to make it 8 digits&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="char"&gt; '\n'&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"Algorithm #2 Serial: %u"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; serial&lt;span class="operator"&gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; Name&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;char&lt;/span&gt; name&lt;span class="operator"&gt;[&lt;/span&gt;&lt;span class="int"&gt;256&lt;/span&gt;&lt;span class="operator"&gt;];&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;char&lt;/span&gt; name_lowercase&lt;span class="operator"&gt;[&lt;/span&gt;&lt;span class="int"&gt;256&lt;/span&gt;&lt;span class="operator"&gt;];&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt; name_length&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;//Asks for the name that is to be registered&lt;br /&gt;&lt;/span&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Name: "&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;fflush&lt;span class="operator"&gt;(&lt;/span&gt; stdin&lt;span class="operator"&gt; );&lt;/span&gt;&lt;br /&gt;gets&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;name_length&lt;span class="operator"&gt; =&lt;/span&gt; strlen&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Converts and saves the name to lowercase&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; name_lowercase&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] =&lt;/span&gt; tolower&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;]);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;algorithm&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;,&lt;/span&gt;name_length&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="int"&gt; 1&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;algorithm&lt;span class="operator"&gt;(&lt;/span&gt;name_lowercase&lt;span class="operator"&gt;,&lt;/span&gt;name_length&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt;);&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span class="keyword"&gt; main&lt;/span&gt;&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Winzip 7.0 SR-1 Keygen\nEither serial from algorithm #1 or 2 can be used to register this program.\n"&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;bool&lt;/span&gt; no_quit&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="bool"&gt; true&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;int&lt;/span&gt; a&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Name&lt;span class="operator"&gt;();&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;do&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "\n\nGenerate another one? (yes=1/no=0)\n"&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; cin&lt;span class="operator"&gt; &amp;gt;&amp;gt;&lt;/span&gt; a&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt; if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;a&lt;span class="operator"&gt;==&lt;/span&gt;&lt;span class="int"&gt;1&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;  Name&lt;span class="operator"&gt;();&lt;br /&gt; }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; else&lt;/span&gt; no_quit&lt;span class="operator"&gt;=&lt;/span&gt;&lt;span class="bool"&gt;false&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;while&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;no_quit&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;return&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-8832913068442801859?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/8832913068442801859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=8832913068442801859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8832913068442801859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8832913068442801859'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/winzip-70-sr-1-keygen-with-both.html' title='Winzip 7.0 SR-1 Keygen with both algorithms'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-5077464559999701848</id><published>2008-07-18T01:52:00.000-07:00</published><updated>2008-07-18T01:53:48.197-07:00</updated><title type='text'>Winzip 2nd Algorithm C++ source</title><content type='html'>&lt;span class="comment"&gt;// kg_2.cpp : Defines the entry point for the console application.&lt;br /&gt;&lt;/span&gt;&lt;span class="pre"&gt;&lt;br /&gt;#include "stdafx.h"&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;iso646.h&amp;gt;&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;#include &amp;lt;string&amp;gt;&lt;br /&gt;#include &amp;lt;vector&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;&lt;br /&gt;using namespace&lt;/span&gt; std&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span class="keyword"&gt; main&lt;/span&gt;&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;span class="type"&gt; &lt;br /&gt; char&lt;/span&gt; name&lt;span class="operator"&gt;[&lt;/span&gt;&lt;span class="int"&gt;256&lt;/span&gt;&lt;span class="operator"&gt;];&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Winzip 7.0 SR-1 Keygen v2.0\n"&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Request for name to be registered&lt;br /&gt;&lt;/span&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Name: "&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; gets&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;);&lt;/span&gt;&lt;br /&gt; name_length&lt;span class="operator"&gt; =&lt;/span&gt; strlen&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Converts name into lowercase&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  name&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] =&lt;/span&gt; tolower&lt;span class="operator"&gt;(&lt;/span&gt;name&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;]);&lt;br /&gt; }&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Algorithm that generates the serial's FIRST 4 digits&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt; unsigned&lt;/span&gt; __int16 EAX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; unsigned&lt;/span&gt; __int16 ESI&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; unsigned&lt;/span&gt; __int16 ECX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; int&lt;/span&gt; EDX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  ECX&lt;span class="operator"&gt; =&lt;/span&gt; name&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] *&lt;/span&gt;&lt;span class="int"&gt; 256&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;  EDX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 8&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  do&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   ESI&lt;span class="operator"&gt; =&lt;/span&gt; ECX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;   ESI&lt;span class="operator"&gt; =&lt;/span&gt; ESI&lt;span class="keyword"&gt; xor&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;   if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;ESI&lt;span class="operator"&gt; &amp;lt;=&lt;/span&gt;&lt;span class="int"&gt; 32768&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;   {&lt;/span&gt;&lt;br /&gt;    EAX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    ECX&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; ECX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;    EDX&lt;span class="operator"&gt;--;&lt;br /&gt;   }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;   else&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt;&lt;br /&gt;   {&lt;/span&gt;&lt;br /&gt;    EAX&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt; +&lt;/span&gt; EAX&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;    EAX&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="keyword"&gt; xor&lt;/span&gt;&lt;span class="int"&gt; 4129&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    ECX&lt;span class="operator"&gt; =&lt;/span&gt; ECX&lt;span class="operator"&gt; *&lt;/span&gt;&lt;span class="int"&gt; 2&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;    EDX&lt;span class="operator"&gt;--;&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;  while&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;EDX&lt;span class="operator"&gt; &amp;gt;&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;);&lt;br /&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; EAX&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt; +&lt;/span&gt;&lt;span class="int"&gt; 99&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Algorithm that generates the serial's LAST four digits&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; EDI&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt; name_length&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  EDI&lt;span class="operator"&gt; =&lt;/span&gt; EDI&lt;span class="operator"&gt; + (&lt;/span&gt;name&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] *&lt;/span&gt; i&lt;span class="operator"&gt;);&lt;br /&gt; }&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt; &lt;br /&gt; //Combines first and last parts of the serial number together&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt; first&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; serial&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; first&lt;span class="operator"&gt; =&lt;/span&gt; EAX&lt;span class="operator"&gt; *&lt;/span&gt;&lt;span class="int"&gt; 10000&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; serial&lt;span class="operator"&gt; =&lt;/span&gt; first&lt;span class="operator"&gt; +&lt;/span&gt; EDI&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; //Displays the serial number generated&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;serial&lt;span class="operator"&gt; &amp;gt;&lt;/span&gt;&lt;span class="int"&gt; 99999999&lt;/span&gt;&lt;span class="operator"&gt;)&lt;/span&gt;&lt;span class="comment"&gt; //if the serial number is greater 8 digits&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt; {&lt;/span&gt;&lt;br /&gt;  serial&lt;span class="operator"&gt; =&lt;/span&gt; serial&lt;span class="operator"&gt; /&lt;/span&gt;&lt;span class="int"&gt; 10&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="comment"&gt; // then divide it by 10 to make it 8 digits&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="operator"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; printf&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="string"&gt;"Serial: %u"&lt;/span&gt;&lt;span class="operator"&gt;,&lt;/span&gt; serial&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; return&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-5077464559999701848?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/5077464559999701848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=5077464559999701848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/5077464559999701848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/5077464559999701848'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/winzip-2nd-algorithm-c-source.html' title='Winzip 2nd Algorithm C++ source'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-7054960921023034251</id><published>2008-07-17T15:41:00.000-07:00</published><updated>2008-07-17T15:50:57.589-07:00</updated><title type='text'>Quick Update</title><content type='html'>It seem to me that the second algorithm in Winzip is &lt;span style="font-style: italic;"&gt;almost&lt;/span&gt; the same as the one described in the previous post.   However the differences are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;This algorithm converts all the letters in the name to lowercase before being used to generate the serial number (the serial number for &lt;span style="font-weight: bold;"&gt;TSA&lt;/span&gt; is the same for&lt;span style="font-weight: bold;"&gt; tsa&lt;/span&gt;).&lt;/li&gt;&lt;li&gt;The serial number, so far, consists only of numbers 0-9 (unlike the other one in which hexadecimal 0-9 and A-F was involved).&lt;/li&gt;&lt;/ol&gt;I made minor changes to the keygen but it seems to generate for some names, serial numbers that are greater than 8 digits long.  I will post up the code sooner or later when I have the time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-7054960921023034251?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/7054960921023034251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=7054960921023034251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/7054960921023034251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/7054960921023034251'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/quick-update.html' title='Quick Update'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-8803565224726911535</id><published>2008-07-17T00:58:00.000-07:00</published><updated>2008-07-17T01:10:52.727-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='serial'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='winzip'/><title type='text'>Winzip 7.0 SR-1 (1285) Serial Number Algorithm Analysis</title><content type='html'>Abstract: The purpose is to find, reverse engineer, and code a key generator for the algorithm that checks for the correct serial number that is associated with the entered name.&lt;br /&gt;&lt;br /&gt;1. Materials: Ollydbg v1.10, ASCII lookup table, Visual C++ 2008 Express Edition.&lt;br /&gt;2. Analysis:&lt;br /&gt;If you have read my previous post, “Solution to br0ken’s CrackMe4”, then the first thing you should do for Winzip after loading it in Ollydbg is to run it and input a name and fake serial number in order to see what the error message is in order to search for the text string and reverse from there.&lt;br /&gt;The error message is “&lt;span style="font-style: italic;"&gt;Incomplete or incorrect information&lt;/span&gt;”.  Tracing back from this is not futile because you will come across a line of code in which you will see that there are many calls to that line (which is not helpful).  Unlike CrackMe4 where you can easily trace back, you will have to take a different approach with Winzip.  Since the name and serial number are being entered into a dialog box, it must somehow use a function in order to get what was inputted.  This function is called &lt;span style="font-weight: bold;"&gt;GetDlgItemTextA&lt;/span&gt;.  To set a breakpoint on this function click &lt;span style="font-weight: bold;"&gt;Plugins-&gt; 2 Command line-&gt; Command line&lt;/span&gt; and type in &lt;span style="font-weight: bold;"&gt;bp GetDlgItemTextA&lt;/span&gt; and press enter.  Now you can now run Winzip.  If the program stops at a breakpoint before you have reached the window where you enter your registration information, then just keep on running the program.  Now enter in your fake registration information and press&lt;span style="font-weight: bold;"&gt; OK&lt;/span&gt;.  Olldbg should now break.  Patience and a good observation is required for the next step in which you will be stepping through the code by pressing F8.  Eventually you will see the text string for the error message show up in the EAX register.  If you look up a bit then you should see a call above &lt;span style="font-style: italic;"&gt;PUSH 28E&lt;/span&gt;.  This one is important because it has a “&gt;” next to it, which means it is a jump destination from 3 origins that are close by to each other, which happen to be in the block of code where you see your name and serial number being copied into memory.  Somehow the check for the serial must be located as a call near the three jumps origins.  You will trace into a call that is right before the last jump origin and trace through the code there.&lt;br /&gt;&lt;br /&gt;00408044  |. E8 79160200    CALL WINZIP32.004296C2&lt;br /&gt;00408049  |. 803D 28D94700 &gt;CMP BYTE PTR DS:[47D928],0&lt;br /&gt;00408050  |. 59             POP ECX&lt;br /&gt;00408051  |. 74 5F          JE SHORT WINZIP32.004080B2&lt;br /&gt;00408053  |. 803D 58D94700 &gt;CMP BYTE PTR DS:[47D958],0&lt;br /&gt;0040805A  |. 74 56          JE SHORT WINZIP32.004080B2&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;0040805C  |. E8 EAFAFFFF    CALL WINZIP32.00407B4B&lt;/span&gt;&lt;br /&gt;00408061  |. 85C0           TEST EAX,EAX&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;00408063  |. 74 4D          JE SHORT WINZIP32.004080B2&lt;/span&gt;&lt;br /&gt;00408065  |. 53             PUSH EBX                                 ; /Arg3&lt;br /&gt;00408066  |. BB B80C4700    MOV EBX,WINZIP32.00470CB8                ; |ASCII "WinZip"&lt;br /&gt;0040806B  |. 68 F8EA4600    PUSH WINZIP32.0046EAF8                   ; |Arg2 = 0046EAF8 ASCII "Name"&lt;br /&gt;00408070  |. 53             PUSH EBX                                 ; |Arg1 =&gt; 00470CB8 ASCII "WinZip"&lt;br /&gt;00408071  |. E8 CEA70200    CALL WINZIP32.00432844                   ; \WINZIP32.00432844&lt;br /&gt;00408076  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00408079  |. 56             PUSH ESI                                 ; /Arg3&lt;br /&gt;0040807A  |. 68 9CF44600    PUSH WINZIP32.0046F49C                   ; |Arg2 = 0046F49C ASCII "SN"&lt;br /&gt;0040807F  |. 53             PUSH EBX                                 ; |Arg1&lt;br /&gt;00408080  |. E8 BFA70200    CALL WINZIP32.00432844                   ; \WINZIP32.00432844&lt;br /&gt;00408085  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00408088  |. 68 D80C4700    PUSH WINZIP32.00470CD8                   ; /Arg4 = 00470CD8 ASCII "winzip32.ini"&lt;br /&gt;0040808D  |. 6A 00          PUSH 0                                   ; |Arg3 = 00000000&lt;br /&gt;0040808F  |. 6A 00          PUSH 0                                   ; |Arg2 = 00000000&lt;br /&gt;00408091  |. 68 04EB4600    PUSH WINZIP32.0046EB04                   ; |Arg1 = 0046EB04 ASCII "rrs"&lt;br /&gt;00408096  |. E8 90A70200    CALL WINZIP32.0043282B                   ; \WINZIP32.0043282B&lt;br /&gt;0040809B  |. A1 A0944700    MOV EAX,DWORD PTR DS:[4794A0]&lt;br /&gt;004080A0  |. 83C4 10        ADD ESP,10&lt;br /&gt;004080A3  |. 85C0           TEST EAX,EAX&lt;br /&gt;004080A5  |. 74 07          JE SHORT WINZIP32.004080AE&lt;br /&gt;004080A7  |. 50             PUSH EAX                                 ; /hObject =&gt; D60A0217&lt;br /&gt;004080A8  |. FF15 60804600  CALL DWORD PTR DS:[&lt;&amp;amp;GDI32.DeleteObject&gt;&gt;; \DeleteObject&lt;br /&gt;004080AE  |&gt; 6A 01          PUSH 1&lt;br /&gt;004080B0  |. EB 31          JMP SHORT WINZIP32.004080E3&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;004080B2  |&gt; E8 E5010000    CALL WINZIP32.0040829C&lt;/span&gt;&lt;br /&gt;004080B7  |. 68 8E020000    PUSH 28E&lt;br /&gt;004080BC  |. E8 9B050200    CALL WINZIP32.0042865C&lt;br /&gt;004080C1  |. 59             POP ECX&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;004080C2  |. 50             PUSH EAX                                 ; /Arg3 = 0047F970 ASCII "Incomplete or incorrect information"&lt;/span&gt;&lt;br /&gt;004080C3  |. 57             PUSH EDI                                 ; |Arg2&lt;br /&gt;004080C4  |. 6A 3D          PUSH 3D                                  ; |Arg1 = 0000003D&lt;br /&gt;004080C6  |. E8 1CE70100    CALL WINZIP32.004267E7                   ; \WINZIP32.004267E7&lt;br /&gt;&lt;br /&gt;Eventually you will see your name and serial appear in the stack, now pay attention carefully since the valid serial number will soon appear as well.  When it does, stop, and take note of the call that causes this to happen.  You will have to trace into this call and single step through the code carefully, since it is the serial algorithm. &lt;br /&gt;&lt;br /&gt;00407B4B  /$ 55             PUSH EBP&lt;br /&gt;00407B4C  |. 8BEC           MOV EBP,ESP&lt;br /&gt;00407B4E  |. 81EC 08020000  SUB ESP,208&lt;br /&gt;00407B54  |. 53             PUSH EBX&lt;br /&gt;00407B55  |. 56             PUSH ESI&lt;br /&gt;00407B56  |. 33F6           XOR ESI,ESI&lt;br /&gt;00407B58  |. 803D 28D94700 &gt;CMP BYTE PTR DS:[47D928],0&lt;br /&gt;00407B5F  |. 57             PUSH EDI&lt;br /&gt;00407B60  |. 0F84 A1000000  JE WINZIP32.00407C07&lt;br /&gt;00407B66  |. 8D45 EC        LEA EAX,DWORD PTR SS:[EBP-14]&lt;br /&gt;00407B69  |. 50             PUSH EAX&lt;br /&gt;00407B6A  |. 68 60F44600    PUSH WINZIP32.0046F460                   ; /Arg1 = 0046F460&lt;br /&gt;00407B6F  |. E8 4F9CFFFF    CALL WINZIP32.004017C3                   ; \WINZIP32.004017C3&lt;br /&gt;00407B74  |. 59             POP ECX&lt;br /&gt;00407B75  |. 8D85 F8FDFFFF  LEA EAX,DWORD PTR SS:[EBP-208]&lt;br /&gt;00407B7B  |. 59             POP ECX&lt;br /&gt;00407B7C  |. BF 28D94700    MOV EDI,WINZIP32.0047D928                ;  ASCII "TSA"&lt;br /&gt;00407B81  |. 50             PUSH EAX&lt;br /&gt;00407B82  |. 57             PUSH EDI                                 ; /Arg1 =&gt; 0047D928 ASCII "TSA"&lt;br /&gt;00407B83  |. E8 A9020000    CALL WINZIP32.00407E31                   ; \WINZIP32.00407E31&lt;br /&gt;00407B88  |. 59             POP ECX&lt;br /&gt;00407B89  |. 8D85 F8FDFFFF  LEA EAX,DWORD PTR SS:[EBP-208]&lt;br /&gt;00407B8F  |. 59             POP ECX&lt;br /&gt;00407B90  |. 50             PUSH EAX&lt;br /&gt;00407B91  |. 8D45 EC        LEA EAX,DWORD PTR SS:[EBP-14]&lt;br /&gt;00407B94  |. 50             PUSH EAX&lt;br /&gt;00407B95  |. E8 66FD0400    CALL WINZIP32.00457900&lt;br /&gt;00407B9A  |. 59             POP ECX&lt;br /&gt;00407B9B  |. 59             POP ECX&lt;br /&gt;00407B9C  |. 6A 01          PUSH 1&lt;br /&gt;00407B9E  |. 85C0           TEST EAX,EAX&lt;br /&gt;00407BA0  |. 5B             POP EBX&lt;br /&gt;00407BA1  |. 75 02          JNZ SHORT WINZIP32.00407BA5&lt;br /&gt;00407BA3  |. 8BF3           MOV ESI,EBX&lt;br /&gt;00407BA5  |&gt; 8D45 EC        LEA EAX,DWORD PTR SS:[EBP-14]&lt;br /&gt;00407BA8  |. 50             PUSH EAX&lt;br /&gt;00407BA9  |. 68 70F44600    PUSH WINZIP32.0046F470                   ; /Arg1 = 0046F470&lt;br /&gt;00407BAE  |. E8 109CFFFF    CALL WINZIP32.004017C3                   ; \WINZIP32.004017C3&lt;br /&gt;00407BB3  |. 59             POP ECX&lt;br /&gt;00407BB4  |. 8D45 EC        LEA EAX,DWORD PTR SS:[EBP-14]&lt;br /&gt;00407BB7  |. 59             POP ECX&lt;br /&gt;00407BB8  |. 50             PUSH EAX&lt;br /&gt;00407BB9  |. 57             PUSH EDI                                 ;  WINZIP32.0047D928&lt;br /&gt;00407BBA  |. E8 41FD0400    CALL WINZIP32.00457900&lt;br /&gt;00407BBF  |. 59             POP ECX&lt;br /&gt;00407BC0  |. 85C0           TEST EAX,EAX&lt;br /&gt;00407BC2  |. 59             POP ECX&lt;br /&gt;00407BC3  |. 75 0C          JNZ SHORT WINZIP32.00407BD1&lt;br /&gt;00407BC5  |. FF15 C4814600  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.GetTickCou&gt;; [GetTickCount&lt;br /&gt;00407BCB  |. 84C3           TEST BL,AL&lt;br /&gt;00407BCD  |. 74 02          JE SHORT WINZIP32.00407BD1&lt;br /&gt;00407BCF  |. 8BF3           MOV ESI,EBX&lt;br /&gt;00407BD1  |&gt; 6A 14          PUSH 14&lt;br /&gt;00407BD3  |. 8D45 EC        LEA EAX,DWORD PTR SS:[EBP-14]&lt;br /&gt;00407BD6  |. 6A 00          PUSH 0&lt;br /&gt;00407BD8  |. 50             PUSH EAX&lt;br /&gt;00407BD9  |. E8 72E50400    CALL WINZIP32.00456150&lt;br /&gt;00407BDE  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00407BE1  |. 8D85 F8FDFFFF  LEA EAX,DWORD PTR SS:[EBP-208]&lt;br /&gt;00407BE7  |. 68 C8000000    PUSH 0C8&lt;br /&gt;00407BEC  |. 6A 00          PUSH 0&lt;br /&gt;00407BEE  |. 50             PUSH EAX&lt;br /&gt;00407BEF  |. E8 5CE50400    CALL WINZIP32.00456150&lt;br /&gt;00407BF4  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00407BF7  |. 85F6           TEST ESI,ESI&lt;br /&gt;00407BF9  |. 74 13          JE SHORT WINZIP32.00407C0E&lt;br /&gt;00407BFB  |. E8 9C060000    CALL WINZIP32.0040829C&lt;br /&gt;00407C00  |. 8325 7CB04700 &gt;AND DWORD PTR DS:[47B07C],0&lt;br /&gt;00407C07  |&gt; 33C0           XOR EAX,EAX&lt;br /&gt;00407C09  |. E9 B3000000    JMP WINZIP32.00407CC1&lt;br /&gt;00407C0E  |&gt; 8D85 C0FEFFFF  LEA EAX,DWORD PTR SS:[EBP-140]&lt;br /&gt;00407C14  |. 50             PUSH EAX&lt;br /&gt;00407C15  |. 57             PUSH EDI&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;00407C16  |. E8 AB000000    CALL WINZIP32.00407CC6&lt;/span&gt;&lt;br /&gt;00407C1B  |. 59             POP ECX&lt;br /&gt;00407C1C  |. BE 58D94700    MOV ESI,WINZIP32.0047D958                ;  ASCII "123456789"&lt;br /&gt;00407C21  |. 59             POP ECX&lt;br /&gt;00407C22  |. 8D85 C0FEFFFF  LEA EAX,DWORD PTR SS:[EBP-140]&lt;br /&gt;00407C28  |. 56             PUSH ESI&lt;br /&gt;00407C29  |. 50             PUSH EAX&lt;br /&gt;00407C2A  |. E8 D1FC0400    CALL WINZIP32.00457900&lt;br /&gt;00407C2F  |. F7D8           NEG EAX&lt;br /&gt;00407C31  |. 1BC0           SBB EAX,EAX&lt;br /&gt;00407C33  |. 59             POP ECX&lt;br /&gt;00407C34  |. 40             INC EAX&lt;br /&gt;00407C35  |. 59             POP ECX&lt;br /&gt;00407C36  |. A3 7CB04700    MOV DWORD PTR DS:[47B07C],EAX&lt;br /&gt;00407C3B  |. 75 69          JNZ SHORT WINZIP32.00407CA6&lt;br /&gt;00407C3D  |. 8D85 C0FEFFFF  LEA EAX,DWORD PTR SS:[EBP-140]&lt;br /&gt;00407C43  |. 50             PUSH EAX&lt;br /&gt;00407C44  |. 57             PUSH EDI&lt;br /&gt;00407C45  |. E8 20010000    CALL WINZIP32.00407D6A&lt;br /&gt;00407C4A  |. 59             POP ECX&lt;br /&gt;00407C4B  |. 8D85 C0FEFFFF  LEA EAX,DWORD PTR SS:[EBP-140]&lt;br /&gt;00407C51  |. 59             POP ECX&lt;br /&gt;00407C52  |. 56             PUSH ESI&lt;br /&gt;00407C53  |. 50             PUSH EAX&lt;br /&gt;00407C54  |. E8 A7FC0400    CALL WINZIP32.00457900&lt;br /&gt;00407C59  |. F7D8           NEG EAX&lt;br /&gt;00407C5B  |. 1BC0           SBB EAX,EAX&lt;br /&gt;00407C5D  |. 59             POP ECX&lt;br /&gt;00407C5E  |. 40             INC EAX&lt;br /&gt;00407C5F  |. 59             POP ECX&lt;br /&gt;00407C60  |. A3 7CB04700    MOV DWORD PTR DS:[47B07C],EAX&lt;br /&gt;00407C65  |. 75 3F          JNZ SHORT WINZIP32.00407CA6&lt;br /&gt;00407C67  |. 8D85 C4FEFFFF  LEA EAX,DWORD PTR SS:[EBP-13C]&lt;br /&gt;00407C6D  |. 6A 04          PUSH 4&lt;br /&gt;00407C6F  |. 50             PUSH EAX&lt;br /&gt;00407C70  |. 56             PUSH ESI&lt;br /&gt;00407C71  |. E8 EA040500    CALL WINZIP32.00458160&lt;br /&gt;00407C76  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00407C79  |. 85C0           TEST EAX,EAX&lt;br /&gt;00407C7B  |. 75 22          JNZ SHORT WINZIP32.00407C9F&lt;br /&gt;00407C7D  |. 8D85 C0FEFFFF  LEA EAX,DWORD PTR SS:[EBP-140]&lt;br /&gt;00407C83  |. 6A 04          PUSH 4&lt;br /&gt;00407C85  |. 50             PUSH EAX&lt;br /&gt;00407C86  |. 68 5CD94700    PUSH WINZIP32.0047D95C                   ;  ASCII "56789"&lt;br /&gt;00407C8B  |. E8 D0040500    CALL WINZIP32.00458160&lt;br /&gt;00407C90  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00407C93  |. 85C0           TEST EAX,EAX&lt;br /&gt;00407C95  |. 75 08          JNZ SHORT WINZIP32.00407C9F&lt;br /&gt;00407C97  |. 891D 7CB04700  MOV DWORD PTR DS:[47B07C],EBX&lt;br /&gt;00407C9D  |. EB 07          JMP SHORT WINZIP32.00407CA6&lt;br /&gt;00407C9F  |&gt; 8325 7CB04700 &gt;AND DWORD PTR DS:[47B07C],0&lt;br /&gt;00407CA6  |&gt; 68 2C010000    PUSH 12C&lt;br /&gt;00407CAB  |. 8D85 C0FEFFFF  LEA EAX,DWORD PTR SS:[EBP-140]&lt;br /&gt;00407CB1  |. 6A 00          PUSH 0&lt;br /&gt;00407CB3  |. 50             PUSH EAX&lt;br /&gt;00407CB4  |. E8 97E40400    CALL WINZIP32.00456150&lt;br /&gt;00407CB9  |. A1 7CB04700    MOV EAX,DWORD PTR DS:[47B07C]&lt;br /&gt;00407CBE  |. 83C4 0C        ADD ESP,0C&lt;br /&gt;00407CC1  |&gt; 5F             POP EDI&lt;br /&gt;00407CC2  |. 5E             POP ESI&lt;br /&gt;00407CC3  |. 5B             POP EBX&lt;br /&gt;00407CC4  |. C9             LEAVE&lt;br /&gt;00407CC5  \. C3             RETN&lt;br /&gt;&lt;br /&gt;The call at 00407B4B will check if the name is “&lt;span style="font-weight: bold;"&gt;MuradMeraly&lt;/span&gt;” or “&lt;span style="font-weight: bold;"&gt;bcom&lt;/span&gt;”.  It appears that these names are blacklisted.  If you watch the stack carefully while tracing through this call, you will eventually see your name and fake serial number.  After the call at &lt;span style="font-weight: bold;"&gt;00407CC6&lt;/span&gt;, you will see the real serial number appear in the stack.  Trace into this call because this is where the algorithm is (the important parts are in color).&lt;br /&gt;&lt;br /&gt;00407CC6  /$ 55             PUSH EBP&lt;br /&gt;00407CC7  |. 8BEC           MOV EBP,ESP&lt;br /&gt;00407CC9  |. 51             PUSH ECX&lt;br /&gt;00407CCA  |. 8B4D 08        MOV ECX,DWORD PTR SS:[EBP+8]&lt;br /&gt;00407CCD  |. 8365 FC 00     AND DWORD PTR SS:[EBP-4],0&lt;br /&gt;00407CD1  |. 53             PUSH EBX&lt;br /&gt;00407CD2  |. 56             PUSH ESI&lt;br /&gt;00407CD3  |. 8A11           MOV DL,BYTE PTR DS:[ECX]&lt;br /&gt;00407CD5  |. 57             PUSH EDI&lt;br /&gt;00407CD6  |. 33C0           XOR EAX,EAX&lt;br /&gt;00407CD8  |. 8BF1           MOV ESI,ECX&lt;br /&gt;00407CDA  |. 33FF           XOR EDI,EDI&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CDC  |&gt; 84D2           /TEST DL,DL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CDE  |. 74 13          |JE SHORT WINZIP32.00407CF3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CE0  |. 66:0FB6D2      |MOVZX DX,DL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CE4  |. 8BDF           |MOV EBX,EDI&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CE6  |. 0FAFDA         |IMUL EBX,EDX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CE9  |. 015D FC        |ADD DWORD PTR SS:[EBP-4],EBX&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CEC  |. 8A56 01        |MOV DL,BYTE PTR DS:[ESI+1]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CEF  |. 47             |INC EDI&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CF0  |. 46             |INC ESI&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407CF1  |.^EB E9          \JMP SHORT WINZIP32.00407CDC&lt;/span&gt;&lt;br /&gt;00407CF3  |&gt; C705 ECD34700 &gt;MOV DWORD PTR DS:[47D3EC],1&lt;br /&gt;00407CFD  |. 8BF1           MOV ESI,ECX&lt;br /&gt;00407CFF  |. 8A09           MOV CL,BYTE PTR DS:[ECX]&lt;br /&gt;00407D01  |&gt; 84C9           /TEST CL,CL&lt;br /&gt;00407D03  |. 74 19          |JE SHORT WINZIP32.00407D1E&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D05  |. 66:0FB6C9      |MOVZX CX,CL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D09  |. 68 21100000    |PUSH 1021                               ; /Arg3 = 00001021&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D0E  |. 51             |PUSH ECX                                ; |Arg2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D0F  |. 50             |PUSH EAX                                ; |Arg1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D10  |. E8 2A000000    |CALL WINZIP32.00407D3F                  ; \WINZIP32.00407D3F&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D15  |. 8A4E 01        |MOV CL,BYTE PTR DS:[ESI+1]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D18  |. 83C4 0C        |ADD ESP,0C&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D1B  |. 46             |INC ESI&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D1C  |.^EB E3          \JMP SHORT WINZIP32.00407D01&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D1E  |&gt; 0FB74D FC      MOVZX ECX,WORD PTR SS:[EBP-4]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;00407D22  |. 83C0 63        ADD EAX,63&lt;/span&gt;&lt;br /&gt;00407D25  |. 51             PUSH ECX&lt;br /&gt;00407D26  |. 0FB7C0         MOVZX EAX,AX&lt;br /&gt;00407D29  |. 50             PUSH EAX&lt;br /&gt;00407D2A  |. 68 84F44600    PUSH WINZIP32.0046F484                   ;  ASCII "%04X%04X"&lt;br /&gt;00407D2F  |. FF75 0C        PUSH DWORD PTR SS:[EBP+C]&lt;br /&gt;00407D32  |. E8 69E20400    CALL WINZIP32.00455FA0&lt;br /&gt;00407D37  |. 83C4 10        ADD ESP,10&lt;br /&gt;00407D3A  |. 5F             POP EDI&lt;br /&gt;00407D3B  |. 5E             POP ESI&lt;br /&gt;00407D3C  |. 5B             POP EBX&lt;br /&gt;00407D3D  |. C9             LEAVE&lt;br /&gt;00407D3E  \. C3             RETN&lt;br /&gt;&lt;br /&gt;The first block will generate the last four digits of the serial number, while the last block will generate the first four digits of the serial number.  The serial number is 8 characters long and consist of numbers 0-9 and letters A-F.  The first block was quite simple in figuring out, but I was stumped on the second block for awhile before understanding it.  Anyway, I will be posting the C++ source code of the key generator algorithm as a proof of my understanding.&lt;br /&gt;Here are some names and serial numbers:&lt;br /&gt;“a” = 7CEA0000&lt;br /&gt;“TSA” = 816A00D5&lt;br /&gt;&lt;br /&gt;3. Conclusion: I was able to find, reverse engineer the algorithm, and write a key generator in C++.  Quite interestingly, it seems that the program also can be registered using a different serial number since &lt;span style="font-weight: bold;"&gt;96400309 &lt;/span&gt;can also register the name &lt;span style="font-style: italic;"&gt;TSA&lt;/span&gt;.  I will look further into that for my next reverse engineering related post.&lt;br /&gt;&lt;br /&gt;// Test.cpp : main project file.&lt;br /&gt;&lt;br /&gt;#include "stdafx.h"&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;iso646.h&gt;&lt;br /&gt;#include &lt;iostream&gt;&lt;br /&gt;#include &lt;string&gt;&lt;br /&gt;#include &lt;vector&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;char name[256];&lt;br /&gt;int serial = 0;&lt;br /&gt;int a;&lt;br /&gt;&lt;br /&gt;cout &lt;&lt; "Winzip 7.0 SR-1 Keygen\n";  &lt;br /&gt;&lt;br /&gt;//Requests for name to be registered &lt;br /&gt;cout &lt;&lt; "Name: "; gets(name); &lt;br /&gt;a = strlen(name); &lt;br /&gt;&lt;br /&gt;//Algorithm that generates the serial's FIRST 4 digits &lt;br /&gt;unsigned __int16 EAX = 0; &lt;br /&gt;unsigned __int16 ESI = 0;&lt;br /&gt; unsigned __int16 ECX = 0;  int EDX;&lt;br /&gt;    for(int i = 0; i &lt; a; i++)&lt;br /&gt;    {&lt;br /&gt;        ECX = name[i] * 256;&lt;br /&gt;        EDX = 8;&lt;br /&gt;        do&lt;br /&gt;        {&lt;br /&gt;            ESI = ECX;&lt;br /&gt;            ESI = ESI xor EAX;&lt;br /&gt;            if(ESI &lt;= 32768)&lt;br /&gt;            {&lt;br /&gt;                EAX = 2 * EAX;&lt;br /&gt;                ECX = 2 * ECX;&lt;br /&gt;                EDX--;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                EAX = EAX + EAX;&lt;br /&gt;                EAX = EAX xor 4129;&lt;br /&gt;                ECX = ECX * 2;&lt;br /&gt;                EDX--;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        while(EDX &gt; 0);&lt;br /&gt;    }&lt;br /&gt;EAX = EAX + 99;&lt;br /&gt;&lt;br /&gt;//Algorithm that generates the serial's LAST 4 digits&lt;br /&gt;for(int i = 0; i &lt; a; i++)&lt;br /&gt;{ &lt;br /&gt;serial = serial + (name[i] * i);&lt;br /&gt;} &lt;br /&gt;//Displays serial generated&lt;br /&gt;printf("Serial: %.4X" "%.4X",EAX,serial);&lt;br /&gt; return 0;&lt;br /&gt;}&lt;/vector&gt;&lt;/string&gt;&lt;/iostream&gt;&lt;/iso646.h&gt;&lt;/stdio.h&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-8803565224726911535?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/8803565224726911535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=8803565224726911535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8803565224726911535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8803565224726911535'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/winzip-70-sr-1-1285-serial-number.html' title='Winzip 7.0 SR-1 (1285) Serial Number Algorithm Analysis'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6133235086755843581</id><published>2008-07-08T00:25:00.000-07:00</published><updated>2008-07-08T00:31:48.623-07:00</updated><title type='text'>Winzip 7.0 SR-1 Keygenned FINALLY!</title><content type='html'>&lt;p&gt;After two days I manage to create a keygen for the program.  Serial fishing took less than 5 minutes, but analyzing the serial algorithm and also translating it from x86 assembly to C++ (using Visual Studio 2008 Express Edition) took a while.  I will probably post details and source code later.  Anyway, had I used &lt;strong&gt;unsigned _int16&lt;/strong&gt; instead of just &lt;strong&gt;int&lt;/strong&gt; would have saved me lots of time.  Great learning experience though. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6133235086755843581?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6133235086755843581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6133235086755843581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6133235086755843581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6133235086755843581'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/winzip-70-sr-1-keygenned-finally.html' title='Winzip 7.0 SR-1 Keygenned FINALLY!'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-241551686776039639</id><published>2008-07-02T22:10:00.000-07:00</published><updated>2008-07-02T22:20:22.244-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CrackMe4'/><category scheme='http://www.blogger.com/atom/ns#' term='ollydbg'/><category scheme='http://www.blogger.com/atom/ns#' term='br0ken'/><category scheme='http://www.blogger.com/atom/ns#' term='solution'/><category scheme='http://www.blogger.com/atom/ns#' term='xor'/><title type='text'>Solution to br0ken’s CrackMe4</title><content type='html'>1. Materials: Ollydbg v1.10, ASCII lookup table&lt;br /&gt;2. Analysis:&lt;br /&gt;      Before running the program in Ollydbg, let’s first get a general idea of what we will be&lt;br /&gt;doing. This crackme asks for a password from the user. If it is correct, then there is a&lt;br /&gt;message that will tell us that it is valid. However if it is incorrect, then a different message&lt;br /&gt;saying that it is wrong is shown (some programs I encountered won’t give any feedback).&lt;br /&gt;Our goal would be to find the error or valid message and work backwards from there.&lt;br /&gt;We are asked to write a program that brute forces the password; however I think that a&lt;br /&gt;beginner in reverse engineering could learn a thing or two by analyzing how the program&lt;br /&gt;checks for the correct password.&lt;br /&gt;      Open the program with Ollydbg, right-click and Search for -&gt; All referenced text strings.&lt;br /&gt;You should be able to easily spot out the good and bad message (respectively “That’s right!&lt;br /&gt;Now write a small tut :)” and “Nope. . . try again.”). You can select either of the messages&lt;br /&gt;and right-click and Follow in disassembler. You should see code that looks like this:&lt;br /&gt;&lt;br /&gt;004013C8 |. 8D85 28FFFFFF LEA EAX,DWORD PTR SS:[EBP-D8] ; |||&lt;br /&gt;004013CE |. 890424 MOV DWORD PTR SS:[ESP],EAX ; |||&lt;br /&gt;004013D1 |. E8 8A060000 CALL &lt;jmp.&amp;amp;msvcrt.strlen&gt; ; ||\strlen&lt;br /&gt;004013D6 |. 8985 78FDFFFF MOV DWORD PTR SS:[EBP-288],EAX ; ||&lt;br /&gt;004013DC |. 8D85 28FFFFFF LEA EAX,DWORD PTR SS:[EBP-D8] ; ||&lt;br /&gt;004013E2 |. 890424 MOV DWORD PTR SS:[ESP],EAX ; ||&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;004013E5 |. E8 76060000 CALL &lt;jmp.&amp;amp;msvcrt.strlen&gt; ; |\strlen&lt;/jmp.&amp;amp;msvcrt.strlen&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;004013EA |. 83F8 06 CMP EAX,6 ; |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;004013ED |. 0F85 BE000000 JNZ cm4.004014B1 ; |&lt;/span&gt;&lt;br /&gt;004013F3 |. 0FB685 28FFFFF&gt;MOVZX EAX,BYTE PTR SS:[EBP-D8] ; |&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;004013FA |. 34 34 XOR AL,34 ; |&lt;/span&gt;&lt;br /&gt;004013FC |. 0FBEC0 MOVSX EAX,AL ; |&lt;br /&gt;004013FF |. 8985 74FDFFFF MOV DWORD PTR SS:[EBP-28C],EAX ; |&lt;br /&gt;00401405 |. 0FB685 29FFFFF&gt;MOVZX EAX,BYTE PTR SS:[EBP-D7] ; |&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;0040140C |. 34 78 XOR AL,78 ; |&lt;/span&gt;&lt;br /&gt;0040140E |. 0FBEC0 MOVSX EAX,AL ; |&lt;br /&gt;00401411 |. 8985 70FDFFFF MOV DWORD PTR SS:[EBP-290],EAX ; |&lt;br /&gt;00401417 |. 0FB685 2AFFFFF&gt;MOVZX EAX,BYTE PTR SS:[EBP-D6] ; |&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;0040141E |. 34 12 XOR AL,12 ; |&lt;/span&gt;&lt;br /&gt;00401420 |. 0FBEC0 MOVSX EAX,AL ; |&lt;br /&gt;00401423 |. 8985 6CFDFFFF MOV DWORD PTR SS:[EBP-294],EAX ; |&lt;br /&gt;00401429 |. 0FBE85 2BFFFFF&gt;MOVSX EAX,BYTE PTR SS:[EBP-D5] ; |&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;00401430 |. 35 FE000000 XOR EAX,0FE ; |&lt;/span&gt;&lt;br /&gt;00401435 |. 8985 68FDFFFF MOV DWORD PTR SS:[EBP-298],EAX ; |&lt;br /&gt;0040143B |. 0FBE85 2CFFFFF&gt;MOVSX EAX,BYTE PTR SS:[EBP-D4] ; |&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;00401442 |. 35 DB000000 XOR EAX,0DB ; |&lt;/span&gt;&lt;br /&gt;00401447 |. 8985 64FDFFFF MOV DWORD PTR SS:[EBP-29C],EAX ; |&lt;br /&gt;0040144D |. 0FB685 2DFFFFF&gt;MOVZX EAX,BYTE PTR SS:[EBP-D3] ; |&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;00401454 |. 34 78 XOR AL,78 ; |&lt;/span&gt;&lt;br /&gt;00401456 |. 0FBEC0 MOVSX EAX,AL ; |&lt;br /&gt;00401459 |. 8985 60FDFFFF MOV DWORD PTR SS:[EBP-2A0],EAX ; |&lt;br /&gt;0040145F |. 8B85 60FDFFFF MOV EAX,DWORD PTR SS:[EBP-2A0] ; |&lt;br /&gt;00401465 |. 894424 1C MOV DWORD PTR SS:[ESP+1C],EAX ; |&lt;br /&gt;00401469 |. 8B85 64FDFFFF MOV EAX,DWORD PTR SS:[EBP-29C] ; |&lt;br /&gt;0040146F |. 894424 18 MOV DWORD PTR SS:[ESP+18],EAX ; |&lt;br /&gt;00401473 |. 8B85 68FDFFFF MOV EAX,DWORD PTR SS:[EBP-298] ; |&lt;br /&gt;00401479 |. 894424 14 MOV DWORD PTR SS:[ESP+14],EAX ; |&lt;br /&gt;0040147D |. 8B85 6CFDFFFF MOV EAX,DWORD PTR SS:[EBP-294] ; |&lt;br /&gt;00401483 |. 894424 10 MOV DWORD PTR SS:[ESP+10],EAX ; |&lt;br /&gt;00401487 |. 8B85 70FDFFFF MOV EAX,DWORD PTR SS:[EBP-290] ; |&lt;br /&gt;0040148D |. 894424 0C MOV DWORD PTR SS:[ESP+C],EAX ; |&lt;br /&gt;00401491 |. 8B85 74FDFFFF MOV EAX,DWORD PTR SS:[EBP-28C] ; |&lt;br /&gt;00401497 |. 894424 08 MOV DWORD PTR SS:[ESP+8],EAX ; |&lt;br /&gt;0040149B |. C74424 04 4E32&gt;MOV DWORD PTR SS:[ESP+4],cm4.0040324E ; |ASCII "%X%X%X%X%X%X"&lt;br /&gt;004014A3 |. 8D85 58FEFFFF LEA EAX,DWORD PTR SS:[EBP-1A8] ; |&lt;br /&gt;004014A9 |. 890424 MOV DWORD PTR SS:[ESP],EAX ; |&lt;br /&gt;004014AC |. E8 2F060000 CALL &lt;jmp.&amp;amp;user32.wsprintfa&gt; ; \wsprintfA&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;004014B1 |&gt; 8D85 88FDFFFF LEA EAX,DWORD PTR SS:[EBP-278] ; ||&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;004014B7 |. 8D95 58FEFFFF LEA EDX,DWORD PTR SS:[EBP-1A8] ; ||&lt;/span&gt;&lt;br /&gt;004014BD |. 894424 04 MOV DWORD PTR SS:[ESP+4],EAX ; ||&lt;br /&gt;004014C1 |. 891424 MOV DWORD PTR SS:[ESP],EDX ; ||&lt;br /&gt;004014C4 |. E8 87050000 CALL &lt;jmp.&amp;amp;msvcrt.strcmp&gt; ; |\strcmp&lt;br /&gt;004014C9 |. 85C0 TEST EAX,EAX ; |&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;004014CB |. 75 0E JNZ SHORT cm4.004014DB ; |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;004014CD |. C70424 5C32400&gt;MOV DWORD PTR SS:[ESP],cm4.0040325C ; |ASCII "That's right! Now write a small tut :)"&lt;/span&gt;&lt;br /&gt;004014D4 |. E8 A7050000 CALL &lt;jmp.&amp;amp;msvcrt.printf&gt; ; \printf&lt;br /&gt;004014D9 |. EB 0C JMP SHORT cm4.004014E7&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;004014DB |&gt; C70424 8732400&gt;MOV DWORD PTR SS:[ESP],cm4.00403287 ; |ASCII "Nope... try again."&lt;/span&gt;&lt;br /&gt;004014E2 |. E8 99050000 CALL &lt;jmp.&amp;amp;msvcrt.printf&gt; ; \printf&lt;br /&gt;004014E7 |&gt; E8 D4040000 CALL &lt;jmp.&amp;amp;msvcrt._getch&gt; ; [_getch&lt;br /&gt;004014EC |. B8 00000000 MOV EAX,0&lt;br /&gt;004014F1 |. C9 LEAVE&lt;br /&gt;004014F2 \. C3 RETN&lt;br /&gt;&lt;br /&gt;     The good message is highlighted in green, the bad one in red, code that will give you the&lt;br /&gt;bad message have red font color, and important code are highlighted in yellow.&lt;br /&gt;If you look at the beginning of the code, “strlen” should get your attention because this&lt;br /&gt;will determine the length of your entered password and store it in EAX. The program will&lt;br /&gt;then check whether if the password length is 6 characters or not (second yellow highlighted&lt;br /&gt;code) and will jump if the password length is less or greater than 6. After passing that check,&lt;br /&gt;the program will XOR every character in the entered password with the appropriate hex&lt;br /&gt;values (34, 78, 12, FE, DB, and 78). So if you entered in “123456” then you will get:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Password&lt;/span&gt;| &lt;span style="font-weight: bold;"&gt;Hex values&lt;/span&gt;| &lt;span style="font-weight: bold;"&gt;After XORing&lt;/span&gt;&lt;br /&gt;    1                  &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;34&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;               05&lt;br /&gt;    2&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                   78&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;               4A&lt;br /&gt;    3&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                   12&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;               21&lt;br /&gt;    4 &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                  FE &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;              CA&lt;br /&gt;    5 &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                  DB&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;               EE&lt;br /&gt;    6&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                   78 &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;               4E&lt;br /&gt;&lt;br /&gt;      The last two yellow highlighted code is where you will see the correct hash (don’t know&lt;br /&gt;if that is the correct term to use) in EAX (which is &lt;span style="font-weight: bold;"&gt;4D11628EBE1D&lt;/span&gt;) and entered password&lt;br /&gt;hash in EDX (which is &lt;span style="font-weight: bold;"&gt;054A21CAEE4E&lt;/span&gt; in this case). A comparison is then performed with&lt;br /&gt;“strcmp”. If EDX doesn’t match EAX, then you will be shown the bad message (highlighted in&lt;br /&gt;red). However since now you know the correct hash, you can get the password by XORing it&lt;br /&gt;with the hex values I mentioned above.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hashed password&lt;/span&gt;| &lt;span style="font-weight: bold;"&gt;Hex values&lt;/span&gt;| &lt;span style="font-weight: bold;"&gt;After XORing&lt;/span&gt;&lt;br /&gt;           4D|                       34 &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                  79&lt;br /&gt;           11                        &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;78 &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                   69&lt;br /&gt;           62 &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                       12&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                    70&lt;br /&gt;           8E&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                        FE&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                    70&lt;br /&gt;           BE&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                        DB &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                   65&lt;br /&gt;           1D&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;                        78                    &lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;|&lt;jmp.&amp;amp;msvcrt.strlen&gt;&lt;jmp.&amp;amp;user32.wsprintfa&gt;&lt;jmp.&amp;amp;msvcrt.strcmp&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt.printf&gt;&lt;jmp.&amp;amp;msvcrt._getch&gt;65&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;796970706565&lt;/span&gt; is hex for &lt;span style="font-style: italic;"&gt;yippee&lt;/span&gt;, which is the correct password.&lt;br /&gt;&lt;br /&gt;3. Thoughts: Some programs I have encountered are generally similar with what we have seen in this crackme in which the good and bad serial numbers are compared with each other before a&lt;br /&gt;jump is made if they are not the same. However, some are easy to fish since the valid serial will&lt;br /&gt;appear in memory (unlike in this crackme).&lt;/jmp.&amp;amp;msvcrt._getch&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.printf&gt;&lt;/jmp.&amp;amp;msvcrt.strcmp&gt;&lt;/jmp.&amp;amp;user32.wsprintfa&gt;&lt;/jmp.&amp;amp;msvcrt.strlen&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-241551686776039639?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/241551686776039639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=241551686776039639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/241551686776039639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/241551686776039639'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/solution-to-br0kens-crackme4.html' title='Solution to br0ken’s CrackMe4'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-5295830650712322778</id><published>2008-07-01T22:10:00.000-07:00</published><updated>2008-07-01T22:16:07.877-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ollydbg'/><category scheme='http://www.blogger.com/atom/ns#' term='crackme'/><category scheme='http://www.blogger.com/atom/ns#' term='serial'/><category scheme='http://www.blogger.com/atom/ns#' term='fishing'/><title type='text'>NTS-Crackme3 solution</title><content type='html'>1. Target: NTS-Crackme3&lt;br /&gt;2. Objective: Fish the correct serial number.&lt;br /&gt;3. Materials: Ollydbg 1.10, ASCII lookup table&lt;br /&gt;4. Method:&lt;br /&gt;First, open Crackme3.exe with Ollydbg.  The next step to perform is to search for all referenced text strings.  Why? Because usually the good/bad message will show up (most of the time).  In this case you will see, “Serial is Correct!!!”  Select that line, right click, and follow in disassembler.  Scroll a little bit above and you will see the code that will check whether the inputted serial number is valid or not:    &lt;br /&gt;&lt;br /&gt;004013E7   . 83F8 08        CMP EAX,8&lt;br /&gt;004013EA   . 75 5D          &lt;span style="color:#ff0000;"&gt;JNZ SHORT Crackme3.00401449&lt;/span&gt;&lt;br /&gt;004013EC   . 807C24 09 2D   CMP BYTE PTR SS:[ESP+9],2D&lt;br /&gt;004013F1   . 75 56          &lt;span style="color:#ff0000;"&gt;JNZ SHORT Crackme3.00401449&lt;/span&gt;&lt;br /&gt;004013F3   . 0FBE4C24 04    MOVSX ECX,BYTE PTR SS:[ESP+4]&lt;br /&gt;004013F8   . D1E1           SHL ECX,1&lt;br /&gt;004013FA   . 83F9 64        CMP ECX,64&lt;br /&gt;004013FD   . 75 4A          &lt;span style="color:#ff0000;"&gt;JNZ SHORT Crackme3.00401449&lt;/span&gt;&lt;br /&gt;004013FF   . 8A4424 0B      MOV AL,BYTE PTR SS:[ESP+B]&lt;br /&gt;00401403   . 84C0           TEST AL,AL&lt;br /&gt;00401405   . 74 42          &lt;span style="color:#ff0000;"&gt;JE SHORT Crackme3.00401449&lt;/span&gt;&lt;br /&gt;00401407   . 807C24 08 2B   CMP BYTE PTR SS:[ESP+8],2B&lt;br /&gt;0040140C   . 75 3B          &lt;span style="color:#ff0000;"&gt;JNZ SHORT Crackme3.00401449&lt;/span&gt;&lt;br /&gt;0040140E   . 0FBE5424 05    MOVSX EDX,BYTE PTR SS:[ESP+5]&lt;br /&gt;00401413   . 83C2 0A        ADD EDX,0A&lt;br /&gt;00401416   . 83FA 44        CMP EDX,44&lt;br /&gt;00401419   . 75 2E          JNZ SHORT Crackme3.00401449&lt;br /&gt;0040141B   . 0FBE4424 07    MOVSX EAX,BYTE PTR SS:[ESP+7]&lt;br /&gt;00401420   . 83E8 2E        SUB EAX,2E&lt;br /&gt;00401423   . 75 24          JNZ SHORT Crackme3.00401449&lt;br /&gt;00401425   . 807C24 0A 4D   CMP BYTE PTR SS:[ESP+A],4D&lt;br /&gt;0040142A   . 75 1D          JNZ SHORT Crackme3.00401449&lt;br /&gt;0040142C   . 0FBE4C24 06    MOVSX ECX,BYTE PTR SS:[ESP+6]&lt;br /&gt;00401431   . 83C1 0A        ADD ECX,0A&lt;br /&gt;00401434   . 83F9 33        CMP ECX,33&lt;br /&gt;00401437   . 75 10          JNZ SHORT Crackme3.00401449&lt;br /&gt;00401439   . 6A 00          PUSH 0&lt;br /&gt;0040143B   . 6A 00          PUSH 0&lt;br /&gt;0040143D   . 68 20304000    PUSH Crackme3.00403020  ;  ASCII "Serial is Correct!!!"&lt;br /&gt;00401442   . 8BCE           MOV ECX,ESI&lt;br /&gt;00401444   . E8 0D020000    CALL &lt;jmp 4224=""&gt;&lt;br /&gt;00401449   &gt; 5E             POP ESI&lt;br /&gt;0040144A   . 83C4 10        ADD ESP,10&lt;br /&gt;0040144D   . C3             RETN&lt;br /&gt;&lt;br /&gt;&lt;/jmp&gt;&lt;p&gt;&lt;jmp 4224=""&gt; The first line will check if the serial is 8 characters long.  If it is under or over 8 then it will take you to that destination (highlighted in red) of the jump (red text).  Now set a breakpoint at the instruction at 004013EC and press F9 to run the program.  Type in 12345678 and press “Check”.  It will break immediately.  The instruction, “CMP BYTE PTR SS:[ESP+9],2D”, will compare the 6th digit (in this case “6”(36 in hex)) with the hex 2D (which is a “-“ if you look it up in your ASCII table) .  Since what you typed in is incorrect you be taken to the bad destination.  &lt;/p&gt;&lt;p&gt;&lt;jmp 4224=""&gt;Now type in 12345-78 and press “Check”.  You will break but if you step over the code (pressing F8), you will see that you will not jump bad destination yet.  The next 3 lines of code checks if the 1st digit is equal to 2.  1 is 31 in hex.  The instruction, “SHL ECX,1”, will just multiply that number by 2.  By working backwards you can figure out that 64 / 2 = 32 (which is hex for 2).  The next 2 lines of code will not do anything of the last character in the serial number, so you can put any character or digit there.  The next check will see if the 5th digit is a “+” (2B in hex) or not.  The code after that checks the 2nd digit. By subtracting A from 44 you get 3A in hex (“:” ASCII).  The next check will involve the 4th digit by subtracting 2E from it to get 0.  This means that the character at the position must be 2E in hex to pass.  2E is hex for “.”  Moving on, the next check will compare the 7th digit to “M”.  Finally, the last code checks the 3rd digit.  To get the correct digit, subtract A from 33 to get 29 in hex.  29 is equal to “)” in ASCII.  &lt;/p&gt;&lt;p&gt;&lt;jmp 4224=""&gt;Putting it all together, the valid serial number is: 2:).+-MX (where X can be any number or character)   &lt;br /&gt;&lt;/p&gt;&lt;jmp 4224=""&gt;&lt;br /&gt;&lt;br /&gt;&lt;/jmp&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-5295830650712322778?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/5295830650712322778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=5295830650712322778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/5295830650712322778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/5295830650712322778'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/07/nts-crackme3-solution.html' title='NTS-Crackme3 solution'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-3684671072643670273</id><published>2008-06-11T01:52:00.000-07:00</published><updated>2008-06-11T02:00:12.482-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wars'/><category scheme='http://www.blogger.com/atom/ns#' term='Dope'/><category scheme='http://www.blogger.com/atom/ns#' term='bored'/><category scheme='http://www.blogger.com/atom/ns#' term='PC-Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='JNZ'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><title type='text'>When all else fails try patching. . .</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/SE-TnsnInSI/AAAAAAAAACE/oBPfGA7g8Eo/s1600-h/Untitled-2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_NpFAQJ7VFOY/SE-TnsnInSI/AAAAAAAAACE/oBPfGA7g8Eo/s400/Untitled-2.jpg" alt="" id="BLOGGER_PHOTO_ID_5210545604090436898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have been trying to serial fish Dope Wars 2.2  (yes I know a piece of shit software that installs GAIN spyware onto your computer but good thing I installed it within VMware) because I am &lt;span style="font-weight: bold;"&gt;bored &lt;/span&gt;but I cannot seem to find where the correct serial appears in memory, so instead of wasting my time searching I just NOPped a single instruction to get the desired effect.   It still amazes me that  all that separates one from having a registered software is a single jump instruction.  BTW this program is pack with PC-Guard, which is not a big deal unpacking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-3684671072643670273?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/3684671072643670273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=3684671072643670273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/3684671072643670273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/3684671072643670273'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/06/when-all-else-fails-try-patching.html' title='When all else fails try patching. . .'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_NpFAQJ7VFOY/SE-TnsnInSI/AAAAAAAAACE/oBPfGA7g8Eo/s72-c/Untitled-2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-5259943644448844929</id><published>2008-06-02T02:07:00.000-07:00</published><updated>2008-06-02T02:49:22.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Install'/><category scheme='http://www.blogger.com/atom/ns#' term='Bypass'/><category scheme='http://www.blogger.com/atom/ns#' term='Advantage'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Genuine'/><category scheme='http://www.blogger.com/atom/ns#' term='11'/><category scheme='http://www.blogger.com/atom/ns#' term='Player'/><category scheme='http://www.blogger.com/atom/ns#' term='Media'/><title type='text'>Bypass Windows Genuine Advantage validation when installing WMP11</title><content type='html'>I wanted to upgrade the Windows media player on a new computer with a fresh install of Windows XP.  Unfortunately, I got a message thanks to Windows Genuine Advantage which prevented me from completing the install.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_NpFAQJ7VFOY/SEO5HZZYTjI/AAAAAAAAABM/OyC7t2BecCc/s1600-h/03.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 405px; height: 330px;" src="http://bp2.blogger.com/_NpFAQJ7VFOY/SEO5HZZYTjI/AAAAAAAAABM/OyC7t2BecCc/s400/03.jpg" alt="" id="BLOGGER_PHOTO_ID_5207209130897985074" border="0" /&gt;&lt;/a&gt;Well duh!  Tell me something that I don't know.  I was going to give up at first but then I thought about using Ollydbg to see if I can bypass this.  The installation file can be extracted with WinRAR or you can search the temp directory for it (be sure that you see the message to validate it and copy the folder; if you close it then the temp file will be deleted).  Anyway, Windows Media Player version 11.0.5721.5145 is the target of this post.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/SEPCBJ-CNvI/AAAAAAAAAB0/8SSwdTYqfQU/s1600-h/00.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_NpFAQJ7VFOY/SEPCBJ-CNvI/AAAAAAAAAB0/8SSwdTYqfQU/s400/00.jpg" alt="" id="BLOGGER_PHOTO_ID_5207218919282194162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/SEO7TEeyX6I/AAAAAAAAABc/rA3nxdutV3A/s1600-h/01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 286px; height: 403px;" src="http://bp3.blogger.com/_NpFAQJ7VFOY/SEO7TEeyX6I/AAAAAAAAABc/rA3nxdutV3A/s400/01.jpg" alt="" id="BLOGGER_PHOTO_ID_5207211530465206178" border="0" /&gt;&lt;/a&gt;Open the &lt;span style="font-weight: bold;"&gt;setup_wm.exe&lt;/span&gt; file in Ollydbg and search for the string "&lt;span style="font-style: italic;"&gt;LegitCheck&lt;/span&gt;".  You should be seeing this:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/SEPBr8EjEHI/AAAAAAAAABs/ogky12B-bFE/s1600-h/02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_NpFAQJ7VFOY/SEPBr8EjEHI/AAAAAAAAABs/ogky12B-bFE/s400/02.jpg" alt="" id="BLOGGER_PHOTO_ID_5207218554774163570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 51);"&gt;01033190  |. 68 CC200001    PUSH setup_wm.010020CC                   ;  ASCII "LegitCheck"&lt;/span&gt;&lt;br /&gt;01033195  |. 53             PUSH EBX&lt;br /&gt;01033196  |. FFD6           CALL ESI&lt;br /&gt;01033198  |. 3BC7           CMP EAX,EDI&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0103319A  |. 74 35          JE SHORT setup_wm.010331D1 ; &lt;span style="color: rgb(153, 153, 153);"&gt;Will give error message&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;0103319C  |. FFD0           CALL EAX&lt;br /&gt;0103319E  |. 8BF0           MOV ESI,EAX&lt;br /&gt;010331A0  |. 3BF7           CMP ESI,EDI&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;010331A2  |. 74 23          JE SHORT setup_wm.010331C7; &lt;span style="color: rgb(102, 102, 102);"&gt;If equal then the installation will proceed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;010331A4  |. 83FE 06        CMP ESI,6&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;010331A7  |. 74 1E          JE SHORT setup_wm.010331C7; &lt;span style="color: rgb(102, 102, 102);"&gt;&lt;same&gt;&lt;/same&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;010331A9  |. 56             PUSH ESI&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331AA  |. 68 A4200001    PUSH setup_wm.010020A4                   ;  ASCII "WGA check failed with error code %d.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331AF  |. 6A 02          PUSH 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331B1  |. E8 85B10200    CALL setup_wm.0105E33B&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331B6  |. 83C4 0C        ADD ESP,0C&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331B9  |. 893D 2C140801  MOV DWORD PTR DS:[108142C],EDI&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331BF  |. 8935 C8130801  MOV DWORD PTR DS:[10813C8],ESI&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 255);"&gt;010331C5  |. EB 0A          JMP SHORT setup_wm.010331D1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;010331C7  |&gt; C705 2C140801 &gt;MOV DWORD PTR DS:[108142C],1&lt;/span&gt;&lt;br /&gt;010331D1  |&gt; 53             PUSH EBX                                 ; /hLibModule&lt;br /&gt;010331D2  |. FF15 50120001  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.FreeLibrar&gt;; \FreeLibrary&lt;br /&gt;010331D8  |. 5E             POP ESI&lt;br /&gt;010331D9  |. EB 0A          JMP SHORT setup_wm.010331E5&lt;br /&gt;010331DB  |&gt; C705 2C140801 &gt;MOV DWORD PTR DS:[108142C],1&lt;br /&gt;010331E5  |&gt; 68 88200001    PUSH setup_wm.01002088                   ; /Arg2 = 01002088 ASCII "  Validation completed.&lt;br /&gt;"&lt;br /&gt;010331EA  |. 6A 04          PUSH 4                                   ; |Arg1 = 00000004&lt;br /&gt;010331EC  |. E8 10B10200    CALL setup_wm.0105E301                   ; \setup_wm.0105E301&lt;br /&gt;010331F1  |. 57             PUSH EDI                                 ; /lParam&lt;br /&gt;010331F2  |. 68 90990000    PUSH 9990                                ; |wParam = 9990&lt;br /&gt;010331F7  |. 68 11010000    PUSH 111                                 ; |Message = WM_COMMAND&lt;br /&gt;010331FC  |. FF75 08        PUSH DWORD PTR SS:[EBP+8]                ; |hWnd&lt;br /&gt;010331FF  |. FF15 B8130001  CALL DWORD PTR DS:[&lt;&amp;amp;USER32.SendMessageW&gt;; \SendMessageW&lt;br /&gt;01033205  |. FF15 18160001  CALL DWORD PTR DS:[&lt;&amp;amp;ole32.CoUninitializ&gt;;  ole32.CoUninitialize&lt;br /&gt;0103320B  |. 5F             POP EDI&lt;br /&gt;0103320C  |. 33C0           XOR EAX,EAX&lt;br /&gt;0103320E  |. 5B             POP EBX&lt;br /&gt;0103320F  |. 5D             POP EBP&lt;br /&gt;01033210  \. C2 0400        RETN 4&lt;br /&gt;&lt;br /&gt;The code in orange is where searching for "LegitCheck" should take you to.  The 3 JEs in red are the crucial ones that need to be patched in order to get WMP11 to install on any Windows XP (legitimate or pirated).  The code in lavender is the one that will stop the installation, while the one in light blue is where you get to proceed.  Anyway &lt;span style="color: rgb(255, 0, 0);"&gt;JE SHORT setup_wm.010331D1 &lt;span style="color: rgb(0, 0, 0);"&gt;can be left &lt;span style="font-weight: bold;"&gt;normal&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;NOPped&lt;/span&gt; since my machine does not cause it to jump.  The first &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;JE SHORT setup_wm.010331C7 &lt;span style="color: rgb(0, 0, 0);"&gt;can be changed to&lt;/span&gt; &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;JMP&lt;/span&gt; SHORT setup_wm.010331C7 &lt;span style="color: rgb(0, 0, 0);"&gt;so that it will always jump to the good portion of the code.  You can patch the second one also but I don't think it is necessary.  So far so much for the "Genuine Advantage".  I was expecting something a bit more challenging.  I have seen the cracks that bypass this check in which a &lt;span style="font-weight: bold;"&gt;LegitLibM.dll&lt;/span&gt; file is cracked in order to achieve the same result   however, I don't see any reason why the DLL file has to be cracked if the setup_wm.exe file can be simply patched.  It has been a great learning experience cracking this simple file and it never ceases to amaze me that for some programs all it takes is simply patching a single line of code to get it cracked.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-5259943644448844929?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/5259943644448844929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=5259943644448844929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/5259943644448844929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/5259943644448844929'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/06/bypass-windows-genuine-advantage.html' title='Bypass Windows Genuine Advantage validation when installing WMP11'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_NpFAQJ7VFOY/SEO5HZZYTjI/AAAAAAAAABM/OyC7t2BecCc/s72-c/03.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-2145644717837490674</id><published>2008-04-28T12:44:00.001-07:00</published><updated>2008-04-28T12:46:48.147-07:00</updated><title type='text'>Analysis of CVS's online job application personality test - Part 2</title><content type='html'>&lt;p class="MsoNormal"&gt;From Part 1, if one looks closely and analyzes the questions asks then a correlation can be observed among some of the questions.&lt;span style=""&gt;  &lt;/span&gt;I know my method for this is informal but I went through and read each and every single question, and grouped them according to the subjects I thought they were pertaining to (I know the formatting sucks despite typing it up in Word and copying and pasting to post but please bear with me).&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;Interacting with People&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;Listening&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;22. People who talk all the time are annoying&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;27. You love to listen to people talk about themselves&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;Gullibility&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;28. Many people cannot be trusted&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;56. You don't believe a lot of what people say&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;Image&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;09. You don't worry about making a good impression&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;29. You do some things that upset people&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;38. You don't care if you offend people&lt;span style=""&gt;        &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;40. You always try not to hurt people's feelings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;64. You don't care what people think of you&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;71. You are careful not to offend people&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;85. You do what you want, no matter what others think&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;99. People's feelings are sometimes hurt by what you say&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;“When they start push your buttons”&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;14. There are some people you really can't stand&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;15. People do a lot of things that make you angry&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;46. People do a lot of annoying things&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 1in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;55. You ignore people you don't like&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 1in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;61. You ignore people's small mistakes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 1in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;20. When people make mistakes, you correct them&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;50. You can wait patiently for a long time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;77. Slow people make you impatient&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;80. People are often mean to you&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;96. You could not deal with difficult people all day&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;Personal Characteristics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;Introversion/Extraversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;01. You love to be with people&lt;b style=""&gt;&lt;span style=""&gt;                       &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;08. You like to talk a lot&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;16. You like to be in the middle of a big crowd&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;32. It's fun to go out to events with big crowds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;41. You are a fairly private person&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;51. You are unsure of what to say when you meet someone&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;69. You are unsure of yourself with new people&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;73. You like to be alone&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;75. You chat with people you don't know&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;78. You would rather work on a team than by yourself&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;81. You do not like small talk&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;91. You do not like to meet new people&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;Aggressiveness/Submissiveness&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;11. You say whatever is on your mind&lt;b style=""&gt;&lt;span style=""&gt;                       &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;19. You agree with people more than you argue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;34. You'd rather not compete very much&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;70. You give direct criticism when you need to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;89. You criticize people when they deserve it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.5in; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;Organization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;02. You like to plan things before you start to do them&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;44. You have to give up on some things that you start&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;33. Your stuff is often kind of messy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;65. When you go someplace, you are never late&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;72. You could describe yourself as 'tidy'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;“Pushing your buttons”&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;12. You get angry more often than nervous&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;pre style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;18. It bothers you a long time when someone is unfair to you&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;21. You swear when you argue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;42. When you are annoyed with something, you say so&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;45. You avoid arguments as much as possible&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;59. You don't act polite when you don't want to&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;60. You show it when you are in a bad mood&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;74. When someone treats you badly, you ignore it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;92. You are not afraid to tell someone off&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;Empathy&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;10. You would rather not get involved in other people's problems&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;39. You are not interested in your friends' problems&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;49. You know when someone is in a bad mood, even if they don't show it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;63. When your friends need help, they call you first&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;76. Other people's feelings are their own business&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;79. It is easy for you to feel what others are feeling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;93. You try to sense what others are thinking and feeling&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;Decision making&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;04. You think of yourself as being very sensible&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;48. You hate to give up if you can't solve a hard problem&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;                        &lt;/span&gt;68. You make more sensible choices than careless one&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;98. You rarely act without thinking&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.5in; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;Work Ethic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;03. You are proud of the work you do at school or on a job&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;05. You are more relaxed than strict about finishing things on time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;07. When you need to, you take it easy at work&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 1.25in; text-indent: -0.25in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;17. Right now, you care more about having fun than being serious at school or work&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;26. You work best at a slow but steady speed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;31. You were absent very few days from high school&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;37. You have always had good behavior in school or work&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;52. You like to take frequent breaks when working on something difficult&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;53. You finish your work no matter what&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;58. You got mostly good grades in high school&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;86. It is hard to really care about work when the job is boring&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;88. When you are done with your work, you look for more to do&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;90. You sometimes thought seriously about quitting high school&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;94. You don't work too hard because it doesn't pay off anyway&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;95. You do things carefully so you don't make mistakes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.5in; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;Emotional Stability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;06. You change from feeling happy to sad without any reason&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;62. Your moods are steady from day to day&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;Remorse&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;25. You have no big worries&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;30. You have no big regrets about your past&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;54. You look back and feel bad about things you've done&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.5in; line-height: normal;"&gt;&lt;b style=""&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;Misc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;24. It bothers you when you have to obey a lot of rules&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;97. You do not like to take orders&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;87. You have friends, but don't like them to be too close&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;23. There's no use having close friends; they always let you down&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;13. You have confidence in yourself&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;36. You do not fake being polite&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;57. You keep calm when under stress&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;67. You are always cheerful&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;84. You are a friendly person&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;100. You are somewhat of a thrill-seeker&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;83. Any trouble you have is your own fault&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;66. You get mad at yourself when you make mistakes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;82. You've done your share of troublemaking&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: 0.5in; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;"  &gt;43. Your friends and family approve of the things you do&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style="line-height: 115%;font-family:&amp;quot;;font-size:12;"  &gt;                        47. It is maddening when the court lets guilty criminals go free&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-2145644717837490674?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/2145644717837490674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=2145644717837490674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/2145644717837490674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/2145644717837490674'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/04/from-part-1-if-one-looks-closely-and.html' title='Analysis of CVS&apos;s online job application personality test - Part 2'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-2022863768540858433</id><published>2008-04-28T12:28:00.001-07:00</published><updated>2008-04-28T12:34:25.187-07:00</updated><title type='text'>Analysis of CVS's online job application personality test - Part 1</title><content type='html'>Corporations are souless and evil.  I had to take a "personality test" when applying for the pharm tech position at CVS.  The test ask 100 questions to determine whether you are a liar or not. Seriously!  Some questions are asked two or three different ways in order to see if you are&lt;br /&gt;inconsistent.  Below are the questions in the order I got them:&lt;br /&gt;&lt;br /&gt;01. You love to be with people&lt;br /&gt;02. You like to plan things before you start to do them&lt;br /&gt;03. You are proud of the work you do at school or on a job&lt;br /&gt;04. You think of yourself as being very sensible&lt;br /&gt;05. You are more relaxed than strict about finishing things on time&lt;br /&gt;06. You change from feeling happy to sad without any reason&lt;br /&gt;07. When you need to, you take it easy at work&lt;br /&gt;08. You like to talk a lot&lt;br /&gt;09. You don't worry about making a good impression&lt;br /&gt;10. You would rather not get involved in other people's problems&lt;br /&gt;11. You say whatever is on your mind&lt;br /&gt;12. You get angry more often than nervous&lt;br /&gt;13. You have confidence in yourself&lt;br /&gt;14. There are some people you really can't stand&lt;br /&gt;15. People do a lot of things that make you angry&lt;br /&gt;16. You like to be in the middle of a big crowd&lt;br /&gt;17. Right now, you care more about having fun than being serious at school or work&lt;br /&gt;18. It bothers you a long time when someone is unfair to you&lt;br /&gt;19. You agree with people more than you argue&lt;br /&gt;20. When people make mistakes, you correct them&lt;br /&gt;21. You swear when you argue&lt;br /&gt;22. People who talk all the time are annoying&lt;br /&gt;23. There's no use having close friends; they always let you down&lt;br /&gt;24. It bothers you when you have to obey a lot of rules&lt;br /&gt;25. You have no big worries&lt;br /&gt;26. You work best at a slow but steady speed&lt;br /&gt;27. You love to listen to people talk about themselves&lt;br /&gt;28. Many people cannot be trusted&lt;br /&gt;29. You do some things that upset people&lt;br /&gt;30. You have no big regrets about your past&lt;br /&gt;31. You were absent very few days from high school&lt;br /&gt;32. It's fun to go out to events with big crowds&lt;br /&gt;33. Your stuff is often kind of messy&lt;br /&gt;34. You'd rather not compete very much&lt;br /&gt;36. You do not fake being polite&lt;br /&gt;37. You have always had good behavior in school or work&lt;br /&gt;38. You don't care if you offend people&lt;br /&gt;39. You are not interested in your friends' problems&lt;br /&gt;40. You always try not to hurt people's feelings&lt;br /&gt;41. You are a fairly private person&lt;br /&gt;42. When you are annoyed with something, you say so&lt;br /&gt;43. Your friends and family approve of the things you do&lt;br /&gt;44. You have to give up on some things that you start&lt;br /&gt;45. You avoid arguments as much as possible&lt;br /&gt;46. People do a lot of annoying things&lt;br /&gt;47. It is maddening when the court lets guilty criminals go free&lt;br /&gt;48. You hate to give up if you can't solve a hard problem&lt;br /&gt;49. You know when someone is in a bad mood, even if they don't show it&lt;br /&gt;50. You can wait patiently for a long time&lt;br /&gt;51. You are unsure of what to say when you meet someone&lt;br /&gt;52. You like to take frequent breaks when working on something difficult&lt;br /&gt;53. You finish your work no matter what&lt;br /&gt;54. You look back and feel bad about things you've done&lt;br /&gt;55. You ignore people you don't like&lt;br /&gt;56. You don't believe a lot of what people say&lt;br /&gt;57. You keep calm when under stress&lt;br /&gt;58. You got mostly good grades in high school&lt;br /&gt;59. You don't act polite when you don't want to&lt;br /&gt;60. You show it when you are in a bad mood&lt;br /&gt;61. You ignore people's small mistakes&lt;br /&gt;62. Your moods are steady from day to day&lt;br /&gt;63. When your friends need help, they call you first&lt;br /&gt;64. You don't care what people think of you&lt;br /&gt;65. When you go someplace, you are never late&lt;br /&gt;66. You get mad at yourself when you make mistakes&lt;br /&gt;67. You are always cheerful&lt;br /&gt;68. You make more sensible choices than careless ones&lt;br /&gt;69. You are unsure of yourself with new people&lt;br /&gt;70. You give direct criticism when you need to&lt;br /&gt;71. You are careful not to offend people&lt;br /&gt;72. You could describe yourself as 'tidy'&lt;br /&gt;73. You like to be alone&lt;br /&gt;74. When someone treats you badly, you ignore it&lt;br /&gt;75. You chat with people you don't know&lt;br /&gt;76. Other people's feelings are their own business&lt;br /&gt;77. Slow people make you impatient&lt;br /&gt;78. You would rather work on a team than by yourself&lt;br /&gt;79. It is easy for you to feel what others are feeling&lt;br /&gt;80. People are often mean to you&lt;br /&gt;81. You do not like small talk&lt;br /&gt;82. You've done your share of troublemaking&lt;br /&gt;83. Any trouble you have is your own fault&lt;br /&gt;84. You are a friendly person&lt;br /&gt;85. You do what you want, no matter what others think&lt;br /&gt;86. It is hard to really care about work when the job is boring&lt;br /&gt;87. You have friends, but don't like them to be too close&lt;br /&gt;88. When you are done with your work, you look for more to do&lt;br /&gt;89. You criticize people when they deserve it&lt;br /&gt;90. You sometimes thought seriously about quitting high school&lt;br /&gt;91. You do not like to meet new people&lt;br /&gt;92. You are not afraid to tell someone off&lt;br /&gt;93. You try to sense what others are thinking and feeling&lt;br /&gt;94. You don't work too hard because it doesn't pay off anyway&lt;br /&gt;95. You do things carefully so you don't make mistakes&lt;br /&gt;96. You could not deal with difficult people all day&lt;br /&gt;97. You do not like to take orders&lt;br /&gt;98. You rarely act without thinking&lt;br /&gt;99. People's feelings are sometimes hurt by what you say&lt;br /&gt;100. You are somewhat of a thrill-seeker&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-2022863768540858433?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/2022863768540858433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=2022863768540858433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/2022863768540858433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/2022863768540858433'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/04/analysis-of-cvss-online-job-application.html' title='Analysis of CVS&apos;s online job application personality test - Part 1'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6106342478990053793</id><published>2008-03-31T21:31:00.000-07:00</published><updated>2008-06-02T01:29:14.355-07:00</updated><title type='text'>Learning C++</title><content type='html'>Today was my first day of class for cs.  I am finally going to learn how to program in C++. &lt;br /&gt;The professor was straightforward and stated that the class is probably going to be the&lt;br /&gt;one of the hardest ones.  I am glad I had some informal experience programming in&lt;br /&gt;TI-BASIC and understanding Intel x86 assembly language before coming into this class. &lt;br /&gt;Well I hope to do some C++ programming in lab tomorrow.&lt;br /&gt;&lt;br /&gt;Anyway, today I prepared some Vietnamese coffee using &lt;strong&gt;Trung&lt;br /&gt;Nguyen&lt;/strong&gt; brand instead of the usual &lt;strong&gt;Cafe Du Monde&lt;/strong&gt;.  It was awesome! &lt;br /&gt;The aroma was a unique one.  I don't know how to put it but it was a&lt;br /&gt;pleasant one and not strong (I think the smell had hints of vanilla or&lt;br /&gt;hazelnut even though the ingredients did not list them).  It was not bitter&lt;br /&gt;but I should have used a coffee filter in my strainer because it was finely&lt;br /&gt;ground up.  I would probably by from this again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6106342478990053793?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6106342478990053793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6106342478990053793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6106342478990053793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6106342478990053793'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/03/learning-c.html' title='Learning C++'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-1197160393143113846</id><published>2008-02-26T01:11:00.000-08:00</published><updated>2008-02-26T01:31:51.148-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Audio'/><category scheme='http://www.blogger.com/atom/ns#' term='Acker'/><category scheme='http://www.blogger.com/atom/ns#' term='practice'/><category scheme='http://www.blogger.com/atom/ns#' term='Ripper'/><category scheme='http://www.blogger.com/atom/ns#' term='DVD'/><title type='text'>Still learning to crack software. . .</title><content type='html'>I was feeling a bit bored today so I decided to crack another program for practice.  Browsing through Neowin, I found the perfect target: &lt;strong&gt;Acker DVD Audio Ripper 2.0.72&lt;/strong&gt;.  Anyway, I checked it through PEiD and Exeinfo and both said that it was unpacked (MS Visual C++ 6.0) so I thought it would be straight forward.  Unfortunately I was wrong.  I guess the code was packed because I did not see the OEP in Ollydbg.  I just press F8 a couple of times until I stumbled upon the OEP by accident.  I was like "Oh Shit!" because it happen all to quick.  I went over the code before the OEP and I recall seeing 'SYSENTER' but I still don't understand what is going on.  I tried dumping the progam at the OEP, but a message would come up pertaining to DEP protecting me from bad programs.  While stepping through the code, I saw "Blowfish" near the area where I think the serial key is checked.  I then decided to stop looking for the algorithm because the encryption is out of my league.  Instead I decided to patch the program so that it would accept any serial number (whether valid or invalid).  I was partially successful because it did change the behavior of the program (before entering the serial, I had a nag screen telling me that it was a trial when I press "Convert"; "Unregistered" was removed) but the effects were temporary.  Closing the program and opening it up again would &lt;br /&gt;take it back to being unregistered.  I assume the program stores the serial number and checks if&lt;br /&gt;it is valid or not when opening the program.  Right now I cannot find that check unless there is something wrong with my assumption.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-1197160393143113846?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/1197160393143113846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=1197160393143113846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/1197160393143113846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/1197160393143113846'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/02/still-learning-to-crack-software.html' title='Still learning to crack software. . .'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-2072679626533611168</id><published>2008-02-25T02:35:00.000-08:00</published><updated>2008-02-26T01:10:26.064-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apple Itunes IsDebuggerPresent API SoftICE detect'/><title type='text'>Getting Itunes to run in Ollydbg</title><content type='html'>Target: Apple Itunes 7.6.1.9&lt;br /&gt;Tools: Ollydbg, PEiD v0.94, Exeinfo PE v0.0.1.8, and brain :p&lt;br /&gt;&lt;br /&gt;PEiD reports that the Itunes executable is not packed, while Exeinfo confirms that with the feedback of "MS Visual C++ v8.0/Visual Studio 2005".  This just makes my job easier because I do not know how to unpack a file yet.  Anyway, if one searches the APIs then they will find that there are 3 calls made to "IsDebuggerPresent" in Itunes.  This means that Apple does not want others to reverse engineer Itunes using a debugger.  If a debugger is detected then the program will close (those preventing further debugging).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/R8KdSkaBBvI/AAAAAAAAAA8/f6msG2A0Ync/s1600-h/Isdebuggerpresentapi.jpg"&gt;&lt;img src="http://bp3.blogger.com/_NpFAQJ7VFOY/R8KdSkaBBvI/AAAAAAAAAA8/f6msG2A0Ync/s400/Isdebuggerpresentapi.jpg" alt="" id="BLOGGER_PHOTO_ID_5170868264510752498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However what is more interesting about Itunes is that it checks specifically for SoftICE (a cracker's favorite tool) by searching for the registry keys.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_NpFAQJ7VFOY/R8KhjEaBBwI/AAAAAAAAABE/Mv09a3LQ4sw/s1600-h/SI.jpg"&gt;&lt;img src="http://bp1.blogger.com/_NpFAQJ7VFOY/R8KhjEaBBwI/AAAAAAAAABE/Mv09a3LQ4sw/s400/SI.jpg" alt="" id="BLOGGER_PHOTO_ID_5170872946025105154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now lets get down and dirty with some code:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;IsDebuggerPresent references:&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Address=004192F5&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Disassembly=CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.IsDebuggerPresent&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Destination=kernel32.IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Address=011A4AFC&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Disassembly=CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.IsDebuggerPresent&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Destination=kernel32.IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Address=011B0591&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Disassembly=CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.IsDebuggerPresent&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Destination=kernel32.IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;&lt;span&gt;1st IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;004192E0  /$ E8 CBFDFFFF    CALL iTunes.004190B0&lt;br /&gt;004192E5  |. 84C0           TEST AL,AL&lt;br /&gt;004192E7  |. 74 03          JE SHORT iTunes.004192EC&lt;br /&gt;004192E9  |&gt; B0 01          MOV AL,1&lt;br /&gt;004192EB  |. C3             RETN&lt;br /&gt;004192EC  |&gt; E8 3FFEFFFF    CALL iTunes.00419130&lt;br /&gt;004192F1  |. 84C0           TEST AL,AL&lt;br /&gt;004192F3  |.^75 F4          JNZ SHORT iTunes.004192E9&lt;br /&gt;&lt;span&gt;004192F5  |. FF15 C8451E01  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.IsDebugger&gt;; [IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;004192FB  |. 85C0           TEST EAX,EAX&lt;br /&gt;004192FD  |. 0F95C0         SETNE AL&lt;br /&gt;00419300  \. C3             RETN&lt;br /&gt;&lt;br /&gt;&lt;span&gt;2nd one&lt;/span&gt;&lt;br /&gt;011A4A52  /$ 55             PUSH EBP&lt;br /&gt;011A4A53  |. 8DAC24 58FDFFF&gt;LEA EBP,DWORD PTR SS:[ESP-2A8]&lt;br /&gt;011A4A5A  |. 81EC 28030000  SUB ESP,328&lt;br /&gt;011A4A60  |. A1 6CBE6301    MOV EAX,DWORD PTR DS:[163BE6C]&lt;br /&gt;011A4A65  |. 33C5           XOR EAX,EBP&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;011A4AEF  |. C745 80 0D0000&gt;MOV DWORD PTR SS:[EBP-80],C000000D&lt;br /&gt;011A4AF6  |. 8975 8C        MOV DWORD PTR SS:[EBP-74],ESI&lt;br /&gt;011A4AF9  |. 8945 D4        MOV DWORD PTR SS:[EBP-2C],EAX&lt;br /&gt;&lt;span&gt;011A4AFC  |. FF15 C8451E01  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.IsDebugger&gt;; [IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;3rd one&lt;/span&gt;&lt;br /&gt;011B04D8  /&gt; 55             PUSH EBP&lt;br /&gt;011B04D9  |. 8BEC           MOV EBP,ESP&lt;br /&gt;011B04DB  |. 81EC 28030000  SUB ESP,328&lt;br /&gt;&lt;br /&gt;011B052E  |. 9C             PUSHFD&lt;br /&gt;011B052F  |. 8F05 906D7401  POP DWORD PTR DS:[1746D90]&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;&lt;span&gt;011B0591  |. FF15 C8451E01  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.IsDebugger&gt;; [IsDebuggerPresent&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;All of the calls to that API leads to this code:&lt;/span&gt;&lt;br /&gt;IsDebuggerPresent API leads to this:&lt;br /&gt;7C8130B3 &gt; 64:A1 18000000   MOV EAX,DWORD PTR FS:[18]&lt;br /&gt;7C8130B9   8B40 30          MOV EAX,DWORD PTR DS:[EAX+30]&lt;br /&gt;7C8130BC   0FB640 02        MOVZX EAX,BYTE PTR DS:[EAX+2]&lt;br /&gt;7C8130C0   C3               RETN&lt;br /&gt;&lt;br /&gt;This code basically sets EAX to 1 if Itunes is being debugged.&lt;br /&gt;&lt;br /&gt;The "Main trunk":&lt;br /&gt;004F9700  /$ 56             PUSH ESI&lt;br /&gt;&lt;span&gt;004F9701&lt;/span&gt;  |. FF15 C4431E01  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.GetTickCount&gt;]                   ; [GetTickCount&lt;br /&gt;004F9707  |. 8BF0           MOV ESI,EAX&lt;br /&gt;004F9709  |. A1 F8306501    MOV EAX,DWORD PTR DS:[16530F8]&lt;br /&gt;004F970E  |. 05 60EA0000    ADD EAX,0EA60&lt;br /&gt;004F9713  |. 3BF0           CMP ESI,EAX&lt;br /&gt;004F9715  |. 76 17          JBE SHORT iTunes.004F972E&lt;br /&gt;&lt;span&gt;004F9717  |. E8 C4FBF1FF    CALL iTunes.004192E0&lt;/span&gt;&lt;br /&gt;004F971C  |. 84C0           TEST AL,AL&lt;br /&gt;004F971E  |. 74 08          JE SHORT iTunes.004F9728&lt;br /&gt;004F9720  |. 6A 00          PUSH 0                                                         ; /ExitCode = 0&lt;br /&gt;004F9722  |. FF15 B8431E01  CALL DWORD PTR DS:[&lt;&amp;amp;KERNEL32.ExitProcess&gt;]                    ; \ExitProcess&lt;br /&gt;004F9728  |&gt; 8935 F8306501  MOV DWORD PTR DS:[16530F8],ESI&lt;br /&gt;004F972E  |&gt; 5E             POP ESI&lt;br /&gt;004F972F  \. C3             RETN&lt;br /&gt;&lt;br /&gt;This portion of code is where I see one of the three debug check is being used (I have not seen the other two being used actively yet) in which the call in bold refers to the first IsDebuggerPresent code listed.  I believe Apple uses another check to see if the program is being debugged by using the "GetTickCount" API.  I am able to get Itunes running more or less after NOPing the code at &lt;span&gt;004F9701&lt;/span&gt; and the three IsDebuggerPresent calls.  As for the SoftICE check:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Check for SoftICE registry keys&lt;/span&gt;&lt;br /&gt;00419130  /$ 81EC A4040000  SUB ESP,4A4&lt;br /&gt;00419136  |. A1 6CBE6301    MOV EAX,DWORD PTR DS:[163BE6C]&lt;br /&gt;0041913B  |. 33C4           XOR EAX,ESP&lt;br /&gt;0041913D  |. 898424 A004000&gt;MOV DWORD PTR SS:[ESP+4A0],EAX&lt;br /&gt;00419144  |. A1 CC802D01    MOV EAX,DWORD PTR DS:[12D80CC]&lt;br /&gt;00419149  |. 53             PUSH EBX&lt;br /&gt;0041914A  |. 50             PUSH EAX&lt;br /&gt;0041914B  |. 8D5C24 48      LEA EBX,DWORD PTR SS:[ESP+48]&lt;br /&gt;0041914F  |. E8 CCFEFFFF    CALL iTunes.00419020&lt;br /&gt;00419154  |. 83C4 04        ADD ESP,4&lt;br /&gt;00419157  |. 8D4C24 04      LEA ECX,DWORD PTR SS:[ESP+4]&lt;br /&gt;0041915B  |. 51             PUSH ECX                                 ; /pHandle&lt;br /&gt;0041915C  |. 6A 01          PUSH 1                                   ; |Access = KEY_QUERY_VALUE&lt;br /&gt;0041915E  |. 6A 00          PUSH 0                                   ; |Reserved = 0&lt;br /&gt;00419160  |. 8BD3           MOV EDX,EBX                              ; |&lt;br /&gt;00419162  |. 52             PUSH EDX                                 ; |Subkey&lt;br /&gt;00419163  |. 68 02000080    PUSH 80000002                            ; |hKey = HKEY_LOCAL_MACHINE&lt;br /&gt;00419168  |. FF15 0C401E01  CALL DWORD PTR DS:[&lt;&amp;amp;ADVAPI32.RegOpenKey&gt;; \RegOpenKeyExW&lt;br /&gt;0041916E  |. 85C0           TEST EAX,EAX&lt;br /&gt;&lt;span&gt;00419170  |. 74 18          JE SHORT iTunes.0041918A&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This first portion checks to see if the key (it has a folder icon) "Software/Numega/SoftICE/" is present.  If it is not then the code does not jump to VA=0041918A, however I created a registry key that matches the one in the check and it jumps to the next portion of code listed below.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If registry key value pertaining to SoftICE is found then it will jump here:&lt;/span&gt;&lt;br /&gt;0041918A  |&gt; A1 D0802D01    MOV EAX,DWORD PTR DS:[12D80D0]&lt;br /&gt;0041918F  |. 56             PUSH ESI&lt;br /&gt;00419190  |. 50             PUSH EAX&lt;br /&gt;00419191  |. 8D5C24 4C      LEA EBX,DWORD PTR SS:[ESP+4C]&lt;br /&gt;00419195  |. E8 86FEFFFF    CALL iTunes.00419020&lt;br /&gt;0041919A  |. 83C4 04        ADD ESP,4&lt;br /&gt;0041919D  |. 8D4C24 0C      LEA ECX,DWORD PTR SS:[ESP+C]&lt;br /&gt;004191A1  |. 51             PUSH ECX                                 ; /pBufSize&lt;br /&gt;004191A2  |. 8D9424 A402000&gt;LEA EDX,DWORD PTR SS:[ESP+2A4]           ; |&lt;br /&gt;004191A9  |. 52             PUSH EDX                                 ; |Buffer&lt;br /&gt;004191AA  |. 8B5424 10      MOV EDX,DWORD PTR SS:[ESP+10]            ; |&lt;br /&gt;004191AE  |. 8D4424 18      LEA EAX,DWORD PTR SS:[ESP+18]            ; |&lt;br /&gt;004191B2  |. 50             PUSH EAX                                 ; |pValueType&lt;br /&gt;004191B3  |. 6A 00          PUSH 0                                   ; |Reserved = NULL&lt;br /&gt;004191B5  |. 8BCB           MOV ECX,EBX                              ; |&lt;br /&gt;004191B7  |. 51             PUSH ECX                                 ; |ValueName&lt;br /&gt;004191B8  |. 52             PUSH EDX                                 ; |hKey&lt;br /&gt;004191B9  |. C74424 24 0401&gt;MOV DWORD PTR SS:[ESP+24],104            ; |&lt;br /&gt;004191C1  |. FF15 10401E01  CALL DWORD PTR DS:[&lt;&amp;amp;ADVAPI32.RegQueryVa&gt;; \RegQueryValueExW&lt;br /&gt;004191C7  |. 8BF0           MOV ESI,EAX&lt;br /&gt;004191C9  |. 8B4424 08      MOV EAX,DWORD PTR SS:[ESP+8]&lt;br /&gt;004191CD  |. 50             PUSH EAX                                 ; /hKey&lt;br /&gt;004191CE  |. FF15 14401E01  CALL DWORD PTR DS:[&lt;&amp;amp;ADVAPI32.RegCloseKe&gt;; \RegCloseKey&lt;br /&gt;004191D4  |. 85F6           TEST ESI,ESI&lt;br /&gt;004191D6  |. 74 19          JE SHORT iTunes.004191F1&lt;br /&gt;004191D8  |. 5E             POP ESI&lt;br /&gt;004191D9  |. 32C0           XOR AL,AL&lt;br /&gt;004191DB  |. 5B             POP EBX&lt;br /&gt;004191DC  |. 8B8C24 A004000&gt;MOV ECX,DWORD PTR SS:[ESP+4A0]&lt;br /&gt;004191E3  |. 33CC           XOR ECX,ESP&lt;br /&gt;004191E5  |. E8 5589D800    CALL iTunes.011A1B3F&lt;br /&gt;004191EA  |. 81C4 A4040000  ADD ESP,4A4&lt;br /&gt;004191F0  |. C3             RETN&lt;br /&gt;&lt;br /&gt;I am not really sure what it does but I remember seeing "InstallDir" in one of the registers, so I guess this code looks to where it is installed.  Of course, there is none so I did not get to explore what happens if SoftICE was present.&lt;br /&gt;&lt;br /&gt;So far to run this version of Itunes in Ollydbg one must:&lt;br /&gt;1 - NOP first call to "IsDebuggerPresent"&lt;br /&gt;2 - NOP the "GetTickCount" in the "Main trunk" code&lt;br /&gt;* I am not sure but I also changed &lt;span&gt;CMP ESI,EAX&lt;/span&gt; to &lt;span&gt;CMP ESI,ESI&lt;/span&gt; in the "Main trunk" code before figuring out the GetTickCount API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-2072679626533611168?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/2072679626533611168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=2072679626533611168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/2072679626533611168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/2072679626533611168'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/02/getting-itunes-to-run-in-ollydbg.html' title='Getting Itunes to run in Ollydbg'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_NpFAQJ7VFOY/R8KdSkaBBvI/AAAAAAAAAA8/f6msG2A0Ync/s72-c/Isdebuggerpresentapi.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6373231139323175111</id><published>2008-02-07T11:54:00.000-08:00</published><updated>2008-02-07T12:34:00.363-08:00</updated><title type='text'>How to Properly Leech Someone Else's Wireless Connection</title><content type='html'>I guess this deserve its own entry.  Anyway, just posting about Netstumbler brings back those memories of the days in which I would scan for unencrypted access points and connect to use the internet for free.  Yeah I know it may be unethical and illegal but I honestly don't give a fuck.  It is kind of pathetic reading news of the idiots that do get caught.  It doesn't take a moron to figure out how to connect to an AP with a wireless enabled laptop.  Anyway, I am not surprise when I connect to an unencrypted AP and was able to access the router settings page because the owner did not change the default password.  What I discovered from going through the settings is that there is a DHCP client list where one can access and find out who's connected to the router.  The computer name and MAC address of the wireless card of the users connected is shown in the list.  This prompted me to think that leeching off someone's wireless may leave tracks.  I developed a set of protocol to cover my tracks when connecting to an unencrypted AP.&lt;br /&gt;&lt;br /&gt;1.  Have a running firewall and latest updates and patches.&lt;br /&gt;2.  Change the computer name to something random (requires a restart).&lt;br /&gt;3.  Use Technitium MAC Address Changer to spoof or get a random mac address for the wireless  adapter.&lt;br /&gt;4.  Connect to the unencrypted wireless AP and do not login to sites (email, financial, etc) or IM.&lt;br /&gt;5.  Disconnect from AP when done surfing and change the MAC and computer name again.&lt;br /&gt;&lt;br /&gt;I believe this way will make it hard to trace (I am refraining from using "untraceable") .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6373231139323175111?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6373231139323175111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6373231139323175111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6373231139323175111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6373231139323175111'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/02/how-to-properly-leech-someone-elses.html' title='How to Properly Leech Someone Else&apos;s Wireless Connection'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6097532325570394940</id><published>2008-02-07T11:17:00.000-08:00</published><updated>2008-02-07T11:54:07.631-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wzcsvc'/><category scheme='http://www.blogger.com/atom/ns#' term='netstumbler'/><category scheme='http://www.blogger.com/atom/ns#' term='ollydbg'/><category scheme='http://www.blogger.com/atom/ns#' term='enable'/><title type='text'>Cracking Netstumbler</title><content type='html'>I remember using Netstumbler when I first got my Toshiba laptop (may it rest in peace) back in 2004.  What annoyed me was the fact that I could not connect to the internet while using it.   I later found out that the  Wireless Zero Configuration service is disabled on purpose so that "&lt;span style="font-style: italic;"&gt;no one may accidentally connect to a legal access point while NetStumbler is running&lt;/span&gt;".  Yes I am aware that this has been bypassed in "How-To: Hack NetStumbler 0.4.0 to Enable Wireless Zero Configuration" but I wanted to understand what was going on instead of just blindly following some instructions to hex edit Netstumbler.  So used Ollydbg on NS and I eventually came across the code the turns off the service.&lt;br /&gt;&lt;br /&gt;0041457B     74 1E          &lt;span style="font-style: italic;"&gt;JE&lt;/span&gt; SHORT NetStumb.0041459B&lt;br /&gt;0041457D   . 68 00000FA0    PUSH A00F0000&lt;br /&gt;00414582     68 AC874300    PUSH NetStumb.004387AC                            ;  &lt;span style="font-weight: bold;"&gt;ASCII "wzcsvc"&lt;/span&gt;&lt;br /&gt;00414587   . 56             PUSH ESI&lt;br /&gt;00414588   . FF15 24604300  CALL DWORD PTR DS:[&lt;&amp;amp;ADVAPI32.OpenServiceA&gt;]      ;  &lt;span style="font-weight: bold;"&gt;ADVAPI32.OpenServiceA&lt;/span&gt;&lt;br /&gt;0041458E   . 56             PUSH ESI&lt;br /&gt;0041458F   . 8985 78050000  MOV DWORD PTR SS:[EBP+578],EAX&lt;br /&gt;00414595   . FF15 28604300  CALL DWORD PTR DS:[&lt;&amp;amp;ADVAPI32.CloseServiceHandle&gt;];  &lt;span style="font-weight: bold;"&gt;ADVAPI32.CloseServiceHandle&lt;/span&gt;&lt;br /&gt;0041459B   &gt; 6A 04          PUSH 4&lt;br /&gt;&lt;br /&gt;"Wzcsvc" refers to the "Wireless Zero Configuration SerViCe". The api&lt;span style="font-weight: bold;"&gt;, CloseServiceHandle&lt;/span&gt;, is a dead giveaway and a quick search on Microsoft reveals that this "Closes a handle to a service control manager or service object".  So to prevent NS from closing it, all I did was to change the "JE" to "JMP".  I was able to verify that the service was still running with NS however I was unable to test it since I do not have a wireless card.&lt;br /&gt;&lt;br /&gt;Before: 0041457B    &lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;JE&lt;/span&gt; SHORT NetStumb.0041459B&lt;br /&gt;After:   0041457B     &lt;span style="font-style: italic; font-weight: bold;"&gt;JMP&lt;/span&gt; SHORT NetStumb.0041459B&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RANT:&lt;br /&gt;Netstumbler is a piece of shit.  Kismet is better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6097532325570394940?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6097532325570394940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6097532325570394940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6097532325570394940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6097532325570394940'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/02/cracking-netstumbler.html' title='Cracking Netstumbler'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-8251670514601387479</id><published>2008-02-04T20:34:00.000-08:00</published><updated>2008-02-04T20:45:07.044-08:00</updated><title type='text'></title><content type='html'>Lately I have been trying to RE this game called Dopewars or Drugwars (forgot the exact title but it installs spyware onto the system).  It is protected with PC-Guard and I was able to manually unpack it but I cannot find the serial algorithm yet.&lt;br /&gt;&lt;br /&gt;Anyway, I really regret choosing biosci as my major (should've picked computer science).  I guess I have to live with the choices I make.  Wished I listened to my father closely and not let my mother influence the major I picked.  He did warn me that with a bio degree that you can only be a lab tech.  The job prospects don't look too good with a bio degree.  I am thinking about going back to college to get a degree in computer science or electrical engineering (like father like son).  I can't believe that I made the same mistake like my father.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-8251670514601387479?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/8251670514601387479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=8251670514601387479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8251670514601387479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/8251670514601387479'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/02/lately-i-have-been-trying-to-re-this.html' title=''/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-634552548975853762.post-6697216133951898739</id><published>2008-01-13T22:03:00.000-08:00</published><updated>2008-10-24T08:47:59.265-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ollydbg'/><category scheme='http://www.blogger.com/atom/ns#' term='key'/><category scheme='http://www.blogger.com/atom/ns#' term='reverse engineering'/><category scheme='http://www.blogger.com/atom/ns#' term='cd'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='explained'/><category scheme='http://www.blogger.com/atom/ns#' term='starcraft'/><title type='text'>Starcraft CD-key algorithm explained</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/R4sErmH0yjI/AAAAAAAAAAk/bUG_GSeyoWQ/s1600-h/2.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_NpFAQJ7VFOY/R4sErmH0yjI/AAAAAAAAAAk/bUG_GSeyoWQ/s400/2.jpg" alt="" id="BLOGGER_PHOTO_ID_5155219345469917746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fig. 1 - Invalid key&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_NpFAQJ7VFOY/R4sEr2H0ykI/AAAAAAAAAAs/6ppZgBEzbnc/s1600-h/6.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_NpFAQJ7VFOY/R4sEr2H0ykI/AAAAAAAAAAs/6ppZgBEzbnc/s400/6.jpg" alt="" id="BLOGGER_PHOTO_ID_5155219349764885058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fig. 2 - Valid key&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_NpFAQJ7VFOY/R4sEr2H0ylI/AAAAAAAAAA0/XfnN14q4v08/s1600-h/8.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_NpFAQJ7VFOY/R4sEr2H0ylI/AAAAAAAAAA0/XfnN14q4v08/s400/8.jpg" alt="" id="BLOGGER_PHOTO_ID_5155219349764885074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fig. 3 - Success!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Requirements:&lt;/span&gt;&lt;br /&gt;1. Ollydbg&lt;br /&gt;2. Starcraft CD v1.0&lt;br /&gt;3. Knowledge of x86 assembly langauage and hexadecimal&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I began by opening the INSTALL.EXE with Ollydbg (it took some time because of the size of the file).  After setting some breakpoints and tracing through the code I eventually found the algorithm.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_NpFAQJ7VFOY/R4r9Y2H0yiI/AAAAAAAAAAc/gtFVQoBjUb8/s1600-h/3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_NpFAQJ7VFOY/R4r9Y2H0yiI/AAAAAAAAAAc/gtFVQoBjUb8/s400/3.jpg" alt="" id="BLOGGER_PHOTO_ID_5155211326765976098" border="0" /&gt;&lt;/a&gt;Here is the code with comments:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:times new roman;"&gt;0040F8DE &lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;| &gt;B8 03000000  MOV EAX,3&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8E3 &lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;| .33D2                 XOR EDX,EDX&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8E5  |&gt; 8A0C32         /MOV CL,BYTE PTR DS:[EDX+ESI]; &lt;span style="font-weight: bold;"&gt;Take left most unprocessed number.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8E8  |. 80F9 30        |CMP CL,30; &lt;/span&gt;&lt;span style="font-weight: bold;font-family:times new roman;" &gt;Checks if inputted character is a number&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8EB  |. 7C 53             |JL SHORT INSTALL.0040F940; &lt;span style="font-weight: bold;"&gt;if not then give error message.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8ED  |. 80F9 39        |CMP CL,39&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8F0  |. 7F 4E             |JG SHORT INSTALL.0040F940; &lt;span style="font-weight: bold;"&gt;Same as above.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8F2  |. 0FBEC9         |MOVSX ECX,CL; &lt;span style="font-weight: bold;"&gt;Stores the number in ECX in hexadecimal.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8F5  |. 8D3C00         |LEA EDI,DWORD PTR DS:[EAX+EAX]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8F8  |. 83E9 30         |SUB ECX,30; &lt;span style="font-weight: bold;"&gt;Converts the number to decimal.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8FB  |. 33F9              |XOR EDI,ECX&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8FD  |. 03C7             |ADD EAX,EDI&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F8FF  |. 42                  |INC EDX&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F900  |. 83FA 0C       |CMP EDX,0C; &lt;span style="font-weight: bold;"&gt;Is EDX=12?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F903  |.^72 E0          \JB SHORT INSTALL.0040F8E5; &lt;span style="font-weight: bold;"&gt;Keep on doing this for the 12 numbers.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F905  |. 33D2           XOR EDX,EDX; &lt;span style="font-weight: bold;"&gt;EDX=0&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F907  |. B9 0A000000    MOV ECX,0A; &lt;span style="font-weight: bold;"&gt;ECX=10&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F90C  |. F7F1           DIV ECX; &lt;span style="font-weight: bold;"&gt;EAX is divided by ECX and the remainder is put into DL.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F90E  |. 0FBE46 0C      MOVSX EAX,BYTE PTR DS:[ESI+C]; &lt;span style="font-weight: bold;"&gt;EAX=last number of CD-key&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F912  |. 0FBED2         MOVSX EDX,DL; &lt;span style="font-weight: bold;"&gt;EDX=whatever DL was&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F915  |. 83C2 30        ADD EDX,30; &lt;span style="font-weight: bold;"&gt;This converts the number in EDX into hex.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F918  |. 3BC2           CMP EAX,EDX; &lt;span style="font-weight: bold;"&gt;Is EAX=EDX?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F91A  |. 74 1C          JE SHORT INSTALL.0040F938; &lt;span style="font-weight: bold;"&gt;Go here if CD-key is valid.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F91C  |. 8B4C24 10      MOV ECX,DWORD PTR SS:[ESP+10]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F920  |. 51             PUSH ECX&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F921  |. 68 59020000    PUSH 259&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F926  |. 68 58020000    PUSH 258&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:times new roman;"&gt;0040F92B  |. E8 A034FFFF    CALL INSTALL.00402DD0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Determine X to make 1111-11111-111X a valid key?&lt;br /&gt;&lt;span style="font-size:130%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;EAX&lt;span style="font-size:85%;"&gt;0&lt;/span&gt;=3&lt;br /&gt;ECX&lt;span style="font-size:85%;"&gt;n&lt;/span&gt;= nth digit of serial number&lt;br /&gt;EDI&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:85%;"&gt;n&lt;/span&gt;=(EAX&lt;span style="font-size:85%;"&gt;n-1&lt;/span&gt; * 2) XOR ECX&lt;span style="font-size:85%;"&gt;n&lt;br /&gt;      &lt;span style="font-size:130%;"&gt;EAX&lt;span style="font-size:85%;"&gt;n&lt;/span&gt;=EDI&lt;span style="font-size:85%;"&gt;n&lt;/span&gt; + EAX&lt;span style="font-size:85%;"&gt;n-1&lt;br /&gt;&lt;span style="font-size:130%;"&gt;n=1     EDI&lt;span style="font-size:85%;"&gt;1&lt;/span&gt;=7, EAX&lt;span style="font-size:85%;"&gt;1&lt;/span&gt;=A&lt;br /&gt;n=2     EDI&lt;span style="font-size:85%;"&gt;2&lt;/span&gt;=15, EAX&lt;span style="font-size:85%;"&gt;2&lt;/span&gt;=1F&lt;br /&gt;. . .&lt;br /&gt;n=12   EDI&lt;span style="font-size:85%;"&gt;12&lt;/span&gt;=12EBDD, EAX&lt;span style="font-size:85%;"&gt;12&lt;/span&gt;=1C61CB&lt;br /&gt;1C61CB (hex) = 1860043 (decimal).  Divide by A (hex) or 10 (decimal)and the remainder is 3.  So X=3.  Valid key is 1111-11111-1113&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Discussion:&lt;/span&gt;&lt;br /&gt;Fortunately, the file is not packed (I am in the process of learning how to unpack).  This program is an example of when serial fishing does not work.  The key is 13 digits long (formatted as: XXXX-XXXXX-XXXX) with the first 12 digits starting from the left being used to determine the 13th digit.  If the 13th digit is correct then installation proceeds else there is an error message.  If one where to "lose" the CD-key, then it is possible to randomly put in the first 12 digits while trying all digits 0 through 9 for the 13th one.&lt;br /&gt;For example:&lt;br /&gt;1234-56789-123&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; - incorrect!&lt;br /&gt;1234-56789-123&lt;span style="font-weight: bold;"&gt;2&lt;/span&gt; - incorrect!&lt;br /&gt;1234-56789-123&lt;span style="font-weight: bold;"&gt;3 &lt;/span&gt;- incorrect!&lt;br /&gt;1234-56789-123&lt;span style="font-weight: bold;"&gt;4&lt;/span&gt; - correct! (this one is floating around on the Internet)&lt;br /&gt;The algorithm is quite simple and I was able to calculate a valid key with nothing more than a piece of paper, pen, and trusty TI-36X Solar calculator.   Sadly, I don't have much experience in programming or know any language like C++ but I bet someone reading this can quickly code a keygen.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;UPDATE - 08JUNE2008&lt;/span&gt;&lt;br /&gt;I took an introductory class on C++ programming but I am too tired at the moment to think of the a keygen code, instead I'll post the code in TI-89 BASIC which will ask you for the first 12 digits.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Draft&lt;/span&gt;&lt;br /&gt;sckeygen()&lt;br /&gt;Prgm&lt;br /&gt;3-&gt;eax&lt;br /&gt;0-&gt;edx&lt;br /&gt;Request "serial: ", s&lt;br /&gt;s-&gt;g&lt;br /&gt;Lbl top&lt;br /&gt;expr(left(g,1))-&gt;ecx&lt;br /&gt;shift(g,1)-&gt;g&lt;br /&gt;eax*2 xor ecx-&gt;edi&lt;br /&gt;eax+edi-&gt;eax&lt;br /&gt;edx+1-&gt;edx&lt;br /&gt;If edx=12 Then&lt;br /&gt;remain(eax,10)-&gt;a&lt;br /&gt;Disp expr(s)*string(a)&lt;br /&gt;Else&lt;br /&gt;Goto top&lt;br /&gt;EndIf&lt;br /&gt;EndPrgm&lt;br /&gt;&lt;br /&gt;The above keygen has some rough edges that still need to be smoothed out.  The one below will randomly generate digits 1 through 12.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;FINAL&lt;/span&gt;&lt;br /&gt;sckeygen()&lt;br /&gt;Prgm&lt;br /&gt;3-&gt;eax&lt;br /&gt;0-&gt;edx&lt;br /&gt;""-&gt;s&lt;br /&gt;For i,1,12&lt;br /&gt;string(remain(rand(10),10))-&amp;amp;s&gt;s&lt;br /&gt;EndFor&lt;br /&gt;s-&gt;g&lt;br /&gt;Lbl top&lt;br /&gt;expr(left(g,1))-&gt;ecx&lt;br /&gt;shift(g,1)-&gt;g&lt;br /&gt;eax*2 xor ecx-&gt;edi&lt;br /&gt;eax+edi-&gt;eax&lt;br /&gt;edx+1-&gt;edx&lt;br /&gt;If edx=12 Then&lt;br /&gt;remain(eax,10)-&gt;a&lt;br /&gt;Disp mid(s,1,4)&amp;amp;"-"&amp;amp;mid(s,5,5)&amp;amp;"-"&amp;amp;mid(s,10,3)&amp;amp;string(a)&lt;br /&gt;Else&lt;br /&gt;Goto top&lt;br /&gt;EndIf&lt;br /&gt;EndPrgm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;C++ Source code&lt;/span&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.comment { color: #999999; font-style: italic; }&lt;br /&gt;.pre { color: #000099; }&lt;br /&gt;.string { color: #009900; }&lt;br /&gt;.char { color: #009900; }&lt;br /&gt;.float { color: #996600; }&lt;br /&gt;.int { color: #999900; }&lt;br /&gt;.bool { color: #000000; font-weight: bold; }&lt;br /&gt;.type { color: #FF6633; }&lt;br /&gt;.flow { color: #FF0000; }&lt;br /&gt;.keyword { color: #990000; }&lt;br /&gt;.operator { color: #663300; font-weight: bold; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="comment"&gt;// SC_keygen.cpp : main project file.&lt;br /&gt;&lt;/span&gt;&lt;span class="pre"&gt;&lt;br /&gt;#include "stdafx.h"&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;br /&gt;#include &amp;lt;iso646.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;ctime&amp;gt;&lt;br /&gt;#include &amp;lt;vector&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword"&gt;using namespace&lt;/span&gt; std&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt;void&lt;/span&gt; generate&lt;span class="operator"&gt;(&lt;/span&gt;vector&lt;span class="operator"&gt;&amp;lt;&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt;&lt;span class="operator"&gt;&amp;gt;&amp;amp;&lt;/span&gt; s&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt;&lt;span class="operator"&gt;&amp;amp;&lt;/span&gt; x&lt;span class="operator"&gt;,&lt;/span&gt;&lt;span class="type"&gt; int&lt;/span&gt;&lt;span class="operator"&gt;&amp;amp;&lt;/span&gt; d&lt;span class="operator"&gt;)&lt;br /&gt;{&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Stores random digits 0-9 in a vector&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; for&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"&gt; 12&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  s&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;] =&lt;/span&gt; rand&lt;span class="operator"&gt;() %&lt;/span&gt;&lt;span class="int"&gt; 10&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span class="comment"&gt;&lt;br /&gt;&lt;br /&gt; //Main algorithm&lt;br /&gt;&lt;/span&gt;&lt;span class="flow"&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"&gt; 12&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  d&lt;span class="operator"&gt; = (&lt;/span&gt;&lt;span class="int"&gt;2&lt;/span&gt;&lt;span class="operator"&gt; *&lt;/span&gt; x&lt;span class="operator"&gt;)&lt;/span&gt;&lt;span class="keyword"&gt; xor&lt;/span&gt; s&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  x&lt;span class="operator"&gt; =&lt;/span&gt; x&lt;span class="operator"&gt; +&lt;/span&gt; d&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;br /&gt; x&lt;span class="operator"&gt; =&lt;/span&gt; x&lt;span class="operator"&gt; %&lt;/span&gt;&lt;span class="int"&gt; 10&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; for&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt; i&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt; &amp;lt;&lt;/span&gt;&lt;span class="int"&gt; 12&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt; i&lt;span class="operator"&gt;++)&lt;br /&gt; {&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;i&lt;span class="operator"&gt;==&lt;/span&gt;&lt;span class="int"&gt;4&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="char"&gt; '-'&lt;/span&gt;&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; s&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;];&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  else if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;i&lt;span class="operator"&gt;==&lt;/span&gt;&lt;span class="int"&gt;9&lt;/span&gt;&lt;span class="operator"&gt;)&lt;br /&gt;  {&lt;/span&gt;&lt;br /&gt;   cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="char"&gt; '-'&lt;/span&gt;&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; s&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;];&lt;br /&gt;  }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  else&lt;/span&gt; cout&lt;span class="operator"&gt;&amp;lt;&amp;lt;&lt;/span&gt;s&lt;span class="operator"&gt;[&lt;/span&gt;i&lt;span class="operator"&gt;];&lt;br /&gt; }&lt;/span&gt;&lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt; x&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; x&lt;span class="operator"&gt;=&lt;/span&gt;&lt;span class="int"&gt;3&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; d&lt;span class="operator"&gt;=&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;int&lt;/span&gt;&lt;span class="keyword"&gt; main&lt;/span&gt;&lt;span class="operator"&gt;()&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt; srand&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="keyword"&gt;static_cast&lt;/span&gt;&lt;span class="operator"&gt;&amp;lt;&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt;&lt;span class="operator"&gt;&amp;gt;(&lt;/span&gt;time&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="int"&gt;0&lt;/span&gt;&lt;span class="operator"&gt;)));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; vector&lt;span class="operator"&gt;&amp;lt;&lt;/span&gt;&lt;span class="type"&gt;int&lt;/span&gt;&lt;span class="operator"&gt;&amp;gt;&lt;/span&gt; serial&lt;span class="operator"&gt;(&lt;/span&gt;&lt;span class="int"&gt;12&lt;/span&gt;&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; eax&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 3&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt;&lt;br /&gt; int&lt;/span&gt; edi&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; int&lt;/span&gt; a&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="type"&gt;&lt;br /&gt; bool&lt;/span&gt; no_quit&lt;span class="operator"&gt; =&lt;/span&gt;&lt;span class="bool"&gt; true&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt; cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "Starcraft CD keygen\n"&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt; generate&lt;span class="operator"&gt;(&lt;/span&gt;serial&lt;span class="operator"&gt;,&lt;/span&gt;eax&lt;span class="operator"&gt;,&lt;/span&gt;edi&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt; do&lt;/span&gt;&lt;span class="operator"&gt;&lt;br /&gt; {&lt;/span&gt;&lt;br /&gt;  cout&lt;span class="operator"&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="string"&gt; "\nGenerate another one? (yes=1/no=0)"&lt;/span&gt;&lt;span class="operator"&gt;;&lt;/span&gt;&lt;br /&gt;        cin&lt;span class="operator"&gt; &amp;gt;&amp;gt;&lt;/span&gt; a&lt;span class="operator"&gt;;&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  if&lt;/span&gt;&lt;span class="operator"&gt; (&lt;/span&gt;a&lt;span class="operator"&gt;==&lt;/span&gt;&lt;span class="int"&gt;1&lt;/span&gt;&lt;span class="operator"&gt;)&lt;/span&gt; generate&lt;span class="operator"&gt;(&lt;/span&gt;serial&lt;span class="operator"&gt;,&lt;/span&gt;eax&lt;span class="operator"&gt;,&lt;/span&gt;edi&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;&lt;br /&gt;  else&lt;/span&gt; no_quit&lt;span class="operator"&gt;=&lt;/span&gt;&lt;span class="bool"&gt;false&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt; }&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt; while&lt;/span&gt;&lt;span class="operator"&gt;(&lt;/span&gt;no_quit&lt;span class="operator"&gt;);&lt;/span&gt;&lt;span class="flow"&gt;&lt;br /&gt;    return&lt;/span&gt;&lt;span class="int"&gt; 0&lt;/span&gt;&lt;span class="operator"&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/634552548975853762-6697216133951898739?l=takingsoftwareapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://takingsoftwareapart.blogspot.com/feeds/6697216133951898739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=634552548975853762&amp;postID=6697216133951898739' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6697216133951898739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/634552548975853762/posts/default/6697216133951898739'/><link rel='alternate' type='text/html' href='http://takingsoftwareapart.blogspot.com/2008/01/starcraft-cd-key-algorithm-explained.html' title='Starcraft CD-key algorithm explained'/><author><name>takingsoftwareapart</name><uri>http://www.blogger.com/profile/08766643634061069883</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_NpFAQJ7VFOY/R4sErmH0yjI/AAAAAAAAAAk/bUG_GSeyoWQ/s72-c/2.jpg' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
