Guest User

Untitled

a guest
Oct 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int cow(int a,int b,int c){
  6. __asm__("mov eax,[ebp+8]");
  7. }
  8.  
  9. int main(int argc, char** argv){
  10. unsigned int ok = cow(99,555,666);
  11. printf("%d\n",ok);
  12.  
  13. return 0;
  14. }
  15.  
  16. ////////// MAIN //////
  17. 0x080483ec <+0>: push ebp
  18. 0x080483ed <+1>: mov ebp,esp
  19. 0x080483ef <+3>: and esp,0xfffffff0
  20. 0x080483f2 <+6>: sub esp,0x20
  21. 0x080483f5 <+9>: mov DWORD PTR [esp+0x8],0x29a //666
  22. 0x080483fd <+17>: mov DWORD PTR [esp+0x4],0x22b //555
  23. 0x08048405 <+25>: mov DWORD PTR [esp],0x63 //99
  24. 0x0804840c <+32>: call 0x80483e4 <cow>
  25.  
  26.  
  27.  
  28.  
  29. ///////// COW ////////
  30. 0x080483e4 <+0>: push ebp
  31. 0x080483e5 <+1>: mov ebp,esp
  32. 0x080483e7 <+3>: mov eax,DWORD PTR [ebp+0x8]
  33. 0x080483ea <+6>: pop ebp
  34. 0x080483eb <+7>: ret
Add Comment
Please, Sign In to add comment