I'm trying to RE a Windows executable compiled with VS 2008. After the initial autoanalysis most functions are detected correctly; however, some have wrong end address — for some reason IDA places the end of the function earlier, leaving a chunk of code not associated with any function. The undetected function gets noreturn attribute and often has sp-based autoanalysis failed message. I have fixed most of these problems by hand. The problem is that Hex-Rays seems to use autodetected function boundaries and therefore the decompilation fails after a jump inside the function, which looks like a jump outside to Hex-Rays.
Example hex-rays output:
void __thiscall sub_403CE0(void *this, unsigned int a2, int a3)
{
sub_407F30(this, a2, a3);
JUMPOUT(locret_403CFD);
}
As you can see, there is a JUMPOUT statement at the end of the function. This was correct before the function boundaries were adjusted, but now locret_403CFD belongs to the function itself and is not a jump “out”. Is there a way to tell hex-rays the function doesn't end here and pass a correct function start/end addresses to it?
Ethough — thank you for that — so I undefined the function and defined it again). Unfortunately, the function boundaries are correct andJUMPOUTdoesn't disappear. This looks like a problem with this particular database because it doesn't reproduce on a copy of the same binary, but I would prefer not to start it over — several hours of work would be wasted. – Vladislav Ivanov Sep 20 '15 at 14:28clear_cached_cfuncsdoesn't help. I'll try something else, but my best guess is that I'll have to start over with a clean database. – Vladislav Ivanov Sep 20 '15 at 17:21