Function at 0x140003aa0
Capabilities:
Execute command
Log keystrokes via polling
Set console window title

Disassembly:
sub rsp, 0x78
mov rax, qword [0x1400a50c0]
xor rax, rsp
mov qword [rsp + 0x38], rax
lea rcx, str.CALCULATOR
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov ecx, reloc.WLDAP32.dll_Ordinal_27
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x14000409f
mov qword [rsp + 0x88], rsi
lea rsi, [0x140000000]
mov qword [rsp + 0x70], rdi
mov edi, dword [rsp + 0x28]
movaps xmmword [rsp + 0x40], xmm8
xorps xmm8, xmm8
mov qword [rsp + 0x80], rbx
movaps xmmword [rsp + 0x60], xmm6
movaps xmmword [rsp + 0x50], xmm7
call fcn.1400043d0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Enter_a_number:_n
movsd qword [rsp + 0x28], xmm8
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x1400951a4]
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [rsp + 0x28]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::operator___double____ptr64____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
je 0x140003bee
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str._nEnter_a_number:_n
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x1400951a4]
call fcn.140003520
mov rdx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
xor r8d, r8d
mov rax, qword [rdx]
movsxd rcx, dword [rax + 4]
add rcx, rdx
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
mov edx, 0x7b
lea r8d, [rdx - 0x71]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::ignore_long_long___int64___int____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [rsp + 0x28]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::operator___double____ptr64____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
jne 0x140003b70
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Enter_an_operation____________________n
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x1400951a4]
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x20], 0
call fcn.140004150
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Enter_a_second_number:_n
movsd qword [rsp + 0x30], xmm8
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x1400951a4]
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::operator___double____ptr64____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
je 0x140003cff
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str._nEnter_a_second_number:_n
call fcn.140003520
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x1400951a4]
call fcn.140003520
mov rdx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
xor r8d, r8d
mov rax, qword [rdx]
movsxd rcx, dword [rax + 4]
add rcx, rdx
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
mov edx, 0x7b
lea r8d, [rdx - 0x71]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::ignore_long_long___int64___int____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea rdx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::operator___double____ptr64____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
jne 0x140003c81
movsx eax, byte [rsp + 0x20]
add eax, 0xffffffdf
cmp eax, 0x3d
ja case.0x140003d24.40
cdqe
movzx eax, byte [rsi + rax + 0x40d4]
mov ecx, dword [rsi + rax*4 + 0x40b4]
add rcx, rsi
jmp rcx
movsd xmm1, qword [rsp + 0x28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095238]
call fcn.140003520
movsd xmm6, qword [rsp + 0x30]
mov rcx, rax
movaps xmm1, xmm6
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
addsd xmm6, qword [rsp + 0x28]
mov rcx, rax
movaps xmm1, xmm6
jmp 0x140003fa5
movsd xmm7, qword [rsp + 0x28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
movaps xmm1, xmm7
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x14009523c]
call fcn.140003520
movsd xmm1, qword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
subsd xmm7, qword [rsp + 0x30]
mov rcx, rax
movaps xmm1, xmm7
jmp 0x140003fa5
movsd xmm1, qword [rsp + 0x28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095240]
call fcn.140003520
movsd xmm6, qword [rsp + 0x30]
mov rcx, rax
movaps xmm1, xmm6
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
mulsd xmm6, qword [rsp + 0x28]
mov rcx, rax
movaps xmm1, xmm6
jmp 0x140003fa5
movsd xmm7, qword [rsp + 0x28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
movaps xmm1, xmm7
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095244]
call fcn.140003520
movsd xmm1, qword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
divsd xmm7, qword [rsp + 0x30]
mov rcx, rax
movaps xmm1, xmm7
jmp 0x140003fa5
movsd xmm1, qword [rsp + 0x28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095248]
call fcn.140003520
movsd xmm1, qword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
cvttsd2si ecx, qword [rsp + 0x30]
mov r8, rax
cvttsd2si eax, qword [rsp + 0x28]
cdq
idiv ecx
mov rcx, r8
movd xmm1, edx
jmp 0x140003fa1
movsd xmm6, qword [rsp + 0x28]
cvttsd2si ecx, xmm6
test ecx, ecx
jne 0x140003ee6
xor edi, edi
jmp 0x140003efb
cmp ecx, 1
jl 0x140003efb
mov edi, 1
mov eax, edi
imul edi, eax
inc eax
cmp eax, ecx
jle 0x140003ef2
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x14009524c]
call fcn.140003520
movaps xmm1, xmm6
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
movd xmm1, edi
mov rcx, rax
jmp 0x140003fa1
movsd xmm1, qword [rsp + 0x28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095250]
call fcn.140003520
movsd xmm1, qword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
lea rdx, [0x140095234]
call fcn.140003520
cvttsd2si ecx, qword [rsp + 0x28]
mov rbx, rax
movd xmm0, ecx
cvttsd2si ecx, qword [rsp + 0x30]
cvtdq2pd xmm0, xmm0
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll_pow
cvttsd2si ecx, xmm0
movd xmm1, ecx
mov rcx, rbx
cvtdq2pd xmm1, xmm1
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___double____ptr64]
mov rcx, rax
call fcn.140004210
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x1400034e0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Press_any_key_to_continue_or_ESC_to_go_back_to_main_menu
call fcn.140003520
lea rdx, [0x1400034e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
call qword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__getch]
mov ecx, reloc.WLDAP32.dll_Ordinal_27
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
je 0x140004059
call fcn.1400044d0
jmp 0x140004066
mov rcx, qword [0x1400a64b8]
mov edx, recv
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Invalid_operation.
call fcn.140003520
lea rdx, [0x1400034e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [0x1400a64b8]
mov edx, 7
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [0x140094eb4]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov ecx, reloc.WLDAP32.dll_Ordinal_27
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
je 0x140003b08
movaps xmm8, xmmword [rsp + 0x40]
movaps xmm7, xmmword [rsp + 0x50]
movaps xmm6, xmmword [rsp + 0x60]
mov rdi, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140081f30
add rsp, 0x78
ret