1 00:00:00,690 --> 00:00:09,270 Now that you have learned how to step in to functions and step out of functions, how to do it do and 2 00:00:09,270 --> 00:00:15,330 also how to insert and delete comments, let us continue the analysis of this crime. 3 00:00:17,040 --> 00:00:18,900 And so this is the main function. 4 00:00:20,060 --> 00:00:28,210 Over here, if your argument is going is not to he, will you show you the usage and once you enter 5 00:00:28,280 --> 00:00:30,430 usage, you a senior program. 6 00:00:32,060 --> 00:00:33,920 So I enter the usage. 7 00:00:33,920 --> 00:00:41,450 Now, after printing the usage message, you can't actually function to exit the program and you will 8 00:00:41,450 --> 00:00:42,170 not continue. 9 00:00:43,900 --> 00:00:50,620 Let's step out of commission, but let's assume you into two arguments. 10 00:00:52,000 --> 00:00:58,030 So in this case, you have two arguments, Fi, followed by serial number. 11 00:00:58,750 --> 00:01:02,250 So he satisfies this argument. 12 00:01:03,100 --> 00:01:09,960 So this Paganistic, you can go to the next line and call another function checks here. 13 00:01:10,930 --> 00:01:18,280 Taxidriver, past the security that you enter, which in this case is one, two, three, four, five, 14 00:01:18,280 --> 00:01:18,940 six, seven. 15 00:01:20,040 --> 00:01:31,680 Argument one, a hard one is actually your silkie, just like Humvee's zero is your binary name, Sify. 16 00:01:33,510 --> 00:01:36,450 So now let's go inside and see what this thing does. 17 00:01:37,400 --> 00:01:41,810 So to enter the step into the function, the double click on it. 18 00:01:44,050 --> 00:01:46,180 And here we see chaar. 19 00:01:47,140 --> 00:01:49,450 So, you know, the CHA premise of the one. 20 00:01:51,160 --> 00:01:59,420 Just checking in, hitting back, I'll be one so we can certainly do this and rename this ASV one. 21 00:02:00,130 --> 00:02:04,720 So right, click on this and then the new variable is 22 00:02:07,960 --> 00:02:09,250 the one. 23 00:02:11,250 --> 00:02:15,060 Oh, if you want to be more descriptive, you can say ritzier. 24 00:02:20,110 --> 00:02:22,990 So you know that this is a serious killer issue into. 25 00:02:24,440 --> 00:02:33,950 And then in here, you used to streamline function to count the length of your key visitor, and he 26 00:02:33,950 --> 00:02:38,030 would start the result in there as well. 27 00:02:39,590 --> 00:02:47,450 So from here, Venona as well, one must be the length we can rename it likely and rename the variable 28 00:02:48,050 --> 00:02:48,500 length. 29 00:02:53,540 --> 00:03:00,140 So now when you click the link, you highlight all the similarly selected Verba label. 30 00:03:01,580 --> 00:03:07,850 And you can see this light is being used in multiple places in this function. 31 00:03:09,780 --> 00:03:17,340 Now, on the next line, which is nine, 10, if we don't check whether your line is equal to zero one 32 00:03:17,340 --> 00:03:17,730 zero. 33 00:03:19,450 --> 00:03:31,600 Your X prefix means that this is hexadecimal, so to convert this into a decimal number, you can use 34 00:03:31,600 --> 00:03:32,590 a calculator. 35 00:03:36,550 --> 00:03:47,850 So the program is calculated and for tax hikes and in typing here in zero one zero one zero and click 36 00:03:47,860 --> 00:03:51,780 on this month and it is 16. 37 00:03:53,050 --> 00:03:55,360 So now we know that this is 16. 38 00:03:56,230 --> 00:03:58,330 It is checking if the length is 16. 39 00:04:00,010 --> 00:04:05,410 So it's a 1916 Nanjo serial number line is correct. 40 00:04:06,490 --> 00:04:12,430 So this suggests that he wants us to enter a certain number, which is 16 characters long. 41 00:04:14,330 --> 00:04:22,520 So we can actually work on reducing to to show decimal number, so to convert this, to show decimal 42 00:04:22,520 --> 00:04:30,380 number, selling this by clicking this and then go to the disassembly view and look for it, here is 43 00:04:30,380 --> 00:04:31,760 how to like blue. 44 00:04:32,660 --> 00:04:36,620 Whatever you click here will be highlighted in light blue. 45 00:04:38,350 --> 00:04:44,710 For example, if I click on this, you highlight this, if I click on this, you had any spot. 46 00:04:45,430 --> 00:04:51,430 So if I wanted to select this, I click on this and you highlight this spot in light blue. 47 00:04:52,480 --> 00:05:00,370 So now I can click on this and select convert from the bottom here and then select. 48 00:05:01,710 --> 00:05:08,200 Signed this 16, so I like this one and there is no negative number. 49 00:05:08,490 --> 00:05:10,170 It is only positive numbers. 50 00:05:10,800 --> 00:05:17,970 So now you can see once you converted, convicted in the disassembly view, it is also changed and reflect 51 00:05:17,970 --> 00:05:19,780 it in a different part of you. 52 00:05:21,180 --> 00:05:22,220 Now it's easier to read. 53 00:05:23,400 --> 00:05:25,650 And then next one would be the wall. 54 00:05:26,700 --> 00:05:28,530 The wall in this case. 55 00:05:29,910 --> 00:05:33,840 Access to parameters, and he is quite unique. 56 00:05:34,900 --> 00:05:46,000 Wallop can have one barometer or can have two parameters, so while in this example, the world accepts 57 00:05:46,000 --> 00:05:46,960 two parameters. 58 00:05:48,310 --> 00:05:56,140 So in this case, the first parameter, they says, is to assign something to length. 59 00:05:56,650 --> 00:06:02,200 So in this case, it is assigning the length of the serial number. 60 00:06:03,610 --> 00:06:12,960 And then maybe the lanky 16, for example, and then the second parameter here it is checking whether 61 00:06:12,970 --> 00:06:14,700 local one sees less. 62 00:06:16,180 --> 00:06:21,720 So here is checking local one see is less and less. 63 00:06:26,020 --> 00:06:29,650 So how do we understand the meaning of this? 64 00:06:31,500 --> 00:06:38,190 Notice that the first perimeter is separated from the second perimeter with a comma, that means they 65 00:06:38,190 --> 00:06:43,620 will perform this instruction first, then only do this instruction. 66 00:06:44,820 --> 00:06:52,920 So in this case here, the first instruction is just to assign 16 to the line, because we know that 67 00:06:52,920 --> 00:06:58,110 it requires your line to be 16 to definitely three in line to return 16. 68 00:06:59,840 --> 00:07:07,670 So this will not change the operation on the wall, the volume will continue to move on to the second 69 00:07:08,210 --> 00:07:09,300 second parameter. 70 00:07:10,550 --> 00:07:18,830 Now you will check whether once he is less than 16, if he is not insisting, he enter into the loop 71 00:07:18,850 --> 00:07:19,480 inside here. 72 00:07:20,870 --> 00:07:25,970 If you look over and see he is not equal, if not last in line, then you will quit. 73 00:07:27,680 --> 00:07:29,280 So this is how you can understand. 74 00:07:29,360 --> 00:07:39,350 So the first parameter is merely expression to perform some assignment you can actually is similar to 75 00:07:39,350 --> 00:07:40,850 writing in line outside here. 76 00:07:44,490 --> 00:07:46,620 And then taking away this spot, 77 00:07:50,640 --> 00:07:52,620 so is a cemetery, see? 78 00:07:53,850 --> 00:08:03,990 All right, so in this case here, the decompiled the compiler has put the D Tamlin in a while, saying 79 00:08:03,990 --> 00:08:09,490 separately with a comma separated, a comma with a second parameter. 80 00:08:09,510 --> 00:08:11,010 So he performed the selection. 81 00:08:12,420 --> 00:08:14,290 So now what is this little girl? 82 00:08:14,310 --> 00:08:16,800 And she just ignores the long Ulong here. 83 00:08:17,700 --> 00:08:19,780 The important part is the variable name. 84 00:08:20,910 --> 00:08:22,170 So what is local? 85 00:08:22,180 --> 00:08:30,090 Once you do when you click on one C, it will highlight only occurrences on the currency and you can 86 00:08:30,090 --> 00:08:31,170 notice something here. 87 00:08:31,500 --> 00:08:31,940 Look up. 88 00:08:32,190 --> 00:08:35,970 He is using, say, every element. 89 00:08:37,200 --> 00:08:44,520 So you suggested you go and see his array index and you can confirm it by looking out here. 90 00:08:45,390 --> 00:08:53,360 Here is where you increase the value of the index by two and then go back to look again and check whether 91 00:08:53,370 --> 00:08:54,900 it is still linked. 92 00:08:55,650 --> 00:09:03,720 So this is just a way of going through every element of the array, the Array Zero series. 93 00:09:03,720 --> 00:09:04,950 And he said no. 94 00:09:05,190 --> 00:09:07,190 He says here a key which you enter. 95 00:09:08,370 --> 00:09:16,410 So knowing that this is a very nice we can rename it correctly and rename it as her index. 96 00:09:19,600 --> 00:09:28,900 This makes it easier to understand how when you are doing analysis, so now we know that it is now checking 97 00:09:29,440 --> 00:09:36,820 in here, the 15 is checking whether the is correct or the array minus. 98 00:09:37,950 --> 00:09:45,360 The next character, because is plus one here and then the new minus, the second character from the 99 00:09:45,360 --> 00:09:50,000 first character is a result not equal to negative one. 100 00:09:50,730 --> 00:09:54,070 If he's not good court, they define the initial serial number, he's wrong. 101 00:09:54,420 --> 00:09:56,450 Immediately he will return. 102 00:09:57,150 --> 00:09:59,360 That means I see the look. 103 00:10:00,660 --> 00:10:05,070 So this is the algorithm for your Cerutty. 104 00:10:10,630 --> 00:10:13,040 And this is what it means, what it looks like. 105 00:10:13,930 --> 00:10:22,450 So now I use I to represent reenacts, so that's easier to it's easier to read. 106 00:10:26,090 --> 00:10:27,350 So in this case here. 107 00:10:28,870 --> 00:10:36,760 It is trying to compare whether the first character, minus the second character is not equal to negative 108 00:10:36,770 --> 00:10:37,090 one. 109 00:10:38,080 --> 00:10:41,980 So assuming that I enter zero number like this. 110 00:10:43,860 --> 00:10:53,880 I when you first enter, will be zero, Silvani zero is assessing a first zero key character and he 111 00:10:53,880 --> 00:10:58,590 will take that first character, minus I plus one. 112 00:10:59,460 --> 00:11:02,000 Plus one is a second tier key character. 113 00:11:02,700 --> 00:11:03,770 So it's trying to check. 114 00:11:04,110 --> 00:11:04,410 Right. 115 00:11:04,420 --> 00:11:07,320 The one minus two is to go to negative one. 116 00:11:09,420 --> 00:11:13,650 If it is not, then we will quit by returning. 117 00:11:14,010 --> 00:11:16,430 He will not proceed with the rest of the loop. 118 00:11:17,070 --> 00:11:27,930 So they suggest that in order to enter the character, your first character must be the second character 119 00:11:28,110 --> 00:11:28,700 by one. 120 00:11:29,430 --> 00:11:33,580 So then you minus one, minus two, he will get 91. 121 00:11:35,790 --> 00:11:41,160 After that, he will go down here and then he will increase your index by two. 122 00:11:42,490 --> 00:11:48,000 So an increase in do he will now become too high will be too. 123 00:11:50,050 --> 00:11:56,760 When he first ran, I was zero now, because you plus two eyewitness to. 124 00:11:58,050 --> 00:12:07,410 So now you it's zero to minus zero three, it means he will take zero to. 125 00:12:09,400 --> 00:12:14,080 Minus zero, three and C, very negative one. 126 00:12:15,160 --> 00:12:26,170 Zero two refers to this three zero zero zero one zero one one zero two is this one. 127 00:12:27,560 --> 00:12:39,470 OK, so I do miss tree, the tree, you take three minus four and they check, all right. 128 00:12:40,010 --> 00:12:44,540 So because three minus four is negative one, that means you're correct. 129 00:12:45,870 --> 00:12:53,870 Then he will go and increase the index by two again, and then now when to test four in five. 130 00:12:53,890 --> 00:12:56,620 So four and five refers to zero. 131 00:12:56,620 --> 00:12:58,240 One, two, three, four. 132 00:12:59,720 --> 00:13:02,060 These two five nine six. 133 00:13:03,730 --> 00:13:11,720 So finally, he's 91, increased by tulgan, so we check seven minus, he's a negative one. 134 00:13:12,280 --> 00:13:13,150 Yes, he is. 135 00:13:14,250 --> 00:13:20,480 Then you increase by two again, the ME check this, and this is in 91. 136 00:13:21,000 --> 00:13:22,640 Yes, he still 81. 137 00:13:23,370 --> 00:13:30,900 So you must make sure that after it you must start from one again so that when you minus one, minus 138 00:13:30,900 --> 00:13:35,090 two, you still get ninety one and then the total line must be 16. 139 00:13:36,090 --> 00:13:38,040 So this is your password. 140 00:13:38,070 --> 00:13:39,200 This is a security. 141 00:13:39,800 --> 00:13:49,710 OK, so now you can see there you go to here and you type in one, two, three, four, five, six, 142 00:13:49,710 --> 00:13:50,370 seven, eight. 143 00:13:55,530 --> 00:14:02,790 One, two, three, four, five, six, seven, eight, 16 characters, again, enter and you get good 144 00:14:03,030 --> 00:14:03,350 here. 145 00:14:04,290 --> 00:14:06,240 So that is trysting here. 146 00:14:06,270 --> 00:14:16,460 Now, how does he get you to notice here if you're any time he checks in, find it the moment he detects 147 00:14:16,890 --> 00:14:17,570 that the. 148 00:14:18,350 --> 00:14:19,520 To Syria is wrong. 149 00:14:19,890 --> 00:14:29,870 He return this no what is this number have in hexadecimal notation o f means negative one. 150 00:14:30,520 --> 00:14:34,280 It is based on the two complement notation. 151 00:14:34,280 --> 00:14:41,810 You can go and read up on the Internet about two, which complement 152 00:14:47,420 --> 00:14:48,210 to complement. 153 00:14:48,210 --> 00:14:53,270 Addition is a way for a computer to. 154 00:14:54,690 --> 00:14:56,100 Sure, negative numbers. 155 00:15:00,670 --> 00:15:03,590 OK, so he one show negative numbers. 156 00:15:09,420 --> 00:15:10,320 For example, here. 157 00:15:13,460 --> 00:15:17,690 When when you get on, once he refers to our. 158 00:15:19,140 --> 00:15:25,290 And then once the minister is a negative number, all right, so. 159 00:15:28,150 --> 00:15:37,390 That is the meaning of total premeditation, they are using binary numbers to represent sine integers. 160 00:15:37,930 --> 00:15:40,960 So when you have a negative number, you put negative. 161 00:15:41,260 --> 00:15:42,430 He put s in front. 162 00:15:42,940 --> 00:15:46,240 The most significant bit will be F or one. 163 00:15:46,240 --> 00:15:48,660 This is in your case, that is a negative number. 164 00:15:49,870 --> 00:15:52,780 If it's O F, then for sure is negative one. 165 00:15:54,470 --> 00:15:56,590 So no need to go too much. 166 00:15:56,890 --> 00:15:59,570 Just know that when you see all f he means negative one. 167 00:16:00,570 --> 00:16:07,270 So when you return negative one, you will return to the colony so you can step out of it. 168 00:16:10,570 --> 00:16:18,340 So here, if you return negative one, then you know that something that has gone wrong, something 169 00:16:18,340 --> 00:16:20,890 bad has happened in your Silkies from. 170 00:16:21,610 --> 00:16:26,560 So you can actually put a comment here to say that you the return value is negative one. 171 00:16:26,860 --> 00:16:28,510 He means wrong silkie. 172 00:16:29,410 --> 00:16:34,960 So is on this, you know, it is wrong here, OK, you can bring in this variable. 173 00:16:38,010 --> 00:16:46,440 OK, so just rename it now to return value on returning to you 174 00:16:49,440 --> 00:16:56,770 again, then here, if your return is zero, then put gutsier. 175 00:16:57,090 --> 00:16:58,740 So that is what we are seeing here. 176 00:16:59,200 --> 00:17:01,410 You see, that means we return to zero. 177 00:17:02,750 --> 00:17:07,150 All right, but if you return with a negative one, this would not be true. 178 00:17:07,960 --> 00:17:11,350 Instead, you ran this spot and put Vetsera before you. 179 00:17:11,950 --> 00:17:17,950 So zero a return radio zero means your your result is correct. 180 00:17:18,520 --> 00:17:21,340 Even return radio Ninety-One means exactly zero. 181 00:17:22,300 --> 00:17:25,360 So let's go back and see what makes it return. 182 00:17:25,360 --> 00:17:27,880 Zero changes. 183 00:17:28,990 --> 00:17:30,700 So over here, it returns you. 184 00:17:33,170 --> 00:17:40,790 Here it is, 81, so in here, the moment, the wrong city center city, we return 91. 185 00:17:43,190 --> 00:17:51,260 So if he doesn't return negative one, then he will continue to check all the remaining characters until 186 00:17:51,260 --> 00:17:52,010 he finishes. 187 00:17:52,550 --> 00:17:58,610 Once he finishes, he will look and come on here and return zero. 188 00:17:58,640 --> 00:18:01,680 So we know that this is the return that you see. 189 00:18:01,730 --> 00:18:04,190 This return is you you've won. 190 00:18:04,190 --> 00:18:05,000 So we can actually. 191 00:18:05,000 --> 00:18:05,210 Right. 192 00:18:05,210 --> 00:18:11,090 Click on this and give me a return integer. 193 00:18:14,670 --> 00:18:19,750 So when he return zero, it means you have successfully and technically right here. 194 00:18:20,460 --> 00:18:30,720 So when you return zero here and you go back out to function, the zero, the return here is zero again. 195 00:18:30,840 --> 00:18:34,080 When he comes here, he will return zero. 196 00:18:35,320 --> 00:18:39,520 Returning to zero, so this is true and he shows you the good message. 197 00:18:40,750 --> 00:18:44,790 So this is how to solve these crimes. 198 00:18:45,700 --> 00:18:47,440 That's all for this video. 199 00:18:47,770 --> 00:18:48,790 Thank you for watching.