1 00:00:01,110 --> 00:00:02,200 Hello and welcome. 2 00:00:02,730 --> 00:00:09,660 And this video, I'm going to talk to you about the solution to reverse engineering X2. 3 00:00:10,410 --> 00:00:13,140 So I've opened a store in Iraq and. 4 00:00:14,220 --> 00:00:23,850 Now are looking at the more use the blocks, this first block here, I-40 and Rice and I agree in some 5 00:00:23,850 --> 00:00:32,590 variables over this sun, in this variabilities G string and this whole thing we've already seen before. 6 00:00:33,360 --> 00:00:33,990 So. 7 00:00:34,990 --> 00:00:42,490 This one I was also renamed to restring and the purpose of this part of the longest history in the string 8 00:00:43,060 --> 00:00:51,670 and tie inside the global variable input stream, and then this part here is very. 9 00:00:53,330 --> 00:00:53,810 Most. 10 00:00:55,380 --> 00:01:03,930 Two strings into two registers, Jean Postering is moving the idea and this string here. 11 00:01:05,110 --> 00:01:12,730 He's moving to our site and then there's a check function, which I agree animes have to check, and 12 00:01:12,760 --> 00:01:14,980 the purpose of this is to. 13 00:01:16,430 --> 00:01:17,150 Compay. 14 00:01:18,430 --> 00:01:29,220 This district here with G string and then to see whether they are the same, but is not so straightforward 15 00:01:29,980 --> 00:01:35,700 before it checks June postering, he does some kind of transformation on the string. 16 00:01:36,550 --> 00:01:39,160 So if you enter this function, you will see what I mean. 17 00:01:40,610 --> 00:01:43,490 So here are the eyes in. 18 00:01:44,360 --> 00:01:52,610 I was up with this comment and I and stream, so the string is actually this. 19 00:01:53,630 --> 00:01:56,540 You might think this is a password, but it is not. 20 00:01:58,160 --> 00:01:59,630 So if you try this, you will fail. 21 00:02:00,560 --> 00:02:01,460 So let's go back to. 22 00:02:04,090 --> 00:02:07,740 So here, nothing is moved to our. 23 00:02:09,190 --> 00:02:10,930 And there's also an implicit. 24 00:02:12,140 --> 00:02:13,730 Are the simply string. 25 00:02:15,290 --> 00:02:24,800 So these parameters, no and posturing are the parameters to transform function, which is how Surinamese 26 00:02:24,980 --> 00:02:25,440 transform. 27 00:02:26,320 --> 00:02:33,190 And then here there's also a new variable are eliminating Baffour and Jibaro. 28 00:02:33,410 --> 00:02:38,660 I have analyzed and found the device is the result of the transformation. 29 00:02:39,640 --> 00:02:44,830 So this function, we perform some kind of transformation and is able to her. 30 00:02:45,220 --> 00:02:55,740 And then after that down here, you move Dubuffet to RSI and then you move the numbers trying to idei. 31 00:02:56,710 --> 00:03:06,340 And then here you set the number of mice for comparison and then you do a memory compare that means 32 00:03:06,670 --> 00:03:13,120 and this past year is going to compare your stream with your transform string. 33 00:03:14,340 --> 00:03:24,360 And then only if it's equal, then if we return the result in a hurry so he can go back here. 34 00:03:25,140 --> 00:03:31,070 The result will be in our X, so our ranks will determine whether you have to be successful or not. 35 00:03:31,710 --> 00:03:33,360 You will test with our X is one. 36 00:03:33,370 --> 00:03:36,450 You've already one, then it's not zero. 37 00:03:37,120 --> 00:03:41,100 That means he will go to success is zero. 38 00:03:41,610 --> 00:03:44,040 Then he will go to hear failure. 39 00:03:45,270 --> 00:03:55,800 So is how so many times over here he will now take he will bring up the plus exclamation and plus which 40 00:03:55,810 --> 00:03:56,640 we have seen before. 41 00:03:57,090 --> 00:04:00,000 And then after that he is going to take your input string. 42 00:04:00,930 --> 00:04:11,000 Again, he will persist in pushing into your print printf have been a key function and I will say this 43 00:04:11,010 --> 00:04:18,870 happening is so important in string inside here and input string. 44 00:04:20,390 --> 00:04:28,100 He's in the eye and he's going to take the idea and do some kind of modification to. 45 00:04:29,150 --> 00:04:31,290 And then you bring you bring it up. 46 00:04:31,850 --> 00:04:33,710 This one is it. 47 00:04:35,270 --> 00:04:36,420 So this is how it works. 48 00:04:37,490 --> 00:04:48,710 So the thing is, you have to analyze is how to how this to take your your input string and transform 49 00:04:48,710 --> 00:04:48,860 it. 50 00:04:50,370 --> 00:04:50,650 Right. 51 00:04:51,110 --> 00:04:59,820 So basically, I've already put a comment here to show you what one is, but this is basically taking 52 00:04:59,820 --> 00:05:02,450 your your input stream. 53 00:05:03,360 --> 00:05:10,020 And then do some kind of transformation, you conveniently have transformed, so for better understanding, 54 00:05:10,020 --> 00:05:16,560 easier understanding and going after to transform this industry, you compare to see that 80, 90 and 55 00:05:16,560 --> 00:05:16,930 so on. 56 00:05:18,210 --> 00:05:24,480 So now what remains to be done is to analyze how it's a transformation done, to understand that the 57 00:05:24,480 --> 00:05:34,500 FTA and then and then I saw this U.S. Navy SEAL moving yo yo, and I'm starting to job and I hear. 58 00:05:35,510 --> 00:05:44,480 It is putting your input between the RTI and Jibaro here, so he's going to take your input string, 59 00:05:44,480 --> 00:05:48,520 perform some kind of transformation in Ghaffur. 60 00:05:49,430 --> 00:05:51,920 So we have to enter this function to see how he does it. 61 00:05:54,050 --> 00:05:55,440 And here is why he's doing it. 62 00:05:56,090 --> 00:06:02,600 So over here, he's taking all your input string. 63 00:06:04,250 --> 00:06:13,790 And going in three, two times in a row now, each time you lose, you notice how labeled are 14 is 64 00:06:13,790 --> 00:06:14,900 high, meaning the count. 65 00:06:16,130 --> 00:06:19,680 So the country doesn't agree to you continue to look. 66 00:06:19,700 --> 00:06:22,660 So you looked at two times a year. 67 00:06:23,150 --> 00:06:25,970 I put a comment here to indicate three, two times. 68 00:06:28,250 --> 00:06:36,950 And here what he does is you call a function Jewish community federation function, and he will go in 69 00:06:38,270 --> 00:06:40,610 each time he goes in, he counts. 70 00:06:40,910 --> 00:06:43,580 It is a counter argument as a barometer. 71 00:06:44,510 --> 00:06:51,620 He also takes how the eye has to argue in the eye from here in blistering. 72 00:06:52,660 --> 00:06:59,500 OK, so listen to this and see how he does and then I analyze this, if you enter this loop and you 73 00:06:59,500 --> 00:07:06,810 will find it, what is actually doing is it is performing all this kind of operation inside here. 74 00:07:07,330 --> 00:07:16,000 I assume the idea is actually easier to follow the first thing that he has to fighting it and then it 75 00:07:16,870 --> 00:07:17,230 doesn't. 76 00:07:17,230 --> 00:07:27,010 An operation with one F one F means fine ones in binary, which is a musketry and is limiting the operation 77 00:07:27,010 --> 00:07:27,940 to fight bitterly. 78 00:07:28,610 --> 00:07:31,260 That's why he's doing the mosque then issue. 79 00:07:31,270 --> 00:07:31,570 Right. 80 00:07:32,420 --> 00:07:33,310 And she's right. 81 00:07:34,750 --> 00:07:37,470 This operation there must issue, right? 82 00:07:40,480 --> 00:07:44,890 And you all hear these stories actually are going down for it. 83 00:07:46,450 --> 00:07:53,230 So I you see there just happens three times once here and here and any time. 84 00:07:56,130 --> 00:08:01,080 And in hearing anything and then after a disservice to disability, right? 85 00:08:02,350 --> 00:08:12,370 Three times he would then have you assume that the result is starting X, which is why so now over here 86 00:08:12,850 --> 00:08:22,030 he would take the Y and then he will add to itself and is to Y, and here you had to be so against this 87 00:08:22,030 --> 00:08:22,530 three way. 88 00:08:23,170 --> 00:08:30,360 And finally he were performing a bit, masking using the N operator in here. 89 00:08:30,370 --> 00:08:34,320 So let me meeting you our operation to find her. 90 00:08:35,180 --> 00:08:39,090 So in effect what he is doing is rotating the beast to the right. 91 00:08:41,110 --> 00:08:49,740 Now, if you want to implement this insight, Python, and this is what it looks like, I've got the 92 00:08:49,750 --> 00:08:50,350 scoop here. 93 00:08:52,540 --> 00:08:54,250 So I open this in the terminal 94 00:08:57,890 --> 00:08:58,960 SkyPan Scritch. 95 00:09:01,430 --> 00:09:05,090 All right, so I'll explain this in the next video. 96 00:09:05,630 --> 00:09:06,560 Thank you for watching.