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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x10a0]
mov eax, 0x11a0
call fcn.140061b80
sub rsp, rax
mov rax, qword [0x1400c2080]
xor rax, rsp
mov qword [rbp + 0x1090], rax
movzx esi, dx
mov rbx, rcx
xor r14d, r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.Mozila_5.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rdi, rax
test rax, rax
je 0x1400573e6
xor r9d, r9d
movzx r8d, si
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rsi, rax
test rax, rax
je 0x1400573dd
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea r8, str._in_get_file
lea rdx, [0x1400af940]
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
je 0x1400573d4
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1400573cb
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1400573cb
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x80]
call fcn.140091db0
lea rcx, [rbp - 0x80]
call fcn.14005d2e0
nop
cmp qword [rbp + 8], r14
je 0x140057346
nop word [rax + rax]
lea r9, [rsp + 0x78]
mov r8d, 0x1000
lea rdx, [rbp + 0x90]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140057306
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x1400572b1
mov r8d, eax
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x80]
call fcn.14005d890
cmp dword [rsp + 0x78], 0
ja 0x140057270
lea rcx, [rbp - 0x78]
call fcn.14005e150
test rax, rax
jne 0x140057346
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov eax, 6
mov edx, 2
cmp qword [rbp + rcx - 0x38], 0
cmovne eax, edx
or eax, dword [rbp + rcx - 0x70]
and eax, 0x17
mov dword [rbp + rcx - 0x70], eax
mov edx, dword [rbp + rcx - 0x6c]
and edx, eax
je 0x140057346
test dl, 4
je 0x140057461
lea rbx, str.ios_base::badbit_set
jmp 0x140057476
lea rcx, [rbp - 0x78]
call fcn.14005e150
test rax, rax
jne 0x140057346
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov eax, 6
mov edx, 2
cmp qword [rbp + rcx - 0x38], 0
cmovne eax, edx
or eax, dword [rbp + rcx - 0x70]
and eax, 0x17
mov dword [rbp + rcx - 0x70], eax
mov edx, dword [rbp + rcx - 0x6c]
and edx, eax
jne 0x14005740d
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x78]
call fcn.14005d230
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rsp + rcx + 0x7c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x28], rax
lea rcx, [rbp + 0x28]
call fcn.14006047c
nop
jmp 0x1400573e6
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, qword [rbp + 0x1090]
xor rcx, rsp
call fcn.140060e90
lea r11, [rsp + 0x11a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
test dl, 4
je 0x14005741b
lea rbx, str.ios_base::badbit_set
jmp 0x140057430
test dl, 2
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x40]
call fcn.1400557a0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.1400562a0
lea rdx, [0x1400c0060]
lea rcx, [rsp + 0x50]
call fcn.1400630b4
int3
test dl, 2
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x40]
call fcn.1400557a0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.1400562a0
lea rdx, [0x1400c0060]
lea rcx, [rsp + 0x50]
call fcn.1400630b4
int3