Why is function call terminating the debug process on IDA Freeware?

162 Views Asked by At

I am solving a Reverse Engineering capture the flag challenge where I have to find a flag in the format flag{thisistheflag}. Below is the link to a GitHub Repository that contains the given exe file that I have to reverse engineer.

https://github.com/davepatel3/captureTheFlagReverseEngineering

When I try to execute the binary file for the exe, I just get "Error Code 1". Looking at the graph view on IDA pro allows me to see I have to switch the jnz to a jz, as shown in the image below. This image just shows the IDA Freeware graph view of the jnz to jz switch in the first block and the line with the issue. The line in particular I am stuck on is the call ds:atoi line. When I use debugger and step over this line the program immediately terminates indicating there is an error in that function, which I likely have to fix. I am quite new to assembly and CTF in general so I have minimal idea of how I can go about this. To best help with this issue I think it would be a good idea to go the the github link I provided and actually open the exe in your local IDA/Ghidra and see for yourself.

I have tried deleting the function entirely which just causes some memory issues. I have also tried to hardcode the return value of the function to see if that would cause the error to not occur. Neither of these solutions seem to work though. The only other solution I can think of is modifying the assembly code, which I have no clue how to do.

0

There are 0 best solutions below