Advertisement
atomen

Generated ASM patterns

May 5th, 2012
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. # Note: the first argument specifies the _arguments_ for the generated redirect-function
  2. ./main 0
  3.  
  4. push %ebp
  5. mov %esp,%ebp
  6. call <address>
  7. pop %ebp
  8. ret
  9.  
  10. ./main 1
  11.  
  12. push %ebp
  13. mov %esp,%ebp
  14. sub $0x4,%esp
  15. mov 0x8(%ebp),%eax
  16. mov %eax,0x0(%esp)
  17. call <address>
  18. leave
  19. ret
  20.  
  21.  
  22. ./main 3
  23.  
  24. push %ebp
  25. mov %esp,%ebp
  26. sub $0xc,%esp
  27. mov 0x10(%ebp),%eax
  28. mov %eax,0x8(%esp)
  29. mov 0xc(%ebp),%eax
  30. mov %eax,0x4(%esp)
  31. mov 0x8(%ebp),%eax
  32. mov %eax,0x0(%esp)
  33. call <address>
  34. leave
  35. ret
  36.  
  37. ./main 20
  38.  
  39. push %ebp
  40. mov %esp,%ebp
  41. sub $0x50,%esp
  42. mov 0x54(%ebp),%eax
  43. mov %eax,0x4c(%esp)
  44. mov 0x50(%ebp),%eax
  45. mov %eax,0x48(%esp)
  46. mov 0x4c(%ebp),%eax
  47. mov %eax,0x44(%esp)
  48. mov 0x48(%ebp),%eax
  49. mov %eax,0x40(%esp)
  50. mov 0x44(%ebp),%eax
  51. mov %eax,0x3c(%esp)
  52. mov 0x40(%ebp),%eax
  53. mov %eax,0x38(%esp)
  54. mov 0x3c(%ebp),%eax
  55. mov %eax,0x34(%esp)
  56. mov 0x38(%ebp),%eax
  57. mov %eax,0x30(%esp)
  58. mov 0x34(%ebp),%eax
  59. mov %eax,0x2c(%esp)
  60. mov 0x30(%ebp),%eax
  61. mov %eax,0x28(%esp)
  62. mov 0x2c(%ebp),%eax
  63. mov %eax,0x24(%esp)
  64. mov 0x28(%ebp),%eax
  65. mov %eax,0x20(%esp)
  66. mov 0x24(%ebp),%eax
  67. mov %eax,0x1c(%esp)
  68. mov 0x20(%ebp),%eax
  69. mov %eax,0x18(%esp)
  70. mov 0x1c(%ebp),%eax
  71. mov %eax,0x14(%esp)
  72. mov 0x18(%ebp),%eax
  73. mov %eax,0x10(%esp)
  74. mov 0x14(%ebp),%eax
  75. mov %eax,0xc(%esp)
  76. mov 0x10(%ebp),%eax
  77. mov %eax,0x8(%esp)
  78. mov 0xc(%ebp),%eax
  79. mov %eax,0x4(%esp)
  80. mov 0x8(%ebp),%eax
  81. mov %eax,0x0(%esp)
  82. call <address>
  83. leave
  84. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement