Url=Http://ebliss.cjb.net Tools needed Softice 4.05 W32dasm(not really necessary) Procdump 1.6.2 final Icedump 6.0.2.3 Author=Eternal Bliss Protections=self modifying code forming a messagebox Auhors Words This is my 4th win32asm crackme.heh. It should be more difficult to patch. Patch the CrackMe to remeove the Nag. Challenge: Use the least bytes possible. Heya all, This is my first tutorial on dumping and patching a nag.I'm using what they called "inline" patch and dump it with icedump. Lets gets started :0) Start prodump, click Pe Editor and select win32asmcrackme4.exe Entry Point: 00001000 Size of image: 00005000 Image Base: 00400000 Write it down and you will know why we need to know these later :P Double click win32asmcrackme4.exe and it shows you a nag. "Please pay me to register..." then press ok and you are in the main window well close the crackme. Start loader32 and load win32asmcrackme4 and you are in softice press F10 and you will land here. EAX=00401000 EBX=00000000 ECX=8159B420 EDX=8159B460 ESI=8159B400 EDI=815A22EC EBP=0063FF78 ESP=0063FE38 EIP=00401002 O d I S z a P c CS=0137 DS=013F SS=013F ES=013F FS=4DB7 GS=0000 ÄÄÄÄÄWIN32ASMCRACKME4!.text+0011ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄbyteÄÄÄÄÄÄÄÄÄÄÄÄÄÄPROTÄÄÄ(0)ÄÄ 013F:00401011 33 C0 66 C7 07 6A 00 83-C7 02 C7 07 68 7D 30 40 3.f..j......h}0@ 013F:00401021 83 C7 04 C6 07 00 47 C7-07 68 34 30 40 83 C7 04 ......G..h40@... 013F:00401031 C6 07 00 47 66 C7 07 6A-00 83 C7 02 C7 07 E8 30 ...Gf..j.......0 013F:00401041 02 00 83 C7 04 C6 07 00-47 66 C7 07 EB 47 83 EF ........Gf...G.. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄPROT32Ä 0137:00400FFE FFFF INVALID  0137:00401000 6A00 PUSH 00 <-------------Here  0137:00401002 E877020000 CALL KERNEL32!GetModuleHandleA 0137:00401007 A330314000 MOV [00403130],EAX 0137:0040100C BF11104000 MOV EDI,00401011 <----copies 00401011 to edi 0137:00401011 33C0 XOR EAX,EAX <----moves eax to 0 0137:00401013 66C7076A00 MOV WORD PTR [EDI],006A <------ copies 6a00 in reverse order to edi 0137:00401018 83C702 ADD EDI,02 and add 2 bytes to 401011 0137:0040101B C707687D3040 MOV DWORD PTR [EDI],40307D68 <--- copies 687d3040 in reverse order 0137:00401021 83C704 ADD EDI,04 add 4 bytes next to 6a00 0137:00401024 C60700 MOV BYTE PTR [EDI],00 <----- copies 00 to edi(spacing) 0137:00401027 47 INC EDI    next to 687d3040 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄWIN32ASMCRACKME4+0FFEÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This crackme is easy to understand,it copies bytes to address 00401011 forms a messagebox and you can't find string "Please pay me to register..." the string refs in w32dasm dead listings because its encrypted. You might ask why didn't I use the breakpoint messageboxexa,thats simple you can only see the result after the messagebox is created.What we want is to trace through the code and you will know how it works :-)) well trace until you reached this code EAX=00000000 EBX=00000000 ECX=815872B8 EDX=8159A1AC ESI=815999CC EDI=00401011 EBP=0063FF78 ESP=0063FE3C EIP=00401052 o d I s z a P c CS=0137 DS=013F SS=013F ES=013F FS=3897 GS=0000 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄbyteÄÄÄÄÄÄÄÄÄÄÄÄÄÄPROTÄÄÄ(0)ÄÄ 0030:00000000 9E 0F C9 00 65 04 70 00-16 00 55 0A 65 04 70 00 ....e.p...U.e.p. 0030:00000010 65 04 70 00 54 FF 00 F0-4C E1 00 F0 6F EF 00 F0 e.p.T...L...o... 0030:00000020 00 00 00 C8 28 00 55 0A-6F EF 00 F0 6F EF 00 F0 ....(.U.o...o... 0030:00000030 6F EF 00 F0 6F EF 00 F0-9A 00 55 0A 65 04 70 00 o...o.....U.e.p. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄPROT32Ä 0137:0040104F 83EF13 SUB EDI,13  0137:00401052 FFE7 JMP EDI <---- Here  0137:00401054 50 PUSH EAX 0137:00401055 E81E020000 CALL KERNEL32!ExitProcess 0137:0040105A EB15 JMP 00401071 0137:0040105C 1337 ADC ESI,[EDI] 0137:0040105E EB15 JMP 00401075 0137:00401060 1337 ADC ESI,[EDI] 0137:00401062 EB15 JMP 00401079 0137:00401064 1337 ADC ESI,[EDI] 0137:00401066 EB15 JMP 0040107D  0137:00401068 1337 ADC ESI,[EDI]    ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄWIN32ASMCRACKME4!.text+004FÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This is the last piece of code which the messagebox is created heh whew look at the window register the register edi it jumps back to 00401011 and you see this below :P EAX=00000000 EBX=00000000 ECX=815824F4 EDX=81586894 ESI=815774AC EDI=00401011 EBP=0063FF78 ESP=0063FE3C EIP=00401011 o d I s z a P c CS=0137 DS=013F SS=013F ES=013F FS=2337 GS=0000 ÄÄÄÄÄWIN32ASMCRACKME4!.text+0011ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄbyteÄÄÄÄÄÄÄÄÄÄÄÄÄÄPROTÄÄÄ(0)ÄÄ 013F:00401011 6A 00 68 7D 30 40 00 68-34 30 40 00 6A 00 E8 30 j.h}0@.h40@.j..0 013F:00401021 02 00 00 EB 47 00 47 C7-07 68 34 30 40 83 C7 04 ....G.G..h40@... 013F:00401031 C6 07 00 47 66 C7 07 6A-00 83 C7 02 C7 07 E8 30 ...Gf..j.......0 013F:00401041 02 00 83 C7 04 C6 07 00-47 66 C7 07 EB 47 83 EF ........Gf...G.. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄPROT32Ä 0137:0040100C BF11104000 MOV EDI,00401011  0137:00401011 6A00 PUSH 00 <-------- You are here (this is the exit button)  0137:00401013 687D304000 PUSH 0040307D <-------push the string ref "Crackme Nag" in the memory 0137:00401018 6834304000 PUSH 00403034 push the string ref "Please Pay me....." in the memory 0137:0040101D 6A00 PUSH 00 <------this is the "ok" button 0137:0040101F E830020000 CALL USER32!MessageBoxA <----- call the api MessageboxA 0137:00401024 EB47 JMP 0040106D <------jump to next instruction 0137:00401026 0047C7 ADD [EDI-39],AL 0137:00401029 07 POP ES 0137:0040102A 6834304083 PUSH 83403034 0137:0040102F C704C607004766 MOV DWORD PTR [EAX*8+ESI],66470007  0137:00401036 C7076A0083C7 MOV DWORD PTR [EDI],C783006A    ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄWIN32ASMCRACKME4!.text+000CÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Trace when you reached 0040101D thats the "ok" control button "push 00" it means that the button is not press all we have to do to is assemble it and change it to push 01 which is a mouse click and hte nag is gone :P In command window enter this "a" "push 01" <----- enter <------enter We are ready to dump the process. /pedump imagebase entry point c:\filename.exe /pedump- What it does is dump the current win32 process or a dll in its address space to a valid PE file. Enter this without quotes '/pedump 400000 1000 c:\unp.exe' 'X' and you are out of softice Execute unp.exe and runs :-)))))) Last Words Hope you guys learn something from this nice crackme and from my tute,by the way I'm a newbie and I'm not a good in explaining things and do hope you enjoy reading this "tute" :P Any comments,critics,Flames are welcome :) Greets Eternal Bliss (:o)) CoDe_insiDe (=D) and all who knows me Cluesurf@usa.net