Hello and welcome back.
In this video, listen, we are going to talk about how to use Ida to decompiled and also how to create
structures and use it.
So I created and you correct me, too, you can download this, too now and put it in your folder called
Correct Me.
And let's take a look at micrometeorites.
So I just running it asks you to enter a key, and if I enter wrong, he has poured into the theater
and into any theater and you get the message from.
So now let's take a look and it's good for me to.
So come to.
Contains a new struct data structure called KeyBank with two views or two members in Turkey and into
Syria, and he has two functions success, which is to print the correct string and fail function,
to print the wrong string.
And there's a main function with two integer variables, key in zero used to store the input from the
user.
Here we instantiate data structure kokabee of type struct KeyBank, which we created up here.
Then we initialize the key.
Filby one, two, three, seven and the cereal field.
We one David from the Egypt and Turkey and we read the key a story in the key variable, then it from
the user to enter a zero and the input it and start in the zero variable and then we compare if the
user's key is the key.
BKB the key.
And whether this year with the U.S., it is the same with the candidates here in both are true, then
we call the success function to just play the correct string or else we call the function to display
the wrong string.
So now we are going to decompiled this.
Correct me to using Iida three.
So let's start at.
Click on New and select, correct me to.
And so this is to disassemble assembly.
Now, let's say we want to decompiled, you seem to see Soska.
You can go to view opens up views.
I didn't generate Sudoku.
So Sudoku here refers to the C Soska.
The short cut is fine, you can use that five or so, so Cleeland is click Yes.
And so it has generated the speaker of the Assembly.
And over here, you can see V4 whiffy.
We 67 now, if we want to make it easier to read, we can be labeled an.
So over here, we see in Turkey and here.
It scans for the key and starting before that before is a key, so we can relay this by pressing in
and in KALICKI.
OK, so now it's easier to the way you see all the V4 as being really key here, is this into Syria,
into Syria and yes, can you do if I have the means, if I was in Syria so we can relabel this person
and then call this press.
OK, OK.
And now it's easier to Ricky in Syria than when it comes to here be six and seven.
So we have seven other structures, but he doesn't show.
So we can create our own structure and impose it on six, seven.
So to do that, we can go up here into structures.
And inside here we create a new structure press insert on the Kiewa and KeyBank or any other name you
want with a capital key, OK.
And now you're going to insert two members or two fields, so put your cursor here and press the.
For white digging, for what they're digging for, which is for whites, and then here we can relabel
the few as.
As a key so we can press in and we can legally askey press enter.
OK, OK, now put your cursor down here and then we're are going to add another field, press these
for another time D for work and ready for double.
So this one we are going to relabelling as zero.
So press in and then give the name serial press.
OK, so now you have to fuse for this structure key size four by double and zero also double.
So now we can impose this data structure in our C language code.
So to impose it in here, we can go to six, which we suspect to be a data structure.
No.
Or key.
We just select here press y on the keyboard and here we just keep giving because we want this to be
reinterpreted as a data structure of Thanksgiving.
OK.
And here, the new variable is bigger.
OK, so just so I set out.
So now we see Starkie.
So automatically, this is also a with to serious.
So now you can relabel these vehicles to become something else since we know is a killing.
So what we can do is I'm here giving this so reliable press end and they start giving in lowercase to
differentiate you from the capital K clock.
So now you see it is much easier to eat.
So this is how we can use the compiler to do the compar binary into C source code, and you can also
use the structures gracious and enforce the structure in sight sars-cov-2 to reinterpret the various
data that we see.
So that easy to read.
The same principle that we use in assembly here also applies when we are working with the pseudocode
or the sequel, even if you're not sure what the particular variable does, always reliably.
So that is easier to read.
And if you happen to get more insight as you proceed with the analysis, you can always chastely.
But again, now take note that if you wanted to synchronize this view with the disassembly of you,
you can do it this way.
So just right, click here and synchronize and synchronize and idea of you.
So now whenever you click on this, I mean, you come back here, he will highlight the appropriate
line.
So if you click on this, come back here, you can see he highlighted the spot.
That way you can understand which part of the kahir is being referred to in the assembly here.
So another thing you can do is you can double click on any and the function here to enter into it.
So if you double click on this access function, you can probably show it to you.
And then you to go back escape and you go back here, same thing day, so if you double click on this
function, you come back and show it to you and you skip he goes back again.
So that's all for this video.
Thank you for watching.