-
11th April 2016, 23:25
#1
Assadministrator
[IDA Pro] Add C structures for HexRays decompiler
A) View -> Open subviews -> Structures
B) Gonna see this window:
C) Edit -> Add struct type
D) Just enter a name, e.g. msg_t
E) Now we have this empty structure, we can't work further on it in "Local Types" window, so we need to add at least one element to it.
Add one element by clicking once on msg_t and press d multiple times (it will circle 1, 2, 4 bytes iirc, just let it on 4 bytes e.g.)
If you don't add an element, the "Local Types" window will show this (or I fucked up my IDA on some previous attempts...):
F) Should look like this now:
G) Now go to "Local Types" window
H) Right-click on msg_t and click "Edit..."
I) It will look like this first:
J) Just enter the structure as in Quake3 or RTCW/ET:
K) Now it will look like this:
L) Decompile some function using msg_t, e.g. MSG_WriteByte:
Click once on a1, press y, and change the type to msg_t *msg.
M) Tada, we have some nicely decompiled function, way easier to read:
-
The Following 4 Users Say Thank You to kung foo man For This Useful Post:
BratokHR (10th December 2016),kubislav23 (24th December 2017),Mitch (12th April 2016),voron00 (12th April 2016)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules