home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Code Inside / Tut6.txt < prev    next >
Encoding:
Text File  |  2001-09-21  |  29.7 KB  |  508 lines

  1. ********************************************************************************************************************************************************************************************************************
  2.                     Winzip V8.0
  3. ********************************************************************************************************************************************************************************************************************
  4.  
  5. Author:        Nico Mak Computing
  6. Protection:    Name / Serial
  7. URL:        http://www.winzip.com/getsite.cgi?winzip80.exe
  8. Tools:        SoftICE 4.05
  9.         Hex-Editor
  10.  
  11.  
  12. --->    Intro...
  13.  
  14. Hi, welcome to my next tutorial about Winzip :)
  15. I know that there are a million of Cracks, Patches, KeyGen's, Tutorials outthere about Winzip but i just want to make one my own :)
  16. Ok, first im just gonna "sniff the serial" and then i'll patch it in some different way :) I'm trying to tell it very detailed.
  17. Oh btw, Thanks "Borna Janes" for his tutorial about Winzip because he told that there were 2 ways Winzip is creating a Serial.
  18. I've never saw the second Serial Algo because i saw the first and that was enough :), anyway i'll explain the second also.
  19.  
  20.  
  21. --->    Let's Begin...          *** Serial Sniffing Method ***
  22.  
  23. Ok, start the program and you'll notice some kind of NAG saying that you must register the
  24. software, so click on "Enter Registration Code..." and you'll see a new window asking us for
  25. a Name and Serial i used this:
  26.  
  27.  
  28. Name:        CoDe_InSiDe
  29. Serial:        1234567890
  30.  
  31.  
  32. Ok, now get into SoftICE (CTRL+D) and type "bpx hmemcpy" , i almost always use this as it almost always breaks :)
  33. But you can also type "bpx GetDlgItemTextA" and press enter, then out of SoftICE (CTRL+D) and press "Ok" and SoftICE pops up.
  34. Now press (F11) or (F12) and we're in the Winzip code and you'll see this:
  35.  
  36. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  37.  
  38. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  39. |:00407ED0(C)
  40. |
  41. :00407F5F BF78CD4800              mov edi, 0048CD78            <--- EDI holds the offset for our name
  42. :00407F64 6A29                    push 00000029                <--- Maximum string length that'll be copied from our name
  43. :00407F66 57                      push edi
  44.  
  45. * Possible Reference to Dialog: DialogID_0C82, CONTROL_ID:0C80, ""
  46.                                   |
  47. :00407F67 68800C0000              push 00000C80
  48. :00407F6C 53                      push ebx
  49.  
  50. * Reference To: USER32.GetDlgItemTextA, Ord:0104h
  51.                                   |
  52. :00407F6D FF1528744700            Call dword ptr [00477428]
  53. :00407F73 57                      push edi                <--- HERE WE LAND AFTER THE BREAK !!!
  54. :00407F74 E821790300              call 0043F89A                <--- Checking routine 1
  55. :00407F79 57                      push edi
  56. :00407F7A E844790300              call 0043F8C3                <--- Checking routine 2
  57. :00407F7F 59                      pop ecx
  58. :00407F80 BEA4CD4800              mov esi, 0048CDA4            <--- ESI holds the offset for our "fake" serial
  59. :00407F85 59                      pop ecx
  60. :00407F86 6A0B                    push 0000000B                <--- Maximum string length that'll be copied from our "fake" serial
  61. :00407F88 56                      push esi
  62.  
  63. * Possible Reference to Dialog: DialogID_0C82, CONTROL_ID:0C81, ""
  64.                                   |
  65. :00407F89 68810C0000              push 00000C81
  66. :00407F8E 53                      push ebx
  67.  
  68. * Reference To: USER32.GetDlgItemTextA, Ord:0104h
  69.                                   |
  70. :00407F8F FF1528744700            Call dword ptr [00477428]
  71. :00407F95 56                      push esi
  72. :00407F96 E8FF780300              call 0043F89A                <--- Checking routine 1
  73. :00407F9B 56                      push esi
  74. :00407F9C E822790300              call 0043F8C3                <--- Checking routine 2
  75.  
  76. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  77.  
  78. Ok, so here it just takes the Name and Serial we entered and Checked it. Let's see what it checks, Checking Routine 1:
  79.  
  80. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  81.  
  82. :0043F89A 55                      push ebp
  83. :0043F89B 8BEC                    mov ebp, esp
  84. :0043F89D 56                      push esi
  85. :0043F89E 8B7508                  mov esi, dword ptr [ebp+08]        <--- Offset for our Name in moved in ESI
  86. :0043F8A1 56                      push esi
  87. :0043F8A2 E869820200              call 00467B10                <--- Here it gets the length of our Name
  88. :0043F8A7 803E00                  cmp byte ptr [esi], 00        <--- Compare first Char with 00 (checks if we really entered something)
  89. :0043F8AA 59                      pop ecx
  90. :0043F8AB 8D4430FF                lea eax, dword ptr [eax+esi-01]    <--- EAX now points to our last Char
  91. :0043F8AF 740F                    je 0043F8C0                <--- If first Char 00 jump to end, if not continue
  92.  
  93. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  94. |:0043F8BE(U)
  95. |
  96. :0043F8B1 803820                  cmp byte ptr [eax], 20        <--- Compare last char with 20 (space)
  97. :0043F8B4 750A                    jne 0043F8C0                <--- If not equal go to end, else continue
  98. :0043F8B6 3BC6                    cmp eax, esi                <--- Compare ESI (which holds the offset of the beginning of our Name) with EAX (which holds the offset of the end of our Name)
  99. :0043F8B8 7206                    jb 0043F8C0                <--- Jump if EAX is lower, if not continue
  100. :0043F8BA 802000                  and byte ptr [eax], 00        <--- Replace the 20 (space) with 00
  101. :0043F8BD 48                      dec eax                <--- EAX -1
  102. :0043F8BE EBF1                    jmp 0043F8B1                <--- Repeat loop
  103.  
  104. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  105. |:0043F8AF(C), :0043F8B4(C), :0043F8B8(C)
  106. |
  107. :0043F8C0 5E                      pop esi
  108. :0043F8C1 5D                      pop ebp
  109. :0043F8C2 C3                      ret
  110.  
  111. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  112.  
  113. Ok, this is not so difficult what it actually does is:
  114. It checks if we really entered something and then it checks if the last Char is a space (20), if so replace it with 00 (nothing), then it checks the Char before the last Char if its a space (20)
  115. Replace it with 00 (nothing) and so on...
  116. If my Name would be:
  117.  
  118. "CoDe_InSiDe     "    <--- 5 spaces, then it'll change to:
  119. "CoDe_InSiDe"        <--- 0 spaces
  120.  
  121. Ok, so let's see what the next check does, Checking Routine 2:
  122.  
  123. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  124.  
  125. :0043F8C3 55                      push ebp
  126. :0043F8C4 8BEC                    mov ebp, esp
  127. :0043F8C6 8B5508                  mov edx, dword ptr [ebp+08]        <--- Offset for our Name is moved in EDX
  128. :0043F8C9 803A20                  cmp byte ptr [edx], 20        <--- Compare first Char with 20 (space)
  129. :0043F8CC 7517                    jne 0043F8E5                <--- If not equal go to end, else continue
  130. :0043F8CE 8BCA                    mov ecx, edx                <--- Move the offset for our Name in ECX
  131.  
  132. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  133. |:0043F8D4(C)
  134. |
  135. :0043F8D0 41                      inc ecx                <--- ECX +1
  136. :0043F8D1 803920                  cmp byte ptr [ecx], 20        <--- Compare next Char with 20 (space)
  137. :0043F8D4 74FA                    je 0043F8D0                <--- If equal repeat this loop, else continue
  138.  
  139. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  140. |:0043F8E0(U)
  141. |
  142. :0043F8D6 8A01                    mov al, byte ptr [ecx]        <--- Move one byte from ECX in AL
  143. :0043F8D8 84C0                    test al, al                <--- Test if AL is 00
  144. :0043F8DA 7406                    je 0043F8E2                <--- if so jump, else continue
  145. :0043F8DC 8802                    mov byte ptr [edx], al        <--- Move AL in EDX
  146. :0043F8DE 42                      inc edx                <--- EDX +1
  147. :0043F8DF 41                      inc ecx                <--- ECX +1
  148. :0043F8E0 EBF4                    jmp 0043F8D6                <--- Repeat loop
  149.  
  150. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  151. |:0043F8DA(C)
  152. |
  153. :0043F8E2 802200                  and byte ptr [edx], 00        <--- Replace the byte in EDX with 00
  154.  
  155. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  156. |:0043F8CC(C)
  157. |
  158. :0043F8E5 5D                      pop ebp
  159. :0043F8E6 C3                      ret
  160.  
  161. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  162.  
  163. Ok, so it actually does this:
  164. It checks if the first Char is a 20 (space) if so then it checks the next Char with 20 (space) and repeat this, then all these spaces will be replaced with our Name...
  165. look at the example:
  166.  
  167. "     CoDe_InSiDe"    <--- 5 spaces, then it'll change to:
  168. "CoDe_InSiDe"        <--- 0 spaces
  169.  
  170. I think that Winzip doesn't like spaces :)
  171. ok, so these are the checking routines let's see what's after the second Checking Routine 2:
  172.  
  173. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  174.  
  175. :00407FA1 803D78CD480000          cmp byte ptr [0048CD78], 00        <--- Checks again if we entered something as our Name
  176. :00407FA8 59                      pop ecx
  177. :00407FA9 59                      pop ecx
  178. :00407FAA 7459                    je 00408005                <--- If equal jump to Bad Guy, else continue
  179. :00407FAC 803DA4CD480000          cmp byte ptr [0048CDA4], 00        <--- Checks again if we entered something as our Serial
  180. :00407FB3 7450                    je 00408005                <--- If equal jump to Bad Guy, else continue
  181. :00407FB5 E81BFAFFFF              call 004079D5                <--- STEP INTO THIS CALL !!!
  182. :00407FBA 85C0                    test eax, eax                <--- Test if EAX is 00
  183. :00407FBC 7447                    je 00408005                <--- If equal jump to Bad Guy, else continue
  184.  
  185. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  186.  
  187. Ok, so here it checks again if we entered something now get into the CALL at offset 00407FB5.
  188. And you'll see this:
  189.  
  190. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  191.  
  192. :004079D5 55                      push ebp
  193. :004079D6 8BEC                    mov ebp, esp
  194. :004079D8 81EC08020000            sub esp, 00000208
  195. :004079DE 53                      push ebx
  196. :004079DF 56                      push esi
  197. :004079E0 33F6                    xor esi, esi
  198. :004079E2 803D78CD480000          cmp byte ptr [0048CD78], 00        <--- Checks again if we entered something, you can't check enough... :)
  199. :004079E9 57                      push edi
  200. :004079EA 0F849A000000            je 00407A8A                <--- If equal jump to the end and xors EAX so that we fail and get the Bad Guy message
  201. :004079F0 8D45EC                  lea eax, dword ptr [ebp-14]
  202. :004079F3 50                      push eax
  203.  
  204. * Possible StringData Ref from Data Obj ->"c"
  205.                                   |
  206. :004079F4 6868E34700              push 0047E368                <--- This points to a weird set of Characters
  207. :004079F9 E8AE9DFFFF              call 004017AC                <--- In here it generates "MuradMeraly" from the weird set of Characters and puts it in Memory
  208. :004079FE 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  209. :00407A04 BF78CD4800              mov edi, 0048CD78            <--- EDI now holds the offset for our Name
  210. :00407A09 50                      push eax
  211. :00407A0A 57                      push edi
  212. :00407A0B E89B020000              call 00407CAB                <--- In here it puts our Name (without any spaces or weird Characters) in Memory
  213. :00407A10 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  214. :00407A16 50                      push eax
  215. :00407A17 8D45EC                  lea eax, dword ptr [ebp-14]
  216. :00407A1A 50                      push eax
  217. :00407A1B E8B0180600              call 004692D0                <--- And here it Compares "MuradMeraly" with our Name
  218. :00407A20 83C418                  add esp, 00000018
  219. :00407A23 85C0                    test eax, eax                <--- Test if EAX is 00
  220. :00407A25 6A01                    push 00000001                <--- Push 00000001 into Stackdump
  221. :00407A27 5B                      pop ebx                <--- Pop 00000001 in EBX
  222. :00407A28 7502                    jne 00407A2C                <--- if not we continue as a Good Guy if yes (Hi MuradMeraly) your dead meat :)
  223. :00407A2A 8BF3                    mov esi, ebx                <--- ESI now holds 00000001 (Bad thing)
  224.  
  225. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  226. |:00407A28(C)
  227. |
  228. :00407A2C 8D45EC                  lea eax, dword ptr [ebp-14]
  229. :00407A2F 50                      push eax
  230. :00407A30 6878E34700              push 0047E378                <--- This points to another weird set of Characters
  231. :00407A35 E8729DFFFF              call 004017AC                <--- In here it generates "bcom" from the weird set of Characters and puts it in Memory
  232. :00407A3A 8D45EC                  lea eax, dword ptr [ebp-14]
  233. :00407A3D 50                      push eax
  234. :00407A3E 57                      push edi
  235. :00407A3F E88C180600              call 004692D0                <--- And here it Compares "bcom" with our Name
  236. :00407A44 83C410                  add esp, 00000010
  237. :00407A47 85C0                    test eax, eax                <--- Test if EAX is 00
  238. :00407A49 750C                    jne 00407A57                <--- if not we jump and continue as Good Guy, if yes (Hi bcom) your dead meat :)
  239.  
  240. * Reference To: KERNEL32.GetTickCount, Ord:016Dh
  241.                                   |
  242. :00407A4B FF15D8714700            Call dword ptr [004771D8]
  243. :00407A51 84C3                    test bl, al
  244. :00407A53 7402                    je 00407A57
  245. :00407A55 8BF3                    mov esi, ebx                <--- ESI now holds 00000001 (Bad thing)
  246.  
  247. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  248.  
  249. Ok, so here in this piece of code it just Compares our Name with "MuradMeraly" and "bcom", if your one of them your screwed and we fail, if your not one of them we continue as Good Guy :)
  250. Let's see what's next:
  251.  
  252. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  253.  
  254. :00407A57 6A14                    push 00000014
  255. :00407A59 8D45EC                  lea eax, dword ptr [ebp-14]
  256. :00407A5C 6A00                    push 00000000
  257. :00407A5E 50                      push eax
  258. :00407A5F E8AC010600              call 00467C10                <--- Here it removes the Names in Memory
  259. :00407A64 68C8000000              push 000000C8
  260. :00407A69 8D85F8FDFFFF            lea eax, dword ptr [ebp+FFFFFDF8]
  261. :00407A6F 6A00                    push 00000000
  262. :00407A71 50                      push eax
  263. :00407A72 E899010600              call 00467C10                <--- Here it removes the Names in Memory
  264. :00407A77 83C418                  add esp, 00000018
  265. :00407A7A 85F6                    test esi, esi                <--- test if ESI is 00
  266. :00407A7C 7413                    je 00407A91                <--- If equal we jump and continue as Good Guy, if not then it xors EAX and we fail
  267. :00407A7E E823080000              call 004082A6                <--- Here it moves 00 at the beginning of our Name and Serial and we fail
  268. :00407A83 8325DC9F480000          and dword ptr [00489FDC], 00000000
  269.  
  270. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  271. |:004079EA(C)
  272. |
  273. :00407A8A 33C0                    xor eax, eax                <--- Xor EAX (Bad thing)
  274. :00407A8C E9B1000000              jmp 00407B42                <--- Jump to the end
  275.  
  276. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  277.  
  278. Ok, here it cleans up the Memory by removing the Names and it Tests if ESI is 00. For us its 00 (Unless your MuradMeraly or bcom) so we jump and you'll see this:
  279.  
  280. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  281.  
  282. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  283. |:00407A7C(C)
  284. |
  285. :00407A91 8D85C0FEFFFF            lea eax, dword ptr [ebp+FFFFFEC0]
  286. :00407A97 50                      push eax
  287. :00407A98 57                      push edi
  288. :00407A99 E8A9000000              call 00407B47                <--- Serial Algo 1
  289. :00407A9E BEA4CD4800              mov esi, 0048CDA4            <--- ESI now holds the offset for our "fake" Serial
  290. :00407AA3 8D85C0FEFFFF            lea eax, dword ptr [ebp+FFFFFEC0]
  291. :00407AA9 56                      push esi
  292. :00407AAA 50                      push eax
  293. :00407AAB E820180600              call 004692D0                <--- And here it Compares our "fake" Serial with the "Real Serial 1"
  294. :00407AB0 83C410                  add esp, 00000010
  295. :00407AB3 F7D8                    neg eax
  296. :00407AB5 1BC0                    sbb eax, eax
  297. :00407AB7 40                      inc eax
  298. :00407AB8 A3DC9F4800              mov dword ptr [00489FDC], eax
  299. :00407ABD 7568                    jne 00407B27                <--- if not equal we jump and that means we entered the "Real Serial 1", if not continue to Serial Algo 2
  300.  
  301. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  302.  
  303. Ok, so step into the CALL 00407B47 to get to the "Serial Algo 1". And now you'll see this:
  304.  
  305. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  306.  
  307. :00407B47 55                      push ebp
  308. :00407B48 8BEC                    mov ebp, esp
  309. :00407B4A 8B4D08                  mov ecx, dword ptr [ebp+08]        <--- Move offset to our Name in ECX
  310. :00407B4D 53                      push ebx
  311. :00407B4E 56                      push esi
  312. :00407B4F 57                      push edi
  313. :00407B50 8A11                    mov dl, byte ptr [ecx]        <--- Move first Char in DL
  314. :00407B52 33DB                    xor ebx, ebx                <--- XOR EBX which is now 00
  315. :00407B54 33C0                    xor eax, eax                <--- XOR EAX which is now 00
  316. :00407B56 8BF1                    mov esi, ecx                <--- Move the offset for our Name from ECX in ESI
  317. :00407B58 33FF                    xor edi, edi                <--- XOR EDI which is now 00
  318.  
  319. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  320. |:00407B6C(U)
  321. |
  322. :00407B5A 84D2                    test dl, dl                <--- Test if DL is 00 (Are we at the end of our Name ?)
  323. :00407B5C 7410                    je 00407B6E                <--- If so we jump to the next stuff, if not we continue to make the first part of our Serial
  324. :00407B5E 660FB6D2                movzx dx, dl                <--- Move DL to DX
  325. :00407B62 0FAFD7                  imul edx, edi                <--- Multiply EDI with EDX (in the beginning EDI is 00)
  326. :00407B65 03DA                    add ebx, edx                <--- Add EDX in EBX
  327. :00407B67 8A5601                  mov dl, byte ptr [esi+01]        <--- Move next Char in DL
  328. :00407B6A 47                      inc edi                <--- EDI +1
  329. :00407B6B 46                      inc esi                <--- ESI +1
  330. :00407B6C EBEC                    jmp 00407B5A                <--- Repeat loop
  331.  
  332. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  333.  
  334. Ok, so here we got the first part of "Real Serial 1". It takes the first Char and multiplies with EDI then adds to EBX and repeats this loop, for my Name it would be:
  335.  
  336. "CoDe_InSiDe"
  337.  
  338. Puts first Char in DL which is "C" (Hex = 43) and checks if its 00 if so we got our first part of the Serial, if not we continue with the Algo
  339. Then multiplies with EDI which is 00 at the beginning.
  340. Then adds EDX in EBX
  341. Result in EBX is now 00
  342. Increase EDI with 1
  343. Increase ESI with 1
  344.  
  345. Then puts second Char in DL which is "o" (Hex = 6F)
  346. Then multiplies with EDI which is now 01
  347. Then adds EDX in EBX
  348. Result in EBX is now 6F
  349. Increase EDI with 1
  350. Increase ESI with 1
  351. And so on...
  352.  
  353. The final result for my name is "00001386"
  354.  
  355. Let's see the second and final part of our "Real Serial 1":
  356.  
  357. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  358.  
  359. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  360. |:00407B5C(C)
  361. |
  362. :00407B6E C70544C8480001000000    mov dword ptr [0048C844], 00000001
  363. :00407B78 8BF1                    mov esi, ecx                <--- Move the offset for our Name in ESI
  364. :00407B7A 8A09                    mov cl, byte ptr [ecx]        <--- Move first Char in CL
  365.  
  366. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  367. |:00407B97(U)
  368. |
  369. :00407B7C 84C9                    test cl, cl                <--- Test if CL is 00 (Are we at the end of our Name ?)
  370. :00407B7E 7419                    je 00407B99                <--- If so we jump to the next stuff and we got the second part of our "Real Serial 1", if not we continue to make the Serial
  371. :00407B80 660FB6C9                movzx cx, cl                <--- Move CL in CX
  372. :00407B84 6821100000              push 00001021                <--- Push 00001021 onto the Stackdump (Suspicious :)
  373. :00407B89 51                      push ecx
  374. :00407B8A 50                      push eax
  375. :00407B8B E829000000              call 00407BB9                <--- Check out this CALL !!!
  376. :00407B90 8A4E01                  mov cl, byte ptr [esi+01]        <--- Move second Char in CL
  377. :00407B93 83C40C                  add esp, 0000000C
  378. :00407B96 46                      inc esi                <--- ESI +1
  379. :00407B97 EBE3                    jmp 00407B7C                <--- Repeat loop
  380.  
  381. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  382.  
  383. Ok, i can't tell you so much about this now we need to see what happends in the CALL 00407BB9, so let's check it:
  384.  
  385. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  386.  
  387. :00407BB9 55                      push ebp
  388. :00407BBA 8BEC                    mov ebp, esp
  389. :00407BBC 8B4508                  mov eax, dword ptr [ebp+08]        <--- The value that will become our second part of the "Real Serial 1" (in the beginning its 00)
  390. :00407BBF 56                      push esi
  391. :00407BC0 33C9                    xor ecx, ecx                <--- XOR ECX which is now 00
  392. :00407BC2 6A08                    push 00000008                <--- Push 00000008 into the Stackdump
  393. :00407BC4 8A6D0C                  mov ch, byte ptr [ebp+0C]        <--- Move our first Char in CH
  394. :00407BC7 5A                      pop edx                <--- Pop 00000008 into EDX
  395.  
  396. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  397. |:00407BDF(C)
  398. |
  399. :00407BC8 8BF0                    mov esi, eax                <--- Move EAX to ESI
  400. :00407BCA 33F1                    xor esi, ecx                <--- XOR ECX with ESI
  401. :00407BCC 66F7C60080              test si, 8000                <--- Test if SI is lower then 8000
  402. :00407BD1 7407                    je 00407BDA                <--- If so we jump and skip three instructions, if not we continue
  403. :00407BD3 03C0                    add eax, eax                <--- ADD EAX to itself so it doubles
  404. :00407BD5 334510                  xor eax, dword ptr [ebp+10]        <--- XOR EAX with 00001021 (Remember this value was pushed before the CALL)
  405. :00407BD8 EB02                    jmp 00407BDC                <--- Jump and skip one instruction
  406.  
  407. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  408. |:00407BD1(C)
  409. |
  410. :00407BDA D1E0                    shl eax, 1                <--- Shift EAX to the left with 1 (The value doubles)
  411.  
  412. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  413. |:00407BD8(U)
  414. |
  415. :00407BDC D1E1                    shl ecx, 1                <--- Shift ECX to the left with 1 (The value doubles)
  416. :00407BDE 4A                      dec edx                <--- EDX -1
  417. :00407BDF 75E7                    jne 00407BC8                <--- if EDX is 00 continue else we repeat the loop
  418. :00407BE1 5E                      pop esi
  419. :00407BE2 5D                      pop ebp
  420. :00407BE3 C3                      ret
  421.  
  422. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  423.  
  424. Ok, it goes through this process till it reaches the end of our name and we have the right Serial :) not yet completely so let's see what's next when we have reached the end of our Name:
  425.  
  426. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  427.  
  428. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  429. |:00407B7E(C)
  430. |
  431. :00407B99 83C063                  add eax, 00000063            <--- ADD 00000063 to EAX (EAX holds our second part of the Serial)
  432. :00407B9C 0FB7CB                  movzx ecx, bx                <--- Move BX to ECX (This was the first part of our Serial but will actually be used as the second part :) 
  433. :00407B9F 0FB7C0                  movzx eax, ax                <--- Move AX to EAX (This was the second part of our Serial but will actually be used as the first part :)
  434. :00407BA2 51                      push ecx
  435. :00407BA3 50                      push eax
  436.  
  437. * Possible StringData Ref from Data Obj ->"%04X%04X"
  438.                                   |
  439. :00407BA4 688CE34700              push 0047E38C                <--- This string will make the numbers we got as the Serial to Readable Characters
  440. :00407BA9 FF750C                  push [ebp+0C]
  441. :00407BAC E803FF0500              call 00467AB4                <--- In this CALL it will make the Serial Readable
  442. :00407BB1 83C410                  add esp, 00000010
  443. :00407BB4 5F                      pop edi
  444. :00407BB5 5E                      pop esi
  445. :00407BB6 5B                      pop ebx
  446. :00407BB7 5D                      pop ebp
  447. :00407BB8 C3                      ret
  448.  
  449. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  450.  
  451. Ok, so now we know the "Real Serial 1" for my Name it was:
  452.  
  453. Name:        CoDe_InSiDe
  454. Serial:        A5BA1386
  455.  
  456. So this was the first Serial we could get out of Winzip :), if you get over this "ret" we return and you'll see that it checks EAX with 00, now it won't jump because we haven't entered the correct
  457. Serial as our Serial :) so then it continues to the "Serial Algo 2".
  458. I'm not going to tell exactly how this goes because it almost goes the same as the first Serial.
  459. First of all the Algo makes the Characters from our Name "lowercase".
  460. Then it goes through the same process but only counts the LETTERS. So in my Name "CoDe_InSiDe" it would ignore the "_". And it makes the Serial 8 Characters and it uses the string "%04u%04u" to make
  461. the Serial readable.
  462. Then the result for the "Real Serial 2" for my Name would be:
  463.  
  464. Name:        CoDe_InSiDe
  465. Serial:        13652471
  466.  
  467. so this was the "Serial Sniffing method" i hope it wasn't too much maybe you understand it very good now, or your confused as hell :)
  468. Anyway i'll show you a different way of Patching now :)
  469.  
  470.  
  471. --->    Let's Begin...        *** Patching ***
  472.  
  473. Ok, i saw this in some tutorial from some guy (Sorry i don't know your name anymore :) about patching Winzip so that every Serial will work. It's a very simple approach.
  474. Fire up a Hex-Editor and open the file "Winzip32.exe". If you've read this whole tutorial then you know that i was talking about a string that generates the Serial to Readable Characters.
  475. Now find that string "%04X%04X" in your Hex-Editor and replace it with whatever you want, its that simple :)
  476. Just change it into this:
  477.  
  478. %04X%04X    --->    12345678
  479.  
  480. Now if you enter your Name and this Serial (12345678) it will work but only this Serial unless you changed it into something else.
  481. If you look in your Hex-Editor to this string again, you'll notice another string below of it.
  482. "%04u%04u" this one is used for the "Serial Algo 2", so you can change this as well but its not necessary :)
  483. I think i'm gonna quit now pretty long tutorial.
  484.  
  485.  
  486. --->    Outro...
  487.  
  488. Thank You for reading this tutorial and i hope you learned something from it :)
  489. I hope you haven't fall asleep, hehe
  490. Anyway Thanks again for reading this tutorial and i hope to see you in the next tutorial ;)
  491.  
  492.  
  493. --->    Greetings
  494.  
  495. Everybody at TrickSoft        (www.TrickSoft.net)
  496. Everybody at #Cracking4Newbies    (www.Cracking4Newbies.com)
  497. Borna Janes            (for the other Solution :)
  498. Some guy            (for the Patch Method, sorry that i forgot your Name :)
  499. And You...
  500.  
  501.  
  502.             Don't trust the outside, trust the InSiDe !!!
  503.  
  504.                       Cya...
  505.  
  506.                     CoDe_InSiDe
  507.  
  508. Email:    code.inside@home.nl