Function at 0x140106ae0
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x140
mov rax, qword [0x1403c2018]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov rsi, rcx
mov ebx, 0x68
mov r8d, ebx
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.14003a220
mov dword [rsp + 0x50], ebx
lea eax, [rbx - 0x67]
mov dword [rsp + 0x60], eax
mov dword [rbp - 0x60], eax
mov dword [rsp + 0x70], eax
lea rbx, [rsi + 0xb0]
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140106b4e
mov rcx, qword [rbx]
lea r9, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
mov r12d, 0x80070000
xor r15d, r15d
test eax, eax
je 0x140106b70
mov edi, r15d
jmp 0x140106b81
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, r12d
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpCrackUrl_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
mov r13, r15
or r14, 0xffffffffffffffff
test edi, edi
js 0x140106c9b
call fcn.140064254
mov rdi, rax
mov qword [rbp - 0x38], r15
movdqa xmm0, xmmword [0x140364f60]
movdqu xmmword [rbp - 0x28], xmm0
mov word [rbp - 0x38], r15w
lea r8d, [r14 + 0xa]
lea rdx, str.OneDrive_
lea rcx, [rbp - 0x38]
call fcn.14001b664
nop
mov r8, r14
inc r8
cmp word [rdi + r8*2], r15w
jne 0x140106be6
mov rdx, rdi
lea rcx, [rbp - 0x38]
call fcn.140019e88
mov qword [rbp - 0x10], r15
xorps xmm0, xmm0
movdqu xmmword [rbp], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x10], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], 7
mov word [rax], r15w
lea rcx, [rbp - 0x38]
call fcn.14001b814
lea rcx, [rbp - 0x10]
cmp qword [rbp + 8], 8
cmovae rcx, qword [rbp - 0x10]
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r13, rax
test rax, rax
je 0x140106c60
mov edi, r15d
jmp 0x140106c71
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, r12d
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpOpen_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
nop
lea rcx, [rbp - 0x10]
call fcn.14001b814
mov r12, r15
test edi, edi
js 0x140106d2b
cmp qword [rbx + 0x18], 8
jb 0x140106cb0
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, [rbp + 0x10]
call fcn.14010ac40
nop
lea rdx, [rbp + 0x10]
cmp qword [rbp + 0x28], 8
cmovae rdx, qword [rbp + 0x10]
xor r9d, r9d
movzx r8d, word [rsp + 0x74]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
xor ebx, ebx
test rax, rax
je 0x140106ceb
mov edi, ebx
jmp 0x140106cff
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpConnect_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
nop
lea rcx, [rbp + 0x10]
call fcn.14001b814
jmp 0x140106d2d
xor ebx, ebx
mov r15, rbx
test edi, edi
js 0x140107032
mov eax, ebx
mov ecx, 0x800000
cmp dword [rsp + 0x64], 2
cmove eax, ecx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, qword [rbp - 0x68]
lea rdx, [0x1403216e8]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov r15, rax
test rax, rax
je 0x140106d78
mov edi, ebx
jmp 0x140106d8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpOpenRequest_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
test edi, edi
js 0x140107032
cmp qword [rsi + 0x30], 0x800
jbe 0x140106de4
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_Additional_request_headers_exceed_the_limit.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
mov edi, 0x800c000c
jmp 0x140107032
cmp qword [rsi + 0x30], rbx
jne 0x140106def
mov rdx, rbx
jmp 0x140106dfd
lea rdx, [rsi + 0x20]
cmp qword [rdx + 0x18], 8
jb 0x140106dfd
mov rdx, qword [rdx]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov r8d, dword [rsi + 0x30]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140106e22
mov edi, ebx
jmp 0x140106e36
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpSendRequest_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
test edi, edi
js 0x140107032
xor edx, edx
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140106e71
mov edi, ebx
jmp 0x140106e85
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpReceiveResponse_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
test edi, edi
js 0x140107032
mov dword [rbp - 0x3c], 4
lea rbx, [rsi + 0x178]
xor eax, eax
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x3c]
mov qword [rsp + 0x20], rax
mov r9, rbx
xor r8d, r8d
mov edx, 0x20000013
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ecx, dword [rbx]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], eax
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpQueryHeaders_returned__d_with_http_code__ld.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
xor ebx, ebx
mov dword [rbp - 0x40], ebx
mov qword [rsp + 0x28], rbx
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edi, [rbx + 0x16]
mov edx, edi
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140107028
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x38], xmm1
mov qword [rbp - 0x28], rbx
mov edx, dword [rbp - 0x40]
shr rdx, 1
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x38]
call fcn.140105080
mov qword [rsp + 0x28], rbx
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov r9, qword [rbp - 0x38]
xor r8d, r8d
mov edx, edi
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140106fae
mov rdx, qword [rbp - 0x38]
inc r14
cmp word [rdx + r14*2], bx
jne 0x140106f83
lea rcx, [rsi + 0x180]
mov r8, r14
call fcn.14001b664
mov edi, ebx
mov eax, dword [rbp - 0x40]
mov dword [rsp + 0x20], eax
lea r8, str.WebClient__p_:_DownloadToStream:_Response_headers_are__ld_bytes_long.
jmp 0x140106fcd
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpQueryHeaders_failed_with_hr0x_08X.
mov r9, rsi
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
nop
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x140107024
mov rax, qword [rbp - 0x28]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14010701f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140107351
call fcn.1400385dc
test edi, edi
js 0x140107032
mov rcx, rsi
call fcn.140107644
mov edi, eax
mov qword [rbp - 0x18], rbx
test edi, edi
js 0x1401072af
lea rcx, [rsi + 0xd0]
cmp qword [rcx + 0x18], 8
jb 0x14010704f
mov rcx, qword [rcx]
lea rax, [rbp - 0x18]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea edx, [r9 + 0x22]
mov r8d, 0x4000000
call qword [sym.imp.SHLWAPI.dll_SHCreateStreamOnFileEx]
mov edi, eax
mov dword [rsp + 0x20], eax
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_SHCreateStreamOnFileEx_returned_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
test edi, edi
js 0x1401072af
mov dword [rbp - 0x40], ebx
xor edx, edx
mov rcx, qword [rsi + 0x80]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14010728e
mov dword [rbp - 0x40], ebx
lea rdx, [rbp - 0x40]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1401071d0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x38], xmm1
mov qword [rbp - 0x28], rbx
mov edx, dword [rbp - 0x40]
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x38]
call fcn.14002ff48
mov dword [rbp - 0x3c], ebx
lea r9, [rbp - 0x3c]
mov r8d, dword [rbp - 0x40]
mov rdx, qword [rbp - 0x38]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14010714f
mov rcx, qword [rbp - 0x18]
mov rax, qword [rcx]
xor r9d, r9d
mov r8d, dword [rbp - 0x3c]
mov rdx, qword [rbp - 0x38]
mov rax, qword [rax + 0x20]
call qword [str.0B__]
mov edi, eax
mov dword [rsp + 0x28], eax
mov eax, dword [rbp - 0x40]
mov dword [rsp + 0x20], eax
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_IStream_Write_of__ld_bytes_with_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
jmp 0x140107184
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpReadData_failed_with_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
nop
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x1401071be
mov rdx, qword [rbp - 0x28]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1401071b9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14010734b
call fcn.1400385dc
cmp dword [rbp - 0x40], ebx
jbe 0x140107204
test edi, edi
js 0x1401072af
jmp 0x14010709d
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [rsp + 0x20], edi
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_WinHttpQueryDataAvailable_failed_with_hr0x_08X.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
test edi, edi
js 0x1401072af
lea r14, [rsi + 0x108]
mov qword [rbp - 0x38], r14
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rbp - 0x30], 1
cmp qword [rsi + 0x58], rbx
jne 0x140107283
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_Writing_to_the_output_IStream
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x170]
call fcn.140065bb0
mov rcx, qword [rsi + 0x58]
mov rbx, qword [rbp - 0x18]
cmp rcx, rbx
je 0x140107283
test rbx, rbx
je 0x14010726c
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [str.0B__]
mov rcx, qword [rsi + 0x58]
mov qword [rsi + 0x58], rbx
test rcx, rcx
je 0x140107283
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [str.0B__]
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1401072af
mov edi, 0x80004004
mov r9, rsi
lea r8, str.WebClient__p_:_DownloadToStream:_Exiting_due_to_aborted_download.
lea rdx, str.WebClient
mov ecx, dword [rsi + 0x16c]
call fcn.140065bb0
mov rax, qword [rsi]
mov edx, edi
mov rcx, rsi
mov rax, qword [rax + 0x78]
call qword [str.0B__]
mov rcx, qword [rsi + 0x88]
call qword [sym.imp.KERNEL32.dll_SetEvent]
test r15, r15
je 0x1401072dc
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r12, r12
je 0x1401072ea
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r13, r13
je 0x1401072f8
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
jns 0x140107305
mov rcx, rsi
call fcn.1401062b8
nop
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x14010731c
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [str.0B__]
nop
mov eax, edi
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.140038910
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.14004689c
nop
call fcn.14004689c
int3