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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
mov eax, 0x2170
call fcn.1400040d0
sub rsp, rax
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x2160], rax
mov r14, r8
mov rsi, rdx
mov rdi, rcx
xor bpl, bpl
xor ebx, ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.WinHTTP_Example_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r12, rax
test rax, rax
je 0x1400014e7
cmp qword [rdi + 0x18], 7
jbe 0x1400012f7
mov rdi, qword [rdi]
mov r8d, 0x50
xor r9d, r9d
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r15, rax
test rax, rax
je 0x1400014de
cmp qword [rsi + 0x18], 7
jbe 0x140001322
mov rsi, qword [rsi]
mov dword [rsp + 0x30], pe_nt_image_headers64
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, rsi
lea rdx, [0x140005580]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
test rax, rax
je 0x1400014d5
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1400014cc
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1400014cc
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov rdx, r14
cmp qword [r14 + 0x18], 7
jbe 0x1400013ae
mov rdx, qword [r14]
lea rcx, [rsp + 0x50]
call fcn.140002970
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rax
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
cmp qword [rsp + 0xd8], 0
je 0x1400014c2
mov dword [rsp + 0x40], ebx
lea r9, [rsp + 0x40]
mov r8d, 0x2000
lea rdx, [rsp + 0x160]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001433
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x160]
lea rcx, [rsp + 0x50]
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__::write_char_const____ptr64__long_long___int64_____ptr64]
mov eax, dword [rsp + 0x40]
add ebx, eax
jmp 0x140001437
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x1400013f3
lea rcx, [rsp + 0x58]
call fcn.1400028b0
test rax, rax
jne 0x140001468
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov bpl, 1
lea rdx, str.Downloaded
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140002ba0
mov edx, ebx
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._bytes_to
call fcn.140002ba0
mov r8, qword [r14 + 0x10]
cmp qword [r14 + 0x18], 7
jbe 0x1400014a6
mov r14, qword [r14]
mov rdx, r14
mov rcx, rax
call fcn.140003050
lea rdx, [0x140002d80]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
lea rcx, [rsp + 0x50]
call fcn.140001510
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
movzx eax, bpl
mov rcx, qword [rsp + 0x2160]
xor rcx, rsp
call fcn.140003280
add rsp, 0x2170
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret