Welcome back.
In this lesson, we are going to explore how to patch the things to always show the good message, even
though you enter the wrong username or serial.
So you can try this on your own.
Pause the video and later on check the solution.
Okay, I hope you have tried that.
So let's see how to solve this.
We run this now and let the thing pop up.
Now we enter any wrong username.
And we enter any serial, not the correct serial.
But it will still when you click on check.
Click run.
It will still show the sorry.
Don't give up.
So we want it to show the good message no matter whatever we enter.
So let's see how to do that.
Click check again.
And now it hits our breakpoint.
So we go to graph view.
And then we will come down until this jump.
And this is the place where it will decide whether to show the bad message on the left or to show
the good message on the right.
So we'll keep on.
We'll put the breakpoint here and run over here.
So run until it hits this breakpoint.
Let's remove the breakpoint now.
So as you can see here test - is checking whether - is zero.
That means it is expecting - to be zero.
But because it is not zero, therefore this jump will go to the left because JNE means jump not
equal to zero.
The easiest way to solve this is to NOP this.
So I already put a comment.
NOP this.
So when you NOP
this, no matter whatever the value of -, it doesn't matter.
It will still go to the right when you NOP this.
So let's now follow in this assembler and NOP this.
Right-click, binary, fill with NOPs, click okay.
So now we are going to patch it.
So patch file, click patch and select a new name.
Put dash one at the back here, click save.
I've done it before.
Okay, so now let's test it.
Test our patched one.
We can close this one first.
And let's run our patched one.
So we enter any user.
And any serial.
And we click check and it says great job.
So we have solved it.
Let's try another one.
Any other serial and any other user.
Also it shows great job.
So this is a very, very simple software patch.
So that's all for this video.
Thank you for watching.