dELTA
November 25th, 2002, 23:35
With this post I attach a small com-file. It is a pure dump of the executable code in the Master Boot Record of a harddisk on a Windows 98 (Swedish language version) computer.
When I disassemble this file in IDA I notice several annoying and confusing things, that I would really appreciate if some of you assembly/IDA-wizards could clarify for me.
First of all, all offsets mentioned below are the offsets shown in IDA. The corresponding file offsets are 100h less (IDA takes into consideration the runtime PSP when adding 100h to the offsets I guess?).
Strange thing number 1:
At offset 01A6 there is a jmp to offset 04A6. At this target address (04A6) IDA only disassembles one single instruction, namely "cli". Then it has just stops the disassembly and marks the bytes after this as "unexplored". Why would it do this? As far as I know, the "cli" instruction only modifies the interrupt mask, and does not in any way divert the control flow?
Strange thing number 2:
The practically same thing happens at offset 0175, which contains a call to offset 01D7. At this target address (01D7) IDA also only disassembles one single instruction, namely "push si". Then it just stops the disassembly and marks the bytes after this as "unexplored". And "push si" certainly does not divert the control flow, right? What's up with that?
Strange thing number 3:
At offset 013C, there is a call to offset 01D6. At this target address (01D6) IDA disassembles one instruction, and then it decides that this instruction is the entire body of this called procedure, like this:
proc near
01D6: inc cx
endp
Note also, that the next offset is the target offset mentioned in situation 2 above, containing the instruction "push si", which is in turn followed by the "unexplored" data.
Strange thing common for all these situations:
Whenever I try to force IDA to treat any unexplored bytes as code (e.g. the bytes after the single instructions in situation 1 and 2), by putting the cursor on the first line of unexplored data and then pressing the C button, I always just get the message 'Command "MakeCode" failed'.
What the %@£€#%?!? That is exactly how that IDA-command always repsonds when I try to use it, it has never been able to work a single time for me. Just because IDA has decided in advance that these bytes are not code it seems to refuse to even consider the possibility, even though the traced control flow runs right into these offsets!
Summary:
So, my questions are:
Why does IDA just halt the disassembly on arbitrary places like this (and end procedures on equally arbitrary places, like in situation 3 above)? And what am I doing wrong with the C ("Make code"
command? There's not much "interactive" about the disassembler if it always overrides any and all of my requests to change its initial opinion about anything, now is it.
Has anybody ever gotten that command to work?
I'm using IDA 4.21, but it has acted exactly the same for me with earlier versions too.
Any explanation regarding any of these issues would be greatly appreciated, since this is starting to drive me completely crazy.
Thanks!
When I disassemble this file in IDA I notice several annoying and confusing things, that I would really appreciate if some of you assembly/IDA-wizards could clarify for me.
First of all, all offsets mentioned below are the offsets shown in IDA. The corresponding file offsets are 100h less (IDA takes into consideration the runtime PSP when adding 100h to the offsets I guess?).
Strange thing number 1:
At offset 01A6 there is a jmp to offset 04A6. At this target address (04A6) IDA only disassembles one single instruction, namely "cli". Then it has just stops the disassembly and marks the bytes after this as "unexplored". Why would it do this? As far as I know, the "cli" instruction only modifies the interrupt mask, and does not in any way divert the control flow?
Strange thing number 2:
The practically same thing happens at offset 0175, which contains a call to offset 01D7. At this target address (01D7) IDA also only disassembles one single instruction, namely "push si". Then it just stops the disassembly and marks the bytes after this as "unexplored". And "push si" certainly does not divert the control flow, right? What's up with that?
Strange thing number 3:
At offset 013C, there is a call to offset 01D6. At this target address (01D6) IDA disassembles one instruction, and then it decides that this instruction is the entire body of this called procedure, like this:
proc near
01D6: inc cx
endp
Note also, that the next offset is the target offset mentioned in situation 2 above, containing the instruction "push si", which is in turn followed by the "unexplored" data.
Strange thing common for all these situations:
Whenever I try to force IDA to treat any unexplored bytes as code (e.g. the bytes after the single instructions in situation 1 and 2), by putting the cursor on the first line of unexplored data and then pressing the C button, I always just get the message 'Command "MakeCode" failed'.
What the %@£€#%?!? That is exactly how that IDA-command always repsonds when I try to use it, it has never been able to work a single time for me. Just because IDA has decided in advance that these bytes are not code it seems to refuse to even consider the possibility, even though the traced control flow runs right into these offsets!
Summary:
So, my questions are:
Why does IDA just halt the disassembly on arbitrary places like this (and end procedures on equally arbitrary places, like in situation 3 above)? And what am I doing wrong with the C ("Make code"


I'm using IDA 4.21, but it has acted exactly the same for me with earlier versions too.
Any explanation regarding any of these issues would be greatly appreciated, since this is starting to drive me completely crazy.

Thanks!