I was disassembling a function using IDA's pseudocode view and for some reason, IDA did not associated labels to some of the variables

To fix that, I added some comments so I can work with it.

Is there a way to manually add such variables ?

I saw a SE post saying to make a script, I'm a new IDA user, I don't really want to bother with that yet.

If it's not possible or """complicated""" (don't throw me rocks please ;) ) that's no big deal, the function is not that large I can work on it without problems, I'm asking this to get the hang of IDA or to get a general approach of this problem.

Thank you for your time.


All highlighted identifiers looks like class members (or structure members, depends on the code) where the object is pointed by this pointer, which is located not on stack of this specific function, but in other place.

You can handle it as follows:

  1. Right click on this
  2. Find in the context menu something like "Create structure" and press it
  3. Give this structure a name
  4. Enjoy results
  5. You can rename structure fields by pressing N just as in case of ordinary variables.
  6. You can edit the structure in structures window (View->Open subviews->Structures, refresh the pseudo-code view after edit)

You'll probably need to assign the same pointer type to this_ variable. By the way, if you'll press = on this_ variable you'll be able to define that this and this_ are actually the same thing, this will simplify the resulting pseudo-code.

Good luck

  • Right! Silly me, of course these are not arguments or stack variables, I'll try to use the data structure feature when I'll get to my pc, thanks for the tips I'll come back ;D
    – Riptide
    Jul 25 '16 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.