I'm decompiling some Direct3D code that makes a lot of indirect calls to __stdcall functions.
For example:
call dword ptr [edx+0xC8h]
which is really:
pD3DDevice->SetRenderState();
IDA doesn't correctly guess the stack pointer change of these calls in every case, so I have to go through and Alt+K the correct SP value manually.
But after doing this I start running into a problem where one side of a branch will have the wrong SP value
I can Alt-K the first instruction with the erroneous SP value but this only takes effect on the next instruction.
Edit:


pD3DDevicenamed. – quitegiddy Apr 25 '23 at 12:52