IDA decompilation failure - positive sp value has been found


IDA decompilation failure - positive sp value has been found

from:http://forum.ragezone.com/f923/ida-decompilation-failure-positive-sp-1133151/


RaGEZONE Recommends



Hi, i'm using leaked KMST .IDB file from @Diamondo25 's thread [LEAK] MapleStory Korea Test v.1029 raw EXE w/ debuggables
When i decompile functions in that .IDB file, most of them show up the error: "decompilation failure - adrr:positive sp value has been found". I already use google, but still not have any clear solution. Have anyone faced with that error and know how to resolve it?..Plz help me and guide me how to fix it. Or can you share the fixed .idb file for me plz. IDA decompilation failure - positive sp value has been found

Re: IDA decompilation failure - positive sp value has been found

In IDA, go to Options->General. Within the options menu, check "Stack Pointer":
IDA decompilation failure - positive sp value has been found

Click OK and head to IDA View. On the left, you'll notice that it includes the stack pointer next to each address:
IDA decompilation failure - positive sp value has been found

Now, when a function has a messed up (negative) stack pointer (sp), you'll see a negative value there. For example 02C would be -02C. So, when you get that error, go to the address that says it has negative SP on. Look for a negative SP on the left and find the one above it. In the above example, if 02C were -02C, we'd want to modify the one above it in order to fix the -02C. So, right-click the address right above the negative sp address, and select "Change Stack Pointer".

IDA decompilation failure - positive sp value has been found

A window will popup with the current value. In front of the current difference, put a negative sign ( - ) and click OK. It should re-adjust and fix the function. 

IDA decompilation failure - positive sp value has been found

Hope that helps, good luck!