home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / +Sandman / Htocrk93.txt < prev    next >
Text File  |  2000-05-25  |  50KB  |  1,073 lines

  1.                        HOW TO CRACK, by +ORC, A TUTORIAL
  2.  
  3. --------------------------------------------------------------------------------
  4.  
  5.  
  6.                  Lesson 9 (3): How to crack Windows, Hands on
  7.               Nagscreens galore (B): The 'Dead listing' approach 
  8.  
  9. --------------------------------------------------------------------------------
  10.  
  11.  
  12.  
  13.                           [HEXWORKSHOP][PaintShopPro]
  14.  
  15.                     ------------------------------------------------------------
  16.  
  17.  
  18.  
  19.   
  20.   (Hic sunt tabulae: Best viewed with good old Courier 10)
  21.  
  22.      In this lesson I'll teach you another cracking technique
  23. known as "dead listing" approach, in opposition to the "live"
  24. cracking (through Softice/Winice) that we have used (and we'll
  25. use) most of the time.
  26.      Since this approach requires a good Hexeditor and a good
  27. disassembler (and a good Wordprocessor), it suits us well to
  28. begin the 'hands on'  part cracking what we need: a good
  29. Hexeditor.
  30.      I'll crack here the nagscreens out of Hexworkshop, Version
  31. 2.10 (32 bit version). A good and relatively quick (for Windoze's
  32. standards) application by Breakpoint software. Many among you
  33. will already have this hexeditor inside their Software
  34. collection, if not find it on the Web through an Archie search
  35. and download it through ftpmail... searching through the archies
  36. will give you something like this: 
  37.  
  38. Host ftp.loria.fr    (152.81.10.10)
  39. Last updated 11:25 23 Oct 1996
  40. Location: /pub1/pc/win95/programr
  41. FILE -r--r--r-- 707906 bytes  02:00 13 Aug 1995 hworks32.zip
  42.  
  43. The exact NAME of this hexediting program is HWORKS32.EXE, it is
  44. 524288 bytes LONG, and its DATED 2 February 1996. This program
  45. has many little nag annoyances:
  46. -    shows a nagscreen reminding you how many days you have used
  47. the program;
  48. -    keeps a nag_string "unregistered version" on the main screen
  49. of the program;
  50. -    has, inside help, a "registration serial number form"...
  51. this is the number you could get registering... and should digit
  52. inside the HELP/ABOUT HEX WORKSHOP window form.
  53.  
  54.      Elsewhere in this tutorial we have already learned how to
  55. defeat this type of protection: through Winice breakpoints.
  56. Basically we would type a fake registration number (say
  57. '121212121212') and then look for the occurrences of our string
  58. in memory, and then search and investigate the manipulations
  59. undertaken by the protection scheme. In this way we would finally
  60. be able to crack the nagscreen procedure. 
  61.      Fine, fine... this would indeed work, but I want to teach
  62. you through this lesson ANOTHER, completely different approach
  63. to cracking, which is and will be especially useful for
  64. 'nagscreen' and 'time-limit' cracking... i.e. the "dead listing"
  65. approach. This approach is a much more "relaxed" sort of crack,
  66. which  will work flawlessly most of the time. 
  67.      This approach is particularly easy with Windows programs,
  68. since -as I have already told you a hundred times- the modularity
  69. of this overbloated atrocity makes it particularly easy for us
  70. little crackers to track back the -mostly primitive- protection
  71. methods utilized by the commercial programmers.
  72.      I remember older times, when programming was still an art
  73. for intelligent (not mercantile) beings, cracking the old (and
  74. sometime beautifully crafted) Z-80, CP/M and DOS programs. In
  75. those time 'a byte was a byte'! And good programmers found funny
  76. tricks in order to write 'tight' code. We old crackers used the
  77. 'dead listing' approach sitting (or snoozing) in pleasant (albeit
  78. a little battered) armchairs, inside a huge university library,
  79. drinking very good Martini Wodka (you would be well advised to
  80. use only Moskowskaja, coz non Russian Wodkas are repugnant). Four
  81. of us at a time, each one just looking at his paper listings. You
  82. cannot imagine how many little (unrelated) tricks we found inside
  83. the code cracking in that way! A hacker, a cracker (me), a 'real'
  84. programmer and an encryption specialist, all four sitting in the
  85. same room, exchanging pretty clever findings and sipping (much
  86. too many) good cocktails... it's long ago, those times (and
  87. societies) are gone for ever! Microsoft's abomination has
  88. unfortunately created this overbloated world of huge 'programs'
  89. which perform more slowly (and much more awkwardly) what the old
  90. programs did quickly and flawlessly.
  91.      You don't believe me? Why don't you just install Linux on
  92. your harddisk and see for yourself the difference between a good
  93. OS and Windoze? Just try it... you'll be amazed and you'll never
  94. go back... well, you'll actually do... only in order to crack the
  95. hell out of Windows: We'll never damage enough Microsoft's
  96. interests to compensate for this moronic situation: millions of
  97. stupid users have to wait hours (and this with microprocessors
  98. that are 1000 times quicker than the old 8086) to perform with
  99. MS_Word -slowly- what they could have done immediately with an
  100. old copy of Wordperfect for Dos. 
  101.      Anyway, the huge dimension of all Windows' programs forces
  102. us to abandon the printed "dead listing" approach... printing in
  103. extenso the listing of a Windows program would consume a couple
  104. of ink cartridges and could easily take ages... therefore we can
  105. indeed still crack with the "dead listing" method, and we can
  106. indeed still drink our Martinis (and we do, Oh Yessir), but we
  107. must keep the overbloated listings off page, on our PC, printing
  108. only the small part of them that are relevant to our crack.
  109.  
  110.      As I said at the beginning, for this art of cracking you'll
  111. need basically only two programs (and you will NOT need
  112. Softice/Winice).
  113.  
  114. 1)        A disassembler like W32DASM (or another good one) in
  115. order to find the protection scheme.
  116. You will probably already possess it (else how did you crack
  117. until now?)... if not find the last version on the Web -through
  118. an Archie search- and download it -through ftpmail-, Searching
  119. the archies will give you something like this:
  120.  
  121. Host ftp.funet.fi    (128.214.248.6)
  122. Last updated 07:57  1 Jan 1997
  123. Location: /pub/mirrors/ftp.cdrom.com/pub/simtelnet/win3/prog
  124. FILE    -rwxrwxr-x  650327 bytes  23:25 28 Oct 1996  w32dasm6.zip
  125.  
  126. 2)        An hexeditor (Use Hexworkshop version 2.10 itself,
  127. since we are already cracking it :=) in order to defeat the
  128. protection scheme as soon as you have found it. OK, enough, let's
  129. crack.
  130.  
  131. Here is how the "dead listing" approach works:
  132. 1)   Run the program you want to crack, in this case Hexworkshop,
  133. look at all the nag_strings and write them down (I mean snap them
  134. down -automatically- from screen... see elsewhere in my tutorial
  135. how to get and crack snap32);
  136. 2)   Wdasm the file (that means: 'open' it inside the
  137. disassembler in order to get the listing).
  138. 3)   Transfer the listing to your favorite wordprocessor (we will
  139. not need Wdasm any more, bye)
  140. 4)   Search (Find) inside your wordprocessor the nag_references,
  141. say, in our case, the string "unregistered version"
  142.  
  143. You'll immediately land inside following piece of code:
  144. :MAIN_NAG_ROUTINE
  145. :00415732 CC              int 03
  146. :00415733 CC              int 03
  147. :00415734 CC              int 03
  148. :00415735 CC              int 03
  149. :00415736 CC              int 03
  150. :00415737 CC              int 03
  151. :00415738 CC              int 03
  152. :00415739 CC              int 03
  153. :0041573A CC              int 03
  154. :0041573B CC              int 03
  155. :0041573C CC              int 03
  156. :0041573D CC              int 03
  157. :0041573E CC              int 03
  158. :0041573F CC              int 03
  159. :00415740 55              push ebp
  160. :00415741 8BEC            mov ebp, esp
  161. :00415743 6AFF            push FFFFFFFF
  162. :00415745 6873584100      push 00415873
  163. :0041574A 64A100000000    mov eax, fs:[00000000]
  164. :00415750 50              push eax
  165. :00415751 64892500000000  mov fs:[00000000], esp
  166. :00415758 81EC0C020000    sub esp, 0000020C
  167. :0041575E 53              push ebx
  168. :0041575F 56              push esi
  169. :00415760 57              push edi
  170. :00415761 898DE8FDFFFF    mov [ebp-00000218], ecx
  171. :00415767 8B450C          mov eax, [ebp+0C]
  172. :0041576A 50              push eax
  173. :0041576B 6A73            push 00000073
  174. :0041576D 8B8DE8FDFFFF    mov ecx, [ebp-00000218]
  175. :00415773 E87EFC0100      call 004353F6
  176. :00415778 C745FC00000000  mov [ebp-04], 00000000
  177. :0041577F 8B8DE8FDFFFF    mov ecx, [ebp-00000218]
  178. :00415785 83C144          add ecx, 00000044
  179. :00415788 E84EF40100      call 00434BDB
  180. :0041578D C645FC01        mov [ebp-04], 01
  181. :00415791 8B85E8FDFFFF    mov eax, [ebp-00000218]
  182. :00415797 C70028AE4500    mov dword ptr [eax], 0045AE28
  183.  
  184. *StringData Ref from Data Obj->"An unregistered version of Hex"
  185.                              ->"Workshop has been on"
  186.                             |
  187. :0041579D 68085B4600      push 00465B08
  188. :004157A2 8D85F4FDFFFF    lea eax, [ebp-0000020C]
  189.  
  190. Good, we immediately see that the above routine starts at
  191. instruction
  192. :00415740 55              push ebp
  193. Therefore now we'll search our listing for following string:
  194. call 00415740                 (that is: who calls here?).
  195. The reason we must search for the caller is very simple: there
  196. is no conditional jump inside the piece of code above... and
  197. therefore it'll very unlikely hide a protection and/or a check
  198. time or nag routine. If we do perform our search for the caller
  199. we'll immediately land inside following routine: 
  200.  
  201. : CALL_NAG_ROUTINE
  202. :00415DAC 55              push ebp          ;pusha lotta values
  203. :00415DAD 8BEC            mov ebp, esp
  204. :00415DAF 6AFF            push FFFFFFFF
  205. :00415DB1 68045E4100      push 00415E04
  206. :00415DB6 64A100000000    mov eax, fs:[00000000]
  207. :00415DBC 50              push eax
  208. :00415DBD 64892500000000  mov fs:[00000000], esp
  209. :00415DC4 83EC54          sub esp, 00000054
  210. :00415DC7 53              push ebx         
  211. :00415DC8 56              push esi
  212. :00415DC9 57              push edi
  213. :00415DCA 894DA0          mov [ebp-60], ecx
  214. :00415DCD 6A00            push 00000000
  215. :00415DCF 8B4508          mov eax, [ebp+08]
  216. :00415DD2 50              push eax
  217. :00415DD3 8D4DA4          lea ecx, [ebp-5C]  ;for the call
  218. :00415DD6 E865F9FFFF      call 00415740    ;*** HERE !!! ***
  219. :00415DDB C745FC00000000  mov [ebp-04], 00000000
  220. :00415DE2 8D4DA4          lea ecx, [ebp-5C]
  221. :00415DE5 E804F70100      call 004354EE
  222. :00415DEA C745FCFFFFFFFF  mov [ebp-04], FFFFFFFF
  223. :00415DF1 E805000000      call 00415DFB
  224. :00415DF6 E913000000      jmp 00415E0E
  225. :00415DFB 8D4DA4          lea ecx, [ebp-5C]
  226. :00415DFE E8FD000000      call 00415F00
  227. :00415E03 C3              ret
  228.  
  229. Good, OK. Now -once more- who calls this function? As -here too-
  230. we don't have any conditional jumps, we are compelled to look
  231. further inside the green branches of our code_tree.
  232. Let's go on: searching for
  233. call 00415DAC       (the beginning of the above function)
  234. we will land inside following code:
  235.  
  236. :WILL     _I_CALL_THE_CALL_NAG_ROUTINE_?
  237. :0040254C 6808414500      push 00454108           
  238. :00402551 8D8568FEFFFF    lea eax, [ebp-198]
  239. :00402557 50              push eax
  240. :00402558 E893460200      call 00426BF0
  241. :0040255D 83C408          add esp, 8
  242. :00402560 0FBF0508414500  movsx word ptr eax, [00454108]     
  243. :00402567 85C0            test eax, eax
  244. :00402569 0F8586000000    jne 004025F5  ;jump 1 over CALL_NAG
  245. :0040256F 8B8D40FEFFFF    mov ecx, [ebp-1C0]
  246. :00402575 E8D3350100      call 00415B4D
  247. :0040257A 85C0            test eax, eax
  248. :0040257C 0F841B000000    je 0040259D
  249. :00402582 8B8D40FEFFFF    mov ecx, [ebp-1C0]
  250. :00402588 E866360100      call 00415BF3
  251. :0040258D 8B8D40FEFFFF    mov ecx, [ebp-1C0]
  252. :00402593 E8DF360100      call 00415C77
  253. :00402598 E953000000      jmp 004025F0  ;jump 2 over CALL_NAG
  254. :0040259D 8B8D40FEFFFF    mov ecx, [ebp-1C0]
  255. :004025A3 E83D370100      call 00415CE5 ;(month year routine)
  256. :004025A8 898570FFFFFF    mov [ebp-90], eax
  257. :004025AE 83BD70FFFFFF00  cmp dword ptr [ebp-90], 0
  258. :004025B5 0F8417000000    je 004025D2    ;jump 3 over CALL_NAG
  259. :004025BB 8B8570FFFFFF    mov eax, [ebp-90]
  260. :004025C1 50              push eax
  261. :004025C2 8B8D40FEFFFF    mov ecx, [ebp-1C0]
  262. :004025C8 E8DF370100      call 00415DAC ;HERE! CALL_NAG! *
  263. :004025CD E91E000000      jmp 004025F0
  264. :004025D2 8D8D7CFFFFFF    lea ecx, [ebp-84];jump 3 lands here
  265. :004025D8 E88C420200      call 00426869
  266. :004025DD 85C0            test eax, eax
  267. :004025DF 0F840B000000    je 004025F0
  268. :004025E5 8D8D7CFFFFFF    lea ecx, [ebp-84]
  269. :004025EB E8FE2E0300      call 004354EE
  270. :004025F0 E91E000000      jmp 00402613     ;jump 2 lands here
  271. :004025F5 8D8D7CFFFFFF    lea ecx, [ebp-84];jump 1 lands here
  272. :004025FB E869420200      call 00426869
  273.  
  274. Now have a good look at the code above: As you can see there are
  275. only three possible jumps which will NOT call the CALL_NAG
  276. routine. The one at
  277. :00402598 E953000000          jmp 004025F0 (Jump 2)         
  278. is not conditional, and therefore very rarely used for nagscreens
  279. protections. Besides, it links to another unconditional jump and
  280. it's most probably a "Quick_out" way... let's eliminate it, at
  281. least for now.
  282. We remain with only two jumps over the NAG_SCREEN call routine:
  283. 00402569 0F8586000000         jne 004025F5 (jump 1)
  284. and
  285. 004025B5 0F8417000000         je 004025D2      (jump 3)
  286.  
  287.      You may investigate both of them, but, hey, you could
  288. eliminate one more jump, again, just using a little Zen code
  289. feeling): see how the jump condition for jump_3 is a base pointer
  290. value [ebp-90], while the one for jump_1 is a memory fixed
  291. location [00454108]... this sort of condition is usually a green
  292. light, for compiler reasons I'll not delve inside here. Therefore
  293. let's have a closer look at it and let's forget jump 3, at least
  294. for now.
  295.  
  296. :JUMP_1_UNDER_THE_LUPE
  297. :0040254C 6808414500      push 00454108 ;values for         
  298. :00402551 8D8568FEFFFF    lea eax, [ebp-198]
  299. :00402557 50              push eax      ;the following
  300. :00402558 E893460200      call 00426BF0 ;call
  301. :0040255D 83C408          add esp, 8 ;modify stack
  302. :00402560 0FBF0508414500  movsx word ptr eax, [00454108] ;HERE 
  303. :00402567 85C0            test eax, eax ;conditional test
  304. :00402569 0F8586000000    jne 004025F5  ;jump over CALL_NAG
  305.  
  306. What will then this mysterious [00454108] location be? Don't you
  307. feel it? It's the ACTIVATOR! The location with the flag, which
  308. sets the whole nag screen galore for Hexworkshop! Our cracking
  309. job is already finished! 
  310.      We don't need anything more: we don't need any fiddling with
  311. breakpoints, nor to examine hundreds of irrelevant calls... with
  312. Windows this kind of "dead listing" cracks works so smooth I
  313. could shriek!
  314.      But, hey, OK, we will continue our snooping, for the sake
  315. of it and just in order to be completely sure... it's not
  316. necessary, but let's do it anyway... check a little more
  317. around... search, inside your huge listing, all the other
  318. occurrences of the same [00454108] location... you'll get no more
  319. than 5 hits. The most striking one from our cracking point of
  320. view being the following occurrence:
  321.  
  322. :00402770 898574FFFFFF   mov [ebp-8C], eax ;save old eax
  323. :00402776 0FBF0508414500 movsx word ptr eax, [00454108];FLAG*
  324. :0040277D 85C0           test eax, eax     ;flag is zero?
  325. :0040277F 0F8528000000   jne 004027AD    ;nope, so we won't
  326. :00402785 8B4DEC         mov ecx, [ebp-14]             
  327. :00402788 E883280000     call 00405010   ;call this, nor
  328. :0040278D 898574FFFFFF   mov [ebp-8C], eax ;write
  329.  
  330. * Possible StringData Ref from Data Obj ->"Unregistered
  331. Version"  
  332.                      |
  333. :00402793 6854494600    push 00464954   ;on the screen
  334. :00402798 685C800000    push 0000805C   ;& we'll jump over
  335. :0040279D 6800400000    push 00004000   ;these pushes
  336. :004027A2 8B8D74FFFFFF  mov ecx, [ebp-8C]
  337. :004027A8 E823280000    call 00404FD0   ;and this call
  338.  
  339. * Possible StringData Ref from Data Obj ->"ControlBars"
  340.                   |
  341. :004027AD 686C494600   push 0046496C     ;directly here
  342.  
  343. Well, yes, now it's more than enough, thanks... location
  344. [00454108] seems indeed to be the flag we are searching.
  345. Confirmed. Struck and sunk! Now let's quickly crack Hexworkshop:
  346.  
  347. *** CRACK FOR HEXWORKSHOP VERSION 2.10 by +ORC (January 1997) **
  348. Use hexworkshop itself (no more debug/symdeb, coz we are working
  349. with the overbloated Microsoft monstrosity) and search inside the
  350. code of the copy on your harddisk for the hex sequence:
  351.      08414500
  352. that's the code for our flag_location, duh?
  353.  
  354. ****(a short digression): BE CAREFUL SEARCHING FOR BYTES ***** 
  355. Be careful with instructions you try to search for. You should
  356. only search for instructions that don't change the bytes they
  357. assemble to, depending on their location in memory. For example,
  358. searching for the following instructions presents no problem:
  359. PUSH      DX
  360. POP       [DI+4]
  361. ADD       AX, 100
  362. but searching for the following instructions CAN cause
  363. unpredictable results:
  364. JE        123
  365. CALL      MYFUNC
  366. LOOP      100
  367. **** (end) ********************************* **** **** ****
  368.  
  369. Searching for the byte sequence 08 41 45 00 you will obviously
  370. find the several occurrences of it we have seen before... you
  371. have to modify only one location though, the one followed by the
  372. two bytes
  373. 0F85...  (jne after CALL_NAG)
  374. at the FIFTH (and sixth) position after the search string,
  375. because that's the location we are looking for.
  376. Once you found it, write over the byte
  377. 85
  378. the byte
  379. 84
  380. and now you'll have modified the jne in a (je after CALL_NAG).
  381.      We'll now jump if equal (as all men should be, by the
  382. way)... Look!... no more nagscreens to annoy our proven aesthetic
  383. perception, no more silly protections to blemish our suave future
  384. hexediting around :=)
  385. I almost forgot... that's obviously not enough... you must as
  386. well modify the location at :0040277F
  387.  
  388. :0040277F 0F8528000000   jne 004027AD   ;jump over 'unregistered'
  389. to
  390. :0040277F 0F8428000000   je 004027AD    ;jump equal!
  391.  
  392. in order to have a well cracked copy of our target.
  393.  
  394. [PSP 32]
  395. Can we apply this 'dead listing' approach to other programs? Can
  396. we use the same strategies for other protection schemes?
  397. Sure! Let's remain a little more inside the nagscreens
  398. protections. 
  399.      A logical step, after the invention of the nagscreen itself,
  400. has been the "mingling" of the nagscreen calling routine. In this
  401. kind of protection the nagscreen routines are 'amalgamated' with
  402. other routines, which cannot be skipped as they are essential for
  403. the working of the program. The main disadvantage of this
  404. approach, for the mercantile protectionists, is that they have
  405. therefore to prepare TWO different versions of their programs:
  406. a 'nagscreened' one and a 'clean' one, since else we would
  407. immediately be able to transform the crippled program in a fully
  408. functional one using the same approach they would use to
  409. 'uncripple' it.
  410.      Such mingling is therefore only used by major programs which
  411. are well established on the market and can afford the 'doubled'
  412. approach. This is the case of the last versions of PaintShopPro
  413. (PSP).
  414.      Even in this case, though, we can crack nice enough, as I
  415. will now demonstrate you with PaintShopPro version 3.2 (a 32 bit
  416. program for Windows 95).
  417.      You will probably already possess it, if not find the last
  418. version on the Web -through an Archie search- and download it
  419. -through ftpmail-, Searching the archies will give you something
  420. like this:
  421.  
  422. Host ftp.mds.mdh.se    (130.238.252.239)
  423. Last updated 08:10  4 Dec 1996
  424. Location: /pub/windows/win95/graphic_utils/paintshop
  425. FILE  -rw-r--r--  311542 bytes  15:11 27 Jul 1996  psp32bit.zip
  426.  
  427.      We have seen in the preceding lesson (-> lesson 9.2) how to
  428. disrupt, through the usual Winice 'live' approach, the
  429. PaintShopPro nagscreens for Windows 3.1., cracking the older
  430. versions of this program. Instead we will now try our 'dead
  431. listing' approach for PSP 32 and PSP Version 4.1 (both 32 bit
  432. programs).
  433.      Let's fire PSP32 (I am using here the shareware version with
  434. a PSP.EXE of 1.042.944 bytes, dated 27 December 1995). Let's have
  435. a good look at the nagscreen (snapping it), OK, that's enough.
  436.      Now load the target inside Wdasm32 (I am using here version
  437. 5 of Wdasm, you'll find cracked versions of it everywhere on the
  438. Web).
  439.      As soon as you have the complete (huge) listing of PSP.EXE
  440. use the option "Save disassembly to text file"... you'll get a
  441. huge text file (with 12.590.025 bytes, gosh). 
  442.      Load it inside a (good and quick, i.e. not Microsoft's)
  443. Wordprocessor and let's first of all have a look at the code
  444. preceding and following our nagscreen (at this point -if you are
  445. not completely imbecile- you should already have grasped the
  446. foundation techniques of my "dead listing" cracking approach).
  447.      You will see that in the code of PSP we have a lot of USER
  448. calls. Therefore we cannot use the same easy 'find the caller'
  449. approach used before (more about code mingling later).
  450.      Have a look at the following piece of code (the Stringdata
  451. for the Shareware notice has landed us there) there is a
  452. GetDlgItem(), which is User32.EB and a EnableWindow(), which is
  453. User32.AB.
  454.      GetDlgItem(), as you should know, returns the handle of the
  455. specified ID control (or zero if error). The ID number is the
  456. parameter passed, the returned value is the hdlg (handle of the
  457. dialog box of ID).
  458.  
  459. :0041DB69 891D38A04B00    mov [004BA038], ebx     ;ebx in here
  460. **
  461. :0041DB6F 6A6C             push 6C
  462. :0041DB71 881DF4134C00    mov [004C13F4], bl      ;bl in here **
  463. :0041DB77 56               push esi
  464.  
  465. * Reference To: GetDlgItem, Ord:00EBh in USER32.dll
  466.                                 |
  467. :0041DB78 FF154C5A4C00    call dword ptr [004C5A4C]   ;callnag-1
  468. :0041DB7E 50               push eax
  469.  
  470. * Reference To: EnableWindow, Ord:00ABh in USER32.dll ;callnag-2
  471.                                 |
  472. :0041DB7F FF15DC594C00    call dword ptr [004C59DC]
  473.  
  474. *StringData Ref from Data Obj->"Paint Shop Pro Shareware Notice"
  475.                            |
  476. :0041DB85 6820174C00      push 004C1720
  477. :0041DB8A 56              push esi
  478.  
  479. Now follow me closely:
  480. 1)   Since the following code pushes two locations (one with bx
  481. and the other with bl) just before calling the  GetDlgItem and
  482. EnableWindow routines for the "PaintShopPro Shareware Notice"
  483. Window...
  484. 2)   ...we just need to search these locations ELSEWHERE,
  485. "around" the above section of the code. Let's do it... Searching
  486. the STRING "[004BA038]" we'll fetch inside our wordprocessed
  487. listing two more occurrences: Let's look at the first one: this
  488. piece of code compares to 1 our location just after enabling a
  489. Window:
  490.  
  491. :REFERENCE_1_OF_OUR_[004BA038]
  492. * Reference To: EnableWindow, Ord:00ABh in USER32.dll
  493.                            |
  494. :0041DA41 FF15DC594C00   call dword ptr [004C59DC]
  495. :0041DA47 C605F4134C0002 mov byte ptr [004C13F4],2
  496. :0041DA4E 833D38A04B0001 cmp dword ptr [004BA038],1 ;HERE!! **
  497. :0041DA55 7510           jne 0041DA67 ;and the conditional jump!
  498. :0041DA57 6A00           push 00000000 ;If equal (Zero flag), 
  499. :0041DA59 6A6C           push 0000006C ;push these parameters 
  500. :0041DA5B 6811010000     push 00000111 ;for the PostMessage
  501. :0041DA60 56             push esi     ;function...
  502.  
  503. * Reference To: PostMessageA, Ord:01A3h in USER32.dll
  504.                           |
  505. :0041DA61 FF155C594C00   call dword ptr [004C595C] ;...call)
  506. :0041DA67 B801000000     mov eax, 1        ;our jump here: flag=1
  507. :0041DA6C E9EE030000     jmp 0041DE5F  ;end of code snippet, this
  508.  
  509. jumps to the "popping away" part of the code...
  510. :0041DE5F 5D                  pop ebp
  511. :0041DE60 5F                  pop edi
  512. :0041DE61 5E                  pop esi
  513. :0041DE62 5B                  pop ebx
  514. :0041DE63 81C434050000        add esp, 00000534
  515. :0041DE69 C21000              ret 0010
  516.  
  517.      AhHa! The value 111! (at :0041DA5B). You know what that
  518. means, don't you? For the newbyes among you that don't, learn it
  519. here (the others can skip): 
  520. ************ THE 111 WM_COMMAND RELEVANCE, by +ORC ********
  521. The function PostMessage() has following structure:
  522. PostMessage(HWND hWnd, UINT uMsg, WPARAM wMsgParam1, LPARAM
  523. lMsgParam2)Where hWnd is the receiving Window, UINT is TRUE or
  524. FALSE WPARAM is a 16 bit value and LPARAM a 32 bit one! 
  525. Windows' applications use PostMessage() to deliver WM_Message
  526. requests... and parameter 111 is WM_COMMAND!
  527. Write it on your cracking notes and underline it! 1 is IDOK, 2
  528. is IDCANCEL and 111 is WM_COMMAND.
  529.      WM_COMMAND is extremely important for understanding the
  530. behaviour of the application you want to crack, because the
  531. handler for WM_COMMAND is where that application deals with user
  532. commands, such as menu selctions, dialog push button clicks,
  533. etcetera. In other words all what makes the 'guts' of an
  534. application.
  535.      An application can tell wich command a user gives through
  536. the wParam parameter to the WM_COMMAND message.
  537.      These values are (almost) always part of the application's
  538. menu resources, and it is easy to get the menu ID values through
  539. any utility for resources dumping.
  540. ************ (end) **************
  541.      OK, so the above listed piece of code has a jump over the
  542. PostMessage routine which (probably) disables the nag screen (6C
  543. is the same ID, for both pieces of code we have seen)...let's try
  544. a "weak" crack on it:
  545.  
  546. ***** WEAK CRACK FOR PSP32, by +ORC, January 1997 ********
  547.  
  548. 1)   Use Hexworks32
  549. 2)   Load PSP.EXE
  550. 3)   Search for the bytes sequences of the instructions
  551. :0041DA4E 833D38A04B0001      cmp dword ptr [004BA038],1    
  552. :0041DA55 7510                jne 0041DA67   
  553. which are followed by the pushes:
  554. :0041DA57 6A00                push 00000000 ;zero
  555. :0041DA59 6A6C                push 0000006C ;ID
  556. :0041DA5B 6811010000          push 00000111 ;WM_COMMAND
  557.  
  558. And as a quick crack (but there are more elegant ways) we can
  559. 4) substitute the byte '75' at :0041DA55 with a 74, transforming
  560. the jne in a je, as usual, inverting the jumps. Jump if equal!
  561.  
  562. Since I have been (blandly) critized by fellow scholars for
  563. speaking all the time of more elegant ways and yet presenting
  564.  
  565. only simple ways, here IS a more elegant crack for this code:
  566.  
  567. 4)   Substitute with a new ONE the first TWO instructions:
  568. :0041DA4E 66C70538A04B000100   mov word ptr [004BA038],1
  569. and leave all the rest unchanged:
  570. :0041DA57 6A00                push 00000000 ;zero
  571. :0041DA59 6A6C                push 0000006C ;ID
  572. :0041DA5B 6811010000          push 00000111 ;WM_COMMAND
  573. *****************************
  574. As you can see, we have just moved the flag '1' inside our
  575. location, instead of comparing and jumping away as in the
  576. original code and in the quickly cracked one. Estilo muchissimo
  577. elegante.
  578.  
  579. Since this lesson was thought as +HCU material, here is the
  580. result of the work on it made by (some of) my students:
  581.  
  582. JANUARY 1997: THIS PART OF LESSON 9.3 HAS BEEN MODIFIED (OR
  583. ADDED) BY THE +HCU STUDENTS OF UNIT 4
  584.  
  585.  Let's finish our cracking of the nagscreens of the
  586. whole PaintShopPro family with version 4.1, which is the most
  587. recentwe know of. 
  588. I am using here PSP.EXE 1.151.488 bytes from 1 Sep 1996, fetch
  589. it through the archies.
  590. We will crack this shareware program BETTER than the registered
  591. version, since we will completely eliminate any nagscreen and
  592. we'll not ever have the welcome screen that REMAINS inside the
  593. registered version. We'll do this 'in a hurry', since it is not
  594. +ORC speaking, but some of his students... you already know
  595. enough about the 'dead listing' method to be able to follow. No
  596. Winice in our hands, Ladies and Gentleman, We never used it on
  597. this program. (Well... we actually did, before reading 9.3, but
  598. it brought us nowhere, for this crack we (almost) DID NOT,
  599. following +his instructions)
  600. 1) Get the 'dead listing' of psp.exe (it's huge)
  601. 2) Load it inside a fast wordprocessor
  602. 3) Find the string 'Purchasing' at :00406710
  603. 4) short after 'Purchasing' the only location compared and loaded
  604. is location [004BC218]. Let's call it 'BINGO' and let's hope
  605. it'll work.
  606. 5) this location is handled inside a small part of the code
  607. :00406290 to :004067B5, this reduces the more than one million
  608. bytes to 1317 bytes we'll have to examine, not bad.
  609. 6) Let's print this nagging part of the code and let's feel it
  610. a little
  611. 7) Let's see the possible cracks we could think of (we repeat,
  612. here is not +ORC's but his students at work, we are not perfect).
  613. You'll see this piece of code
  614. :FIRST_ATTEMPT (NOT SO GOOD)
  615. :004065D0 50                  push eax
  616. :004065D1 64892500000000      mov fs:[00000000], esp
  617. :004065D8 81ECB4000000        sub esp, 000000B4
  618. :004065DE 833D18C24B0000      cmp dword ptr [004BC218], 0 ;Is
  619. BINGO zero?
  620. :004065E5 56                  push esi
  621. :004065E6 57                  push edi
  622. :004065E7 0F85A0010000        jne 0040678D ;not really
  623. this is 'pentium optimised' code, with a couple of pushes
  624. 'inside' the two logically consecutive instructions following the
  625. double 80586 fetching... on a 80486 you would have had:
  626. push esi; push edi; cmp dword ptr [004BC218], 0; jne 0040678D
  627. We may just try substituting a 0F84 at :004065E7 (that is a jump
  628. equal instead of the jne) and BOUM! We get an 'inamovible'
  629. nagscreen, No way to click it away, it covers the main program
  630. PaintShopPro for the eternity. This confirms that we are on the
  631. right track (it's a green light). Uncrack the code (or reload the
  632. original nagged program). Now look here:
  633. :SECOND_ATTEMPT (NOT SO GOOD)
  634. :00406495 E95AEA0900         jmp 004A4EF4
  635. :0040649A 33F6               xor esi, esi
  636. :0040649C C745FCFFFFFFFF     mov [ebp-04], FFFFFFFF
  637. :004064A3 893518C24B00       mov [004BC218], esi ;load esi in
  638. BINGO
  639. Since :00406495 jumps away, it would be interesting to know who
  640. the cuckoos lands at :0040649A. You'll quickly discover that
  641. there are two jumps in this area. One 'xores' the esi before
  642. loading it in our location, the other one does not:
  643. :0040641C 747C       je 0040649A        ;xores esi
  644. :0040646F EB2B       jmp 0040649C  ;does not xore esi
  645. So you may be tempted to try 'ça passe ou ça casse' following
  646. cracks:
  647. :0040641C 747E       je 0040649C  ;no xoring even if it should
  648. (THIS DOES NOT CHANGE ANYTHING)
  649. :0040646F EB19       jmp 0040649A ; xoring even if it should not
  650. (THIS CRASHES)
  651. Bad score: a frozen nagscreen, a nothing and a crash. Three to
  652. zero for our enemies. Let's look a little more around our 1317
  653. bytes listing.
  654.  
  655. Well, what else?
  656. The following code refers THREE TIMES to our location, that's a
  657. lot, let's hope it does not suck:
  658. :THREE_SISTER_BINGOS
  659. :00406547 33C0            xor eax, eax  ;xor
  660. :00406549 85C0            test eax, eax ;test ax
  661. :0040654B 7513            jne 00406560 ;don't move in cx
  662. :0040654D 8B0D18C24B00 1! mov ecx, [004BC218] ;move in cx
  663. :00406553 85C9            test ecx, ecx ;test cx
  664. :00406555 7418            je 0040656F  ;don't call Updatewin
  665. :00406557 6A01            push 1
  666. :00406559 8B01            mov eax, [ecx] ;move cx in ax
  667. :0040655B FF5004          call [eax+04]  ;and call here
  668. :0040655E EB0F            jmp 0040656F   ;don't call Updatewin
  669. :00406560 A118C24B00  2!  mov eax, [004BC218]  ;move in ax soon
  670. :00406565 8B4820          mov ecx, [eax+20]
  671. :00406568 51              push ecx
  672. :00406569 FF15C4014C00 call dword ptr [004C01C4] ;call
  673. Updatewindow
  674. :0040656F 6A00            push 0
  675. :00406571 A118C24B00  3!  mov eax, [004BC218]  ;move in ax later
  676.  
  677. Well, something fishy here, don't you feel it? Who comes in here?
  678. >From where? Let's have a GOOD look at the 'preamble', i.e. the
  679. part of the code that 'switches' to our THREE_SISTER_BINGOS block
  680. above:
  681. :PREAMBLE_TO_THREE_SISTER_BINGOS
  682. :004064DD FF15BCF24B00    call dword ptr [004BF2BC] ;check this
  683. loc
  684. :004064E3 85C0            test eax, eax       ;test
  685. :004064E5 744E            je 00406535              ;zero, go 6535
  686. :004064E7 B896000000      mov eax, 96              ;load par 96
  687. :004064EC 3945E0          cmp [ebp-20], eax     ;compare this
  688. :004064EF 7C44            jl 00406535              ;lower, go
  689. 6535
  690. :004064F1 3945E4          cmp [ebp-1C], eax     ;compare that
  691. :004064F4 7C3F            jl 00406535             ;lower, go 6535
  692. :004064F6 8B4508          mov eax, [ebp+08]     ;load this
  693. :004064F9 85C0            test eax, eax         ;test it
  694. :004064FB 7504            jne 00406501          ;do not xor
  695. and...
  696. :004064FD 33C0            xor eax, eax          ;xor and
  697. :004064FF EB03            jmp 00406504          ;do not
  698. :00406501 8B4020          mov eax, [eax+20]     ;...load this
  699. :00406504 6A00            push 0                ;push
  700. :00406506 8B4DE0          mov ecx, [ebp-20]     ;load ecx
  701. :00406509 6A00            push 0                  ;push
  702.  
  703. Let's have a look at the 6535 routine of the switch PREAMBLE:
  704. :00406535 E836560100       call 0041BB70
  705. and
  706. :41BB70 A118C34B00         mov eax, [004BC318]
  707. :41BB75 85C0               test eax, eax
  708. :41BB77 7407               je 0041BB80
  709. :41BB79 50                 push eax
  710. :41BB7A FF1530F54B00       call dword ptr [004BF530] ;globalFree
  711. :41BB80 C70518C34B00       mov dword ptr [004BC318], 0
  712. :41BB8A C3                 ret
  713.  
  714. Well, let's try along, what happen if we substitute a ret at
  715. :00406535?
  716. :00406535 C390909090     ret and nops
  717. Nothing at all.
  718. And what if we substitute here
  719. :004064F6 8B4508                  mov eax, [ebp+08]
  720. :004064F9 85C0                    test eax, eax
  721. :004064FB 7504                    jne 00406501
  722. :004064FD 33C0                    xor eax, eax
  723. :004064FF EB03                    jmp 00406504
  724. :00406501 8B4020                  mov eax, [eax+20]
  725. :00406504 6A00                    push 00000000
  726. ... the instruction
  727. :004064FB 7504                    jne 00406501
  728. with the instruction 7500 (or 90 90)?
  729. MOST BRILLIANT!
  730. Now we XOR ANYWAY THIS AX without caring for ax+20. The nagscreen
  731. is defeated? Not really... the nagscreen has been passed ON THE
  732. BACKGROUND, where it still remains when you shut the 'main'
  733. window of the program... the nag protection is somewhere there,
  734. looking at us square in the faces... but where?
  735. +gthorne here: since i had already seen the production version
  736. of paint shop pro, i realized that it also had a nag screen - not
  737. per se, but a splash screen (the very same screen without the
  738. buttons to push and the 'number of days elapsed' warning). what
  739. this means is that it is very possible that the screen
  740. (regardless of what version we are running) could be intermingled
  741. with the rest of the code, and not fully existing within a 
  742. call. This does not proved it, just allowed the possibility.
  743.  
  744. Poking around, and being playful, i fired up snap32 and grabbed
  745. the nagscreen window and saved it for future reference.
  746.  
  747. The next thing i did was check into the help screen area of Paint
  748. Shop Pro. Often in shareware programs there is a HELP ABOUT, or
  749. a HELP REGISTER section. Sometimes those places give away good
  750. info needed (or just plain useful) in the crack routine.
  751.  
  752. Something that stood out in the help area was the paint shop pro
  753. version statement. It seemed to be identical to the printed
  754. version as seen on the nag screen. That means one of two things:
  755. either the version number string was just typed in twice, or more
  756. likely, just another call to a function: PSP_VERSION() or
  757. somesuch.
  758.  
  759. What that means for the crackist should be pretty clearly a way
  760. to locate the protection routine. Since the word SHAREWARE shows
  761. up in both version calls, it can be scanned for pretty easily
  762. with either that or the word VERSION itself.
  763.             
  764. Then, once i felt i had done enough scouting the territory, I ran
  765. WDASM and grabbed myself a dead listing. Scanning for SHAREWARE,
  766. I found a couple easy references to it... one being a data string
  767. that I promptly blanked out and the other being in the text that
  768. comes up on the nagscreen itself. WELL WELL... 
  769.  
  770.   This is the nagscreen result here:
  771.  
  772. * StringData Ref from Data Obj ->"This is a shareware version 
  773.                                 of "Paint Shop Pro."
  774.                                   |
  775. :00406B64 6810A34B00              push 004BA310
  776. :00406B69 8D4DEC                  lea ecx, [ebp-14]
  777.  
  778. Okay, running the program again, and firing softice (old friend)
  779. i immediately saw that the version checking routine no longer
  780. tacked on the word SHAREWARE in either the nagscreen or in the
  781. help box.. thus proving the version call to be just that.. a call
  782. (as suspected).
  783.  
  784. Immediately, something else came up that I was not expecting, the
  785. location of most of the program in memory was exactly the same
  786. as seen with softice that it was hardcoded into the disassembly.
  787. What i mean by that is that where softice was reporting
  788. 0137:0043FAD1 for a location in memory, identical data was
  789. reported at location :0043FAD1 on the disassembly.
  790.  
  791. Now, talk about convenient!
  792.  
  793. Simply enough, i breakpointed in softice with a few locations i
  794. had located in the disassembly, and voila... landed smack in the
  795. middle of the nagscreen data.
  796.  
  797. It was do-able with soft-ice alone, but tracing into the maze of
  798. nested calls in PSP really wasn't worth my time.
  799.  
  800. Line-by-line'ing it, it was simple to watch the nagscreen build
  801. itself call by call, and NOP or alter JZ's & JNZ's to JMP's (74's
  802. and 75's become EB's) so that the nagscreen lost more and more
  803. functionality.
  804.  
  805. Then came a little work - not too much, but some things were a
  806. little funny. Notice the BITBLT in the nagscreen creation code.
  807. I had tried to scan for some of the standard SHOWWINDOW calls
  808. with softice and in the disassembly, but not one was to be found
  809. where it needed to be. Apparently PSP was using some other method
  810. of showing the screen... and a simple graphics memory copy (known
  811. to those who follow Micro$oft as a BitBlt) was apparently the
  812. modus operandi.
  813.  
  814. Some of the text was already in place before the BitBlt, so here
  815. is our reason that some of the nagscreen was not being done as
  816. we watched with the debugger... it was being written to a
  817. backbuffer before being copied as a whole window before being
  818. blitted to the screen. This, for those of you new to graphics
  819. programming, is how people make smooth animation that does not
  820. flicker... all of the animating is done in the background and a
  821. whole screen is blitted at one time rather than by bits and
  822. pieces (you can tell which programs do not do this very easily
  823. since they have images that seem to disappear or flicker wrong
  824. in odd places on the screen)
  825.  
  826. There were not many calls in that area, and only the ones that 
  827. referenced string data or the bitblt itself could be effectively
  828. nop'ed out.
  829.  
  830. Here is where i basically stopped the work, since i was having
  831. trouble locating what CALLED the nagscreen area.
  832.  
  833. The reason we are getting the ghost window in the back (notice
  834. it's size is EXACTLY the same as the nagscreen, is that windows
  835. is being instructed by some window create command to block off
  836. the rectangular space for the screen even though the graphic
  837. interior does not get written.
  838.  
  839. The backgrounding code is invaluable here since the ghost window 
  840. does not have a way to be removed without paint shop pro closing 
  841. (which cleans up nicely for itself on exit).
  842.  
  843. Now we need to locate the call that creates the window in the
  844. first place and nop it or whatever... there is probably a nicer
  845. way to do all this (if you work at it, you can probably jmp past
  846. all the functions i nop'd - taking care not to leave unmatched
  847. pushes or pops which ruin the flow of the program - at some point
  848. in the nagscreen area
  849.  
  850. The funny part of all this is that our cracked version will be
  851. better than the registered version since the registered version
  852. has a splash screen anyway - and ours does not :)
  853.  
  854. Using all of this knowledge later can actually benefit us in a
  855. different way... we can actually use all of the techniques (since
  856. we already know where the nagscreen is) on the executable of the
  857. full version as well. 
  858. Since it has no nag functions, it is a smaller executable and
  859. cracking it will give is a nagless, splashless (eg. screenless)
  860. version of paint shop pro that is smaller (i.e. better and more
  861. functional) than by just cracking the shareware version.
  862.  
  863. I find that funny somehow :)
  864.  
  865. So here is all the rest you need: 
  866.  
  867. Let's have a look at the VERSION subroutine that is called both
  868. in the nagscreen and the HELP screen:
  869.  
  870. * StringData Ref from Data Obj ->"4" ;FIRST DIGIT OF VERSION 4.01
  871.                                   |
  872. :004350E4 6874AE4B00              push 004BAE74
  873. :004350E9 8B3D90004C00            mov edi, [004C0090]
  874. :004350EF C645FC07                mov [ebp-04], 07
  875. :004350F3 C706F0A54A00            mov dword ptr [esi], 004AA5F0
  876. :004350F9 FFD7                    call edi
  877. :004350FB 83C404                  add esp, 00000004
  878. :004350FE 8BD8                    mov ebx, eax
  879. :00435100 C1E310                  shl ebx, 10
  880.  
  881. * StringData Ref from Data Obj ->"0"    ;SECOND DIGIT OF 4.01
  882.                                   |
  883. :00435103 6860A64B00              push 004BA660
  884. :00435108 FFD7                    call edi
  885. :0043510A 83C404                  add esp, 00000004
  886. :0043510D 0BD8                    or ebx, eax
  887. :0043510F C1E308                  shl ebx, 08
  888.  
  889. * StringData Ref from Data Obj ->"1"   ;THIRD DIGIT OF 4.01
  890.                                   |
  891. :00435112 685CA64B00              push 004BA65C
  892. :00435117 FFD7                    call edi
  893. :00435119 C1E010                  shl eax, 10
  894. :0043511C 83C404                  add esp, 00000004
  895. :0043511F 0BD8                    or ebx, eax
  896.  
  897. * Possible StringData Ref from Data Obj ->"2"
  898.                                   |
  899. :00435121 68C4A14B00              push 004BA1C4
  900. :00435126 FFD7                    call edi
  901. :00435128 83C404                  add esp, 00000004
  902. :0043512B 0BD8                    or ebx, eax
  903. :0043512D 899ED4000000            mov [esi-000000D4], ebx
  904.  
  905. * Possible StringData Ref from Data Obj ->"0"
  906.                                   |
  907. :00435133 6860A64B00              push 004BA660
  908. :00435138 FFD7                    call edi
  909. :0043513A 83C404                  add esp, 00000004
  910. :0043513D 50                      push eax
  911.  
  912. * Possible StringData Ref from Data Obj ->"1"
  913.                                   |
  914. :0043513E 685CA64B00              push 004BA65C
  915. :00435143 FFD7                    call edi
  916. :00435145 83C404                  add esp, 00000004
  917. :00435148 50                      push eax
  918.  
  919. * Possible StringData Ref from Data Obj ->"4"
  920.                                   |
  921. :00435149 6874AE4B00              push 004BAE74
  922. :0043514E FFD7                    call edi
  923. :00435150 83C404                  add esp, 00000004
  924. :00435153 50                      push eax
  925.  
  926. * Ref from Data Obj ->"%i.%i%i"  ;PRINT 3 INTEGERS: N.NN (4.01)
  927.                                   |
  928. :00435154 686CAE4B00              push 004BAE6C
  929. :00435159 8D86CC000000            lea eax, [esi-000000CC]
  930. :0043515F 50                      push eax
  931.  
  932. * Reference To: n/a, Ord:09A7h in MFC40.DLL
  933.                                   |
  934. :00435160 E815FF0600              call 004A507A
  935. :00435165 83C414                  add esp, 00000014
  936. :00435168 8D8ECC000000            lea ecx, [esi-000000CC]
  937.  
  938. * StringData Ref from Data Obj ->" Shareware"  ;PRINT SHAREWARE
  939.                                   |
  940. :0043516E 6860AE4B00              push 004BAE60
  941.  
  942. The first BitBlt routine of the program puts the screen on!
  943.  
  944. it is at:
  945.  
  946. * Reference To: BitBlt, Ord:000Ah in GDI32.dll
  947.                                   |
  948. :00406917 FF15B4F24B00            call dword ptr [004BF2B4]
  949. :0040691D B800000000              mov eax, 00000000
  950. :00406922 85FF                    test edi, edi
  951. :00406924 7403                    je 00406929
  952. :00406926 8B4704                  mov eax, [edi+04]
  953. :00406929 50                      push eax
  954. :0040692A 8B45B4                  mov eax, [ebp-4C]
  955. :0040692D 50                      push eax
  956.  
  957. and here some other annoying pieces of code: The red bar as soon
  958. as you use the program more than 30 days...
  959.  
  960. * Reference To: n/a, Ord:0970h in MFC40.DLL
  961.                                   |
  962. :00406BE3 E836E60900    call 004A521E ;DRAW RED BAR
  963. :00406BE8 6801080000    push 00000801
  964. :00406BED 8D45A0        lea eax, [ebp-60]
  965. :00406BF0 50            push eax
  966. :00406BF1 8B4DEC        mov ecx, [ebp-14]
  967. :00406BF4 8B853CFFFFFF  mov eax, [ebp-000000C4]
  968. :00406BFA 8B51F8        mov edx, [ecx-08]
  969. :00406BFD 52            push edx
  970. :00406BFE 51            push ecx
  971. :00406BFF 8D8D3CFFFFFF  lea ecx, [ebp-000000C4]
  972. :00406C05 FF5070        call [eax+70] ;BOTTOM WINDOW TXT+RED BAR
  973. :00406C08 53            push ebx
  974. :00406C09 8D8D3CFFFFFF  lea ecx, [ebp-000000C4]
  975.  
  976. Once found all the above, the rest is pretty obvious... here all
  977. the necessary crackcodes: bytes to find and change. This is a
  978. weird, non-elegant crack, but kinda funny, so i had to write it
  979. down until i discover a better one (+gthorne speaking) note:
  980. i gave good search strings so lamers don't get confused with
  981. similar patterns in the software:
  982.  
  983. 8B450885C07504 to 8B450885C07500 -  screen backgrounding
  984. 3CFFFFFFFF5070 to 3CFFFFFF750090 - do not draw lower text in box
  985. 3CFFFFFFFF5064 to 3CFFFFFFEB0090 - do not report version number
  986. 83FF1E7E1E to 83FF1EEB1E         - do not draw red bar
  987. 000083FFC07403 to 000083FFC0EB03 - turn nagscreen invisible
  988. 53686172657761726500 to 20202020202020202000 - disable shareware
  989. notice writing phisycally some spaces over it
  990.  
  991. final note: since psp closes the nagscreen when the program
  992. exits, all is now cleaned up.
  993.  
  994.  FF15B4F24B00 to 750090750090 (bitblt) seems to not do anything
  995. the above cracks dont do.
  996.  
  997.  Time to explain BitBlt... isn 't it? BitBlt copies
  998. a bitmap from the device context sopecified by hdcSource to the
  999. device context specified by hdcTarget performing a block copy.
  1000. On success the function returns not zero. 
  1001. It is called with the handle hdcTarget, int nTargetX and nTArgetY
  1002. (upper left coordinates of the point at which the bitmap will be
  1003. copied... a 'pixel point' locator may be very useful in our
  1004. trade) int nWidth and nHeight of the region, the handle hdcSource
  1005. and then, finally the upper left coordinates IN the bitmap, the
  1006. two int nSourceX and nSourcey. Is it all? NO! The final
  1007. parameter, DWORD dwRaster determines HOW the bit-by-bit contents
  1008. of the bitmap will actually be copied (black, inverted, ANDed,
  1009. ORed, XOred...etc.).
  1010.  
  1011. Lotta things to learn if you want to crack a lot...
  1012. THE STUDENTS OF UNIT 4 (+HCU, January 1997)
  1013. *******************************************
  1014.  
  1015. As a matter of fact both cracks here, mine for PSPS32 and my
  1016. student's VERY smart one for PSP41 are 'weak', though: they will
  1017. not eliminate the nagscreen (you should search for the remaining
  1018. occurrences of our locations and work from them inwards, if you
  1019. really want to crack completely this scheme, but in this case it
  1020. would be better to work more with Winice95, in my opinion. But
  1021. I hope I have made the point about "dead listing" cracking: It
  1022. works! Quick and placid! In the PSP32 case the protection will
  1023. still show you the nagscreen, which will "automatically"
  1024. disappear, though, leaving you with no annoyance (in nuce: you
  1025. cracked the return button), in the other case you have physically
  1026. eliminated all possible annoyances. The nagscreen is still there,
  1027. but it does not 'harm' you any more.
  1028. Anyway I wanted only to show you the POWER and the CHILD'S PLAY
  1029. working of this "dead listing" approach (that you may combine
  1030. with some quick winice probes if you really think you need it
  1031. anytime).
  1032.      You'll agree with me, though, that this quick "weak" crack,
  1033. made with the "dead listing" method is far less tiresome than a
  1034. 'live' crack with our beloved SoftIce/WinIce.
  1035.      Now, in life, I believe, you should always search to obtain
  1036. the maximum giving the minimum. There is no point in being
  1037. altruistic or excessively honest in a society where the tiny
  1038. minority that profits most keeps getting richer and richer and
  1039. the overwhelming majority that lives with meager earnings keeps
  1040. getting poorer and poorer (and -moronized by TV-watching and
  1041. other Pavlovian propagandistic sources of misinformation- keeps
  1042. voting the same rich bastards that keep it enslaved under the
  1043. whips of publicity, as if the slaves of ancient Egypt would
  1044. happily vote for their Pharaohs). I abhor and despise the society
  1045. I am compelled to live in... but this does not mean that I
  1046. renounce to anything. I am (pretty) rich, (yet do not exploit
  1047. anybody), eat very well, have a big nice house with all the
  1048. useless objects and cars and garages and terraces and futile
  1049. gadgets you are supposed to enjoy in this moronic society (I
  1050. enjoy foremost my spacious library) and I drink my regular bottle
  1051. of (Moskowskaja) Wodka every week. My liver (and my nice family)
  1052. do not seem to complain :=)
  1053.  
  1054. Well, that's it for this lesson, reader. Not all lessons of my
  1055. tutorial are or will be on the Web.
  1056.      You'll obtain the missing lessons IF AND ONLY IF you mail
  1057. me back (via anon.penet.fi) with some tricks of the trade I may
  1058. not know that YOU discovered. Mostly I'll actually know them
  1059. already, but if they are really new you'll be given full credit,
  1060. and even if they are not, should I judge that you "rediscovered"
  1061. them with your work, or that you actually did good work on them,
  1062. I'll send you the remaining lessons nevertheless. Your
  1063. suggestions and critics on the whole crap I wrote are also
  1064. welcomed. Do not annoy me with requests for warez, everything is
  1065. on the Web, learn how to search, for goddess sake.
  1066.  
  1067.      "If you give a man a crack he'll be hungry again
  1068.      tomorrow, but if you teach him how to crack, he'll
  1069.      never be hungry again"
  1070.                    
  1071.      ****** A gift from cRc to The Sandman ******
  1072.  
  1073.                 ( crc__98@yahoo.com )