Function at 0x140003460
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push rdi
push r12
push r15
sub rsp, 0x70
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov r15, rcx
xor edi, edi
lea rcx, str.A_WinHTTP_Example_Program_1.0
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r12, rax
test rax, rax
jne 0x1400034c9
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_initialize_WinHTTP_session
call fcn.140001050
lea rdx, [0x1400022d0]
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 al, 1
jmp 0x1400037be
mov r8d, 0x1bb
mov qword [rsp + 0x68], r13
xor r9d, r9d
lea rdx, str.myexternalip.com
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r13, rax
test rax, rax
jne 0x140003522
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_connect_to_server
call fcn.140001050
lea rdx, [0x1400022d0]
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, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, 1
jmp 0x1400037b9
mov dword [rsp + 0x30], 0x800000
lea r8, str._raw
mov qword [rsp + 0x28], rdi
lea rdx, [0x140006700]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
mov rcx, r13
mov qword [rsp + 0xa0], rbp
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbp, rax
test rax, rax
jne 0x140003583
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_open_request
call fcn.140001050
lea rdx, [0x1400022d0]
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]
jmp 0x1400035e9
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], edi
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], edi
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1400035ae
lea rdx, str.Failed_to_send_request
jmp 0x1400035c4
xor edx, edx
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x140003602
lea rdx, str.Failed_to_receive_response
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001050
lea rdx, [0x1400022d0]
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, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, 1
jmp 0x1400037b1
mov qword [rsp + 0x98], rbx
movzx ebx, byte [rsp + 0x40]
mov qword [rsp + 0xa8], rsi
mov qword [rsp + 0x60], r14
mov dword [rsp + 0x48], edi
lea rdx, [rsp + 0x44]
mov dword [rsp + 0x44], edi
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x14000375a
mov ecx, dword [rsp + 0x44]
inc ecx
call fcn.140004d78
mov rsi, rax
test rax, rax
je 0x140003751
mov r8d, dword [rsp + 0x44]
xor edx, edx
inc r8d
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8d, dword [rsp + 0x44]
lea r9, [rsp + 0x48]
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1400036a5
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Error_in_WinHttpReadData
call fcn.140001050
lea rdx, [0x1400022d0]
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]
jmp 0x14000373c
cmp byte [r15], 0
jne 0x14000373c
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Received_data:
call fcn.140001050
mov rcx, rax
mov rdx, rsi
call fcn.140001050
lea rdx, [0x1400022d0]
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]
lea rcx, [r15 + 8]
mov rdi, 0xffffffffffffffff
nop dword [rax + rax]
inc rdi
cmp byte [rsi + rdi], 0
jne 0x1400036f0
mov rax, qword [rcx + 0x18]
cmp rdi, rax
ja 0x140003727
mov r14, rcx
cmp rax, 0xf
jbe 0x14000370e
mov r14, qword [rcx]
mov qword [rcx + 0x10], rdi
mov r8, rdi
mov rcx, r14
mov rdx, rsi
call sub.VCRUNTIME140.dll_memmove
mov byte [r14 + rdi], 0
jmp 0x140003736
mov r9, rsi
movzx r8d, bl
mov rdx, rdi
call fcn.140001a40
mov byte [r15], 1
xor edi, edi
mov rcx, rsi
call fcn.140004d70
cmp dword [rsp + 0x44], 0
ja 0x140003620
jmp 0x14000377d
lea rdx, str.Out_of_memory
jmp 0x140003761
lea rdx, str.Error_in_WinHttpQueryDataAvailable
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001050
lea rdx, [0x1400022d0]
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, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
movzx eax, byte [r15]
mov r14, qword [rsp + 0x60]
mov rsi, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa0]
mov r13, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140004e90
add rsp, 0x70
pop r15
pop r12
pop rdi
ret