Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- typedef __cdecl void (*lazyFunc)(void);
- int __cdecl functionA(int a, int b) {
- cout<<a<<" "<<b<<endl;
- return a+b;
- }
- int main() {
- int result = 0;
- lazyFunc func = (lazyFunc)(functionA);
- asm("push 2");
- asm("push 3");
- func();
- asm("add esp, 8");
- asm("mov eax, 7");
- cout<<result<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement