I'm trying to call a function with a function pointer in C++, but I can't find any convention that fits it. Its stack arguments are (right to left):
func(float x, float y, int unk);
...but ecx needs to be pointing to a buffer it can use for output / storage. That would be __thiscall, but the caller cleans up the stack (adds 12 to esp). This is what I have right now:
((void(__thiscall*)(char*,float,float,int))(0x1234567))(a, b, c);
but it causes the application to crash because the stack isn't evened.
How can I call this?