I have an assignment and I tried solving it. However I can't seem to solve it, despite double checking everything and investing multiple hours.
My task is to reverse engineer the following functions to high-level C-code and determine the return value of f(1,2,3)
.
This is my approach:
The problem:
f(1,2,3)
can not be determined, because line 6 in function f
results in a jump to loc_56C
, where g(2,3)
is called. In line 14 push dword ptr [ebp+0Ch]
is used, however only 2 parameter are supplied for function g
at line 16 (8 Byte), meaning we do not know what lies on that memory location (12 Byte above base pointer). As a result, the return value can not be determined.
Is it true, that f(1,2,3)
can not be determined?
call
puts something on the stack too... – Paweł Łukasik May 09 '21 at 19:36