You are on page 1of 2

VA&RE Lab Home

3/13/2023 Assignment

Samiullah Hussain-200990
Download the given exe file. Analyze it on IDA Pro and submit your
findings. Use concepts from previous lab of VARE and assembly
language lab. [CLO-2]
Snippet:

Description:
This is the assembly code for a simple "Hello, World!" program.

The code starts by pushing the base pointer onto the stack and setting the stack pointer to create space
for local variables with "sub rsp, 20h".

Then it calls the standard C++ function "__main" which performs some internal initialization tasks.

The program then loads the address of the string "Hello, world!" into rdx and the reference to the
standard output stream "cout" into rcx. It then calls the overloaded "<<" operator for the standard
output stream, passing in the address of the string "Hello, world!" as the second argument.

The program then loads a reference to the "endl" manipulator, which flushes the output buffer and
inserts a newline character, into rdx and calls the overloaded "<<" operator again, passing in the
reference to the "endl" manipulator as the second argument.

Finally, the program sets the return value to 0 and restores the base pointer and stack pointer before
returning from the main function with "retn".

You might also like