Explanation to anyone who cares
First of all, I disassembled the program.
Quote:
Feel free to use any hex editors, decompliers, what ever you want.
I noticed something like this in the assembly code:
Code:
mov ax,[the first textbox of the five]
add ax,[the second textbox]
jo <somewhere> ; this means, if overflow, jump to the error line <somewhere>
add ax,[the third]
jo <somewhere>
add ax,[the fourth]
jo <somewhere>
add ax,[the fifth]
jo <somewhere>
cmp ax,0019 ; compare ax to 19h
jne 00406369 ; if ax <> 19h, jump to 00406369
; (otherwise stay where you are!)
; code for "success" msgbox goes here
00406369:
; code for "wrong serial" msgbox goes here
Also, the code told me that the only jump to 00406369 was that jne line.
So that is the only place which could cause an "error" MsgBox.
According to the disassembler, the line jne 00406369 looked in the EXE like this: 0F 85 01 17 00 00
Now, I do not want to jump. If I disabled this jump, the error MsgBox could never be reached, but instead, it would show the success MsgBox either way.
So the solution is to replace it with nop (no-operation).
Now as you saw, jne 00406369 takes up 6 bytes of the EXE.
And the EXE alias for nop is 90. (1 byte)
So we have to put exactly 6 nop codes to skip the jump.
This is what the program does. :rolleyes:
Here's how the serial-checking routine in the cracked serial.exe looks like.
Code:
mov ax,[the first textbox of the five]
add ax,[the second textbox]
jo <somewhere> ; this means, if overflow, jump to the error line <somewhere>
add ax,[the third]
jo <somewhere>
add ax,[the fourth]
jo <somewhere>
add ax,[the fifth]
jo <somewhere>
cmp ax,0019 ; compare ax to 19h
nop ;do nothing
nop ;do nothing
nop ;do nothing
nop ;do nothing
nop ;do nothing
nop ;do nothing
; Success MsgBox code goes here
00406369:
; Wrong Serial MsgBox code goes here
; But in the cracked EXE, it cannot be reached
Another solution would be to change it from jne to je. Then, wrong serials will give you the "correct" MsgBox, and correct serials will give you the "wrong" MsgBox.
But there's no reason, so let's not do it and say we did. :rolleyes:
Reverse Engerneering and Assembly
It's a software cracker's dream tools, hehe.