Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int cow(int a,int b,int c){
- __asm__("mov eax,[ebp+8]");
- }
- int main(int argc, char** argv){
- unsigned int ok = cow(99,555,666);
- printf("%d\n",ok);
- return 0;
- }
- ////////// MAIN //////
- 0x080483ec <+0>: push ebp
- 0x080483ed <+1>: mov ebp,esp
- 0x080483ef <+3>: and esp,0xfffffff0
- 0x080483f2 <+6>: sub esp,0x20
- 0x080483f5 <+9>: mov DWORD PTR [esp+0x8],0x29a //666
- 0x080483fd <+17>: mov DWORD PTR [esp+0x4],0x22b //555
- 0x08048405 <+25>: mov DWORD PTR [esp],0x63 //99
- 0x0804840c <+32>: call 0x80483e4 <cow>
- ///////// COW ////////
- 0x080483e4 <+0>: push ebp
- 0x080483e5 <+1>: mov ebp,esp
- 0x080483e7 <+3>: mov eax,DWORD PTR [ebp+0x8]
- 0x080483ea <+6>: pop ebp
- 0x080483eb <+7>: ret
Add Comment
Please, Sign In to add comment