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

Disassembly:
jmp 0x14001d200
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x5c8
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x102
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x5e8]
mov rax, qword [0x140044018]
xor rax, rbp
mov qword [rbp + 0x578], rax
lea rcx, [0x14004d1f5]
call fcn.140011df2
mov dword [rbp + 4], 0
mov dword [rbp + 0x24], 0
mov dword [rbp + 0x64], 0
mov qword [rbp + 0x88], 0
mov qword [rbp + 0xa8], 0
mov qword [rbp + 0xc8], 0
lea rdx, str.Starting_download_process..._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.A_WinHTTP_Example_Program_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rbp + 0x88], rax
cmp qword [rbp + 0x88], 0
jne 0x14001d2e2
lea rdx, str.Failed_to_open_HTTP_session._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
cmp qword [rbp + 0x88], 0
je 0x14001d317
mov rcx, qword [rbp + 0x5a0]
call fcn.14001147e
xor r9d, r9d
mov r8w, 0x1388
mov rdx, rax
mov rcx, qword [rbp + 0x88]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rbp + 0xa8], rax
cmp qword [rbp + 0xa8], 0
jne 0x14001d334
lea rdx, str.Failed_to_connect_to_server._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
cmp qword [rbp + 0xa8], 0
je 0x14001d385
mov rcx, qword [rbp + 0x5a8]
call fcn.14001147e
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, rax
lea rdx, [0x14003b370]
mov rcx, qword [rbp + 0xa8]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rbp + 0xc8], rax
cmp qword [rbp + 0xc8], 0
jne 0x14001d3a2
lea rdx, str.Failed_to_open_HTTP_request._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
cmp qword [rbp + 0xc8], 0
je 0x14001d3dd
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [rbp + 0x64], eax
cmp dword [rbp + 0x64], 0
jne 0x14001d3f6
lea rdx, str.Failed_to_send_HTTP_request._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
cmp dword [rbp + 0x64], 0
je 0x14001d40e
xor edx, edx
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rbp + 0x64], eax
cmp dword [rbp + 0x64], 0
jne 0x14001d54d
lea rdx, str.Failed_to_receive_response._Retrying..._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
mov rdx, qword [rbp + 0x5b8]
lea rcx, [rbp + 0xe8]
call fcn.1400119a1
nop
lea rdx, str.127.0.0.1
lea rcx, [rbp + 0x128]
call fcn.140011465
nop
mov r8, qword [rbp + 0x5b8]
lea rdx, str.download_
lea rcx, [rbp + 0x168]
call fcn.140011f14
nop
mov rdx, qword [rbp + 0x5b8]
lea rcx, [rbp + 0x498]
call fcn.1400119a1
mov qword [rbp + 0x568], rax
mov rax, qword [rbp + 0x568]
mov qword [rbp + 0x570], rax
lea r8, str..exe
mov rdx, qword [rbp + 0x570]
lea rcx, [rbp + 0x1a8]
call fcn.140011ccb
nop
lea rcx, [rbp + 0x498]
call fcn.140011276
lea rdx, [rbp + 0x1a8]
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011c67
lea rax, [rbp + 0x4d8]
mov qword [rbp + 0x518], rax
mov rdx, qword [rbp + 0x5b8]
mov rcx, qword [rbp + 0x518]
call fcn.140011041
mov qword [rbp + 0x568], rax
mov r9, qword [rbp + 0x568]
lea r8, [rbp + 0x1a8]
lea rdx, [rbp + 0x168]
lea rcx, [rbp + 0x128]
call fcn.140011f05
nop
lea rcx, [rbp + 0x1a8]
call fcn.140011276
nop
lea rcx, [rbp + 0x168]
call fcn.140011c03
nop
lea rcx, [rbp + 0x128]
call fcn.140011c03
nop
lea rcx, [rbp + 0xe8]
call fcn.140011276
mov edx, 0x108
lea rcx, [rbp + 0x1f0]
call fcn.140011578
mov dword [rsp + 0x20], 1
mov r9d, 0x40
mov r8d, 0x20
mov rdx, qword [rbp + 0x5b0]
lea rcx, [rbp + 0x1f0]
call fcn.140011e42
nop
cmp dword [rbp + 0x64], 0
je 0x14001d749
mov dword [rbp + 4], 0
lea rdx, [rbp + 4]
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x14001d5eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x564], eax
lea rdx, str.Error
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
mov ecx, dword [rbp + 0x564]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, str._in_WinHttpQueryDataAvailable._n
mov rcx, rax
call fcn.140011181
mov eax, dword [rbp + 4]
inc eax
mov eax, eax
mov ecx, eax
call fcn.1400115f0
mov qword [rbp + 0x538], rax
mov rax, qword [rbp + 0x538]
mov qword [rbp + 0x48], rax
cmp qword [rbp + 0x48], 0
jne 0x14001d631
lea rdx, str.Out_of_memory_n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
mov dword [rbp + 4], 0
jmp 0x14001d72a
mov eax, dword [rbp + 4]
inc eax
mov eax, eax
mov r8d, eax
xor edx, edx
mov rcx, qword [rbp + 0x48]
call fcn.140011a78
lea r9, [rbp + 0x24]
mov r8d, dword [rbp + 4]
mov rdx, qword [rbp + 0x48]
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x14001d6a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x564], eax
lea rdx, str.Error
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
mov ecx, dword [rbp + 0x564]
mov edx, ecx
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, str._in_WinHttpReadData._n
mov rcx, rax
call fcn.140011181
jmp 0x14001d6e9
mov eax, dword [rbp + 4]
mov r8d, eax
mov rdx, qword [rbp + 0x48]
lea rcx, [rbp + 0x1f0]
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea rdx, str.Downloaded
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
mov edx, dword [rbp + 4]
mov rcx, rax
call qword [sym.imp.MSVCP140D.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, str._bytes._n
mov rcx, rax
call fcn.140011181
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0x558], rax
mov rcx, qword [rbp + 0x558]
call fcn.140011681
cmp qword [rbp + 0x558], 0
jne 0x14001d717
mov qword [rbp + 0x568], 0
jmp 0x14001d72a
mov qword [rbp + 0x48], 0x8123
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0x568], rax
cmp dword [rbp + 4], 0
ja 0x14001d590
lea rdx, str.Download_completed._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
jmp 0x14001d75c
lea rdx, str.Download_failed._n
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011181
cmp qword [rbp + 0xc8], 0
je 0x14001d773
mov rcx, qword [rbp + 0xc8]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rbp + 0xa8], 0
je 0x14001d78a
mov rcx, qword [rbp + 0xa8]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rbp + 0x88], 0
je 0x14001d7a2
mov rcx, qword [rbp + 0x88]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
lea rcx, [rbp + 0x1f0]
call fcn.140011352
nop
mov rcx, qword [rbp + 0x5b8]
call fcn.140011c03
lea rcx, [rbp - 0x40]
lea rdx, [0x14003a2a0]
call fcn.140011b90
mov rcx, qword [rbp + 0x578]
xor rcx, rbp
call fcn.140011695
lea rsp, [rbp + 0x588]
pop rdi
pop rbp
ret