Now that you have learned how to step in to functions and step out of functions, how to do it do and
also how to insert and delete comments, let us continue the analysis of this crime.
And so this is the main function.
Over here, if your argument is going is not to he, will you show you the usage and once you enter
usage, you a senior program.
So I enter the usage.
Now, after printing the usage message, you can't actually function to exit the program and you will
not continue.
Let's step out of commission, but let's assume you into two arguments.
So in this case, you have two arguments, Fi, followed by serial number.
So he satisfies this argument.
So this Paganistic, you can go to the next line and call another function checks here.
Taxidriver, past the security that you enter, which in this case is one, two, three, four, five,
six, seven.
Argument one, a hard one is actually your silkie, just like Humvee's zero is your binary name, Sify.
So now let's go inside and see what this thing does.
So to enter the step into the function, the double click on it.
And here we see chaar.
So, you know, the CHA premise of the one.
Just checking in, hitting back, I'll be one so we can certainly do this and rename this ASV one.
So right, click on this and then the new variable is
the one.
Oh, if you want to be more descriptive, you can say ritzier.
So you know that this is a serious killer issue into.
And then in here, you used to streamline function to count the length of your key visitor, and he
would start the result in there as well.
So from here, Venona as well, one must be the length we can rename it likely and rename the variable
length.
So now when you click the link, you highlight all the similarly selected Verba label.
And you can see this light is being used in multiple places in this function.
Now, on the next line, which is nine, 10, if we don't check whether your line is equal to zero one
zero.
Your X prefix means that this is hexadecimal, so to convert this into a decimal number, you can use
a calculator.
So the program is calculated and for tax hikes and in typing here in zero one zero one zero and click
on this month and it is 16.
So now we know that this is 16.
It is checking if the length is 16.
So it's a 1916 Nanjo serial number line is correct.
So this suggests that he wants us to enter a certain number, which is 16 characters long.
So we can actually work on reducing to to show decimal number, so to convert this, to show decimal
number, selling this by clicking this and then go to the disassembly view and look for it, here is
how to like blue.
Whatever you click here will be highlighted in light blue.
For example, if I click on this, you highlight this, if I click on this, you had any spot.
So if I wanted to select this, I click on this and you highlight this spot in light blue.
So now I can click on this and select convert from the bottom here and then select.
Signed this 16, so I like this one and there is no negative number.
It is only positive numbers.
So now you can see once you converted, convicted in the disassembly view, it is also changed and reflect
it in a different part of you.
Now it's easier to read.
And then next one would be the wall.
The wall in this case.
Access to parameters, and he is quite unique.
Wallop can have one barometer or can have two parameters, so while in this example, the world accepts
two parameters.
So in this case, the first parameter, they says, is to assign something to length.
So in this case, it is assigning the length of the serial number.
And then maybe the lanky 16, for example, and then the second parameter here it is checking whether
local one sees less.
So here is checking local one see is less and less.
So how do we understand the meaning of this?
Notice that the first perimeter is separated from the second perimeter with a comma, that means they
will perform this instruction first, then only do this instruction.
So in this case here, the first instruction is just to assign 16 to the line, because we know that
it requires your line to be 16 to definitely three in line to return 16.
So this will not change the operation on the wall, the volume will continue to move on to the second
second parameter.
Now you will check whether once he is less than 16, if he is not insisting, he enter into the loop
inside here.
If you look over and see he is not equal, if not last in line, then you will quit.
So this is how you can understand.
So the first parameter is merely expression to perform some assignment you can actually is similar to
writing in line outside here.
And then taking away this spot,
so is a cemetery, see?
All right, so in this case here, the decompiled the compiler has put the D Tamlin in a while, saying
separately with a comma separated, a comma with a second parameter.
So he performed the selection.
So now what is this little girl?
And she just ignores the long Ulong here.
The important part is the variable name.
So what is local?
Once you do when you click on one C, it will highlight only occurrences on the currency and you can
notice something here.
Look up.
He is using, say, every element.
So you suggested you go and see his array index and you can confirm it by looking out here.
Here is where you increase the value of the index by two and then go back to look again and check whether
it is still linked.
So this is just a way of going through every element of the array, the Array Zero series.
And he said no.
He says here a key which you enter.
So knowing that this is a very nice we can rename it correctly and rename it as her index.
This makes it easier to understand how when you are doing analysis, so now we know that it is now checking
in here, the 15 is checking whether the is correct or the array minus.
The next character, because is plus one here and then the new minus, the second character from the
first character is a result not equal to negative one.
If he's not good court, they define the initial serial number, he's wrong.
Immediately he will return.
That means I see the look.
So this is the algorithm for your Cerutty.
And this is what it means, what it looks like.
So now I use I to represent reenacts, so that's easier to it's easier to read.
So in this case here.
It is trying to compare whether the first character, minus the second character is not equal to negative
one.
So assuming that I enter zero number like this.
I when you first enter, will be zero, Silvani zero is assessing a first zero key character and he
will take that first character, minus I plus one.
Plus one is a second tier key character.
So it's trying to check.
Right.
The one minus two is to go to negative one.
If it is not, then we will quit by returning.
He will not proceed with the rest of the loop.
So they suggest that in order to enter the character, your first character must be the second character
by one.
So then you minus one, minus two, he will get 91.
After that, he will go down here and then he will increase your index by two.
So an increase in do he will now become too high will be too.
When he first ran, I was zero now, because you plus two eyewitness to.
So now you it's zero to minus zero three, it means he will take zero to.
Minus zero, three and C, very negative one.
Zero two refers to this three zero zero zero one zero one one zero two is this one.
OK, so I do miss tree, the tree, you take three minus four and they check, all right.
So because three minus four is negative one, that means you're correct.
Then he will go and increase the index by two again, and then now when to test four in five.
So four and five refers to zero.
One, two, three, four.
These two five nine six.
So finally, he's 91, increased by tulgan, so we check seven minus, he's a negative one.
Yes, he is.
Then you increase by two again, the ME check this, and this is in 91.
Yes, he still 81.
So you must make sure that after it you must start from one again so that when you minus one, minus
two, you still get ninety one and then the total line must be 16.
So this is your password.
This is a security.
OK, so now you can see there you go to here and you type in one, two, three, four, five, six,
seven, eight.
One, two, three, four, five, six, seven, eight, 16 characters, again, enter and you get good
here.
So that is trysting here.
Now, how does he get you to notice here if you're any time he checks in, find it the moment he detects
that the.
To Syria is wrong.
He return this no what is this number have in hexadecimal notation o f means negative one.
It is based on the two complement notation.
You can go and read up on the Internet about two, which complement
to complement.
Addition is a way for a computer to.
Sure, negative numbers.
OK, so he one show negative numbers.
For example, here.
When when you get on, once he refers to our.
And then once the minister is a negative number, all right, so.
That is the meaning of total premeditation, they are using binary numbers to represent sine integers.
So when you have a negative number, you put negative.
He put s in front.
The most significant bit will be F or one.
This is in your case, that is a negative number.
If it's O F, then for sure is negative one.
So no need to go too much.
Just know that when you see all f he means negative one.
So when you return negative one, you will return to the colony so you can step out of it.
So here, if you return negative one, then you know that something that has gone wrong, something
bad has happened in your Silkies from.
So you can actually put a comment here to say that you the return value is negative one.
He means wrong silkie.
So is on this, you know, it is wrong here, OK, you can bring in this variable.
OK, so just rename it now to return value on returning to you
again, then here, if your return is zero, then put gutsier.
So that is what we are seeing here.
You see, that means we return to zero.
All right, but if you return with a negative one, this would not be true.
Instead, you ran this spot and put Vetsera before you.
So zero a return radio zero means your your result is correct.
Even return radio Ninety-One means exactly zero.
So let's go back and see what makes it return.
Zero changes.
So over here, it returns you.
Here it is, 81, so in here, the moment, the wrong city center city, we return 91.
So if he doesn't return negative one, then he will continue to check all the remaining characters until
he finishes.
Once he finishes, he will look and come on here and return zero.
So we know that this is the return that you see.
This return is you you've won.
So we can actually.
Right.
Click on this and give me a return integer.
So when he return zero, it means you have successfully and technically right here.
So when you return zero here and you go back out to function, the zero, the return here is zero again.
When he comes here, he will return zero.
Returning to zero, so this is true and he shows you the good message.
So this is how to solve these crimes.
That's all for this video.
Thank you for watching.