I have this kind of code:

enter image description here

I have reversed the struct entirely, and when I try to cast to ClientGame*, instead of:

if(mainStruct->something & 2)

I see:

enter image description here

The offsets 0x364, 0x370, and 0x374 are also reversed and each one has the size that IDA wants (0x374 is a db, 0x364 and 0x370 are dd)

Is there any way to fix it? Thanks!

  • After pressing Y to cast mainStruct, did you press F5 to refresh the decompilation? Jul 23 '14 at 14:25
  • Yep, I did, and it changes to what you see in the 2nd image.
    – rev
    Jul 23 '14 at 14:32
  • 1
    Can you please update the second screenshot to show the int __cdecl ... line? And can you also include a screenshot of your ClientGame struct layout? Jul 23 '14 at 14:51
  • Yes, of course. I also named it: puu.sh/aqMfA/9949adecb1.png / puu.sh/aqMje/fa3a9c8c6e.png (as you can see, all the fields are exactly as IDA wants them to be)
    – rev
    Jul 25 '14 at 18:15
  • The screenshot shows that the function argument is an int. You didn't cast it. Jul 26 '14 at 2:12

Your Answer

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

Browse other questions tagged or ask your own question.