Reverse Engineering for Beginners

(avery) #1

CHAPTER 6.PRINTF()WITH SEVERAL ARGUMENTS CHAPTER 6.PRINTF()WITH SEVERAL ARGUMENTS


call ...
...
push a1
push a2
push a3
call ...
add esp, 24


Here is a real-world example:


Listing 6.1: x86

.text:100113E7 push 3
.text:100113E9 call sub_100018B0 ; takes one argument (3)
.text:100113EE call sub_100019D0 ; takes no arguments at all
.text:100113F3 call sub_10006A90 ; takes no arguments at all
.text:100113F8 push 1
.text:100113FA call sub_100018B0 ; takes one argument (1)
.text:100113FF add esp, 8 ; drops two arguments from stack at once

Free download pdf