Function at 0x140004580
Capabilities:
Initialize winhttp library
Read http header
Receive http response

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xe0]
sub rsp, 0x1e0
mov rax, qword [0x14007f080]
xor rax, rsp
mov qword [rbp + 0xd8], rax
mov r12, r9
mov qword [rbp - 0x78], r9
mov r13, r8
mov rsi, rdx
mov r14, rcx
mov qword [rbp], rcx
mov rbx, qword [rbp + 0x140]
mov rax, qword [rbp + 0x148]
mov qword [rbp - 0x70], rax
xor r15d, r15d
mov dword [rsp + 0x44], r15d
lea rcx, [rsp + 0x68]
call fcn.140006310
mov dword [rsp + 0x44], 2
lea r8, [rsp + 0x68]
lea rdx, str.fetch_request
lea rcx, [rbp + 0x98]
call fcn.140007190
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 8
jb 0x140004613
mov rax, qword [rax]
mov rdx, rax
call fcn.140008550
mov rcx, rax
call fcn.140007100
nop
mov rdx, qword [rbp + 0xb0]
cmp rdx, 8
jb 0x14000466a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x98]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004665
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004ea8
call fcn.1400380e4
movdqa xmm0, xmmword [0x140072a90]
movdqu xmmword [rbp + 0xa8], xmm0
mov word [rbp + 0x98], r15w
mov rdx, qword [rbp - 0x80]
cmp rdx, 8
jb 0x1400046c3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400046be
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004eae
call fcn.1400380e4
movdqa xmm0, xmmword [0x140072a90]
movdqu xmmword [rsp + 0x78], xmm0
mov word [rsp + 0x68], r15w
cmp qword [rbx + 0x18], 8
jb 0x1400046e1
mov rbx, qword [rbx]
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
test rax, rax
je 0x140004eb4
mov qword [rbp + 0x90], rax
mov dword [rsp + 0x44], 0x12
mov rdx, rsi
lea rcx, [rbp + 0x90]
call fcn.140003b60
mov rcx, rsi
call fcn.140003f20
movzx ebx, ax
lea rdx, [rsi + 0x40]
lea rcx, [rbp + 0x98]
call fcn.140006310
mov dword [rsp + 0x44], 0x1a
lea rdx, [rbp + 0x98]
cmp qword [rbp + 0xb0], 8
cmovae rdx, qword [rbp + 0x98]
xor r9d, r9d
movzx r8d, bx
mov rcx, qword [rbp + 0x90]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rbx, rax
mov rdx, qword [rbp + 0xb0]
cmp rdx, 8
jb 0x1400047b7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x98]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400047b2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004ef0
call fcn.1400380e4
movdqa xmm0, xmmword [0x140072a90]
movdqu xmmword [rbp + 0xa8], xmm0
mov word [rbp + 0x98], r15w
test rbx, rbx
je 0x140004ef6
mov qword [rbp + 0xc0], rbx
mov dword [rsp + 0x44], 0x1e
mov qword [rbp + 0x88], r15
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x78], xmm1
mov r8d, 3
lea rdx, [0x14006f5a8]
lea rcx, [rsp + 0x68]
call fcn.1400072d0
nop
mov r9, rsi
lea r8, [rsp + 0x68]
lea rdx, [rbp + 0xc0]
lea rcx, [rbp + 0x88]
call fcn.140004220
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, 8
jb 0x140004874
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000486f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004f32
call fcn.1400380e4
movdqa xmm0, xmmword [0x140072a90]
movdqu xmmword [rsp + 0x78], xmm0
mov word [rsp + 0x68], r15w
xor esi, esi
mov byte [rsp + 0x40], sil
mov rbx, qword [rbp + 0x88]
test r15d, r15d
je 0x1400048f4
lea rdx, str.Sending_proxy_credentials
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov rax, r12
cmp qword [r12 + 0x18], 8
jb 0x1400048be
mov rax, qword [r12]
mov r9, r13
cmp qword [r13 + 0x18], 8
jb 0x1400048cc
mov r9, qword [r13]
xor r12d, r12d
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
mov r8d, r15d
lea edx, [r12 + 1]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
test eax, eax
je 0x140004db8
jmp 0x1400048f7
xor r12d, r12d
lea rdx, str.Sending_request
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140004e6c
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140004d7c
mov dword [rbp + 0x70], r12d
mov dword [rbp + 0x80], 4
mov qword [rsp + 0x28], r12
lea rax, [rbp + 0x80]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x70]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140004ff2
mov r12d, dword [rbp + 0x70]
mov eax, r12d
sub eax, 0xc8
je 0x140004b7f
sub eax, 0xc9
je 0x140004a89
cmp eax, 6
je 0x1400049bd
lea rdx, str.Error:_unexpected_status_code
call fcn.140006e00
mov rcx, rax
call fcn.140007100
jmp 0x140004a72
lea rdx, str.407_The_proxy_requires_authentication
call fcn.140006e00
mov rcx, rax
call fcn.140007100
lea r9, [rbp + 0xc8]
lea r8, [rbp + 0xcc]
lea rdx, [rbp + 0xb8]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryAuthSchemes]
test eax, eax
je 0x140004f38
mov eax, dword [rbp + 0xb8]
test al, 0x10
je 0x140004a1d
lea rdx, str.Using_WINHTTP_AUTH_SCHEME_NEGOTIATE
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov r15d, 0x10
jmp 0x140004a51
test al, 2
je 0x140004a3d
lea rdx, str.Using_WINHTTP_AUTH_SCHEME_NTLM
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov r15d, 2
jmp 0x140004a51
test al, 4
je 0x140004a49
mov r15d, 4
jmp 0x140004a51
movzx r15d, al
and r15d, 8
cmp esi, 0x197
jne 0x140004a72
lea rdx, str.Break_for_multiple_407_response
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov byte [rsp + 0x40], 1
mov esi, r12d
cmp byte [rsp + 0x40], 0
jne 0x140004b93
mov r12, qword [rbp - 0x78]
jmp 0x140004896
lea rdx, str.401_The_server_requires_authentication
call fcn.140006e00
mov rcx, rax
call fcn.140007100
lea r9, [rbp + 0x78]
lea r8, [rbp + 0xd0]
lea rdx, [rbp + 0xbc]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryAuthSchemes]
test eax, eax
je 0x140004f74
mov eax, dword [rbp + 0xbc]
test al, 0x10
je 0x140004ae5
lea rdx, str.Using_WINHTTP_AUTH_SCHEME_NEGOTIATE
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov esi, 0x10
jmp 0x140004b1c
test al, 2
je 0x140004b04
lea rdx, str.Using_WINHTTP_AUTH_SCHEME_NTLM
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov esi, 2
jmp 0x140004b1c
test al, 4
je 0x140004b0f
mov esi, 4
jmp 0x140004b1c
test al, 8
je 0x140004a6d
mov esi, 8
lea rdx, str.Sending_server_credentials
call fcn.140006e00
mov rcx, rax
call fcn.140007100
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp qword [rcx + 0x18], 8
jb 0x140004b41
mov rax, qword [rcx]
mov r9, r13
cmp qword [r13 + 0x18], 8
jb 0x140004b4f
mov r9, qword [r13]
xor r8d, r8d
test esi, esi
setne r8b
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
mov edx, dword [rbp + 0x78]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
test eax, eax
je 0x140004df4
jmp 0x140004a72
lea rdx, str.200_The_resource_was_successfully_retrieved
call fcn.140006e00
mov rcx, rax
call fcn.140007100
xor r12d, r12d
mov dword [rbp + 0x80], r12d
mov dword [rbp + 0x78], 4
mov qword [rsp + 0x28], r12
lea rax, [rbp + 0x78]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x80]
xor r8d, r8d
mov edx, 0x20000005
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x140004fb0
xorps xmm0, xmm0
movups xmmword [r14], xmm0
mov qword [r14], r12
mov qword [r14 + 8], r12
mov qword [r14 + 0x10], r12
mov dword [rsp + 0x44], 0x1f
mov dword [rbp + 0x70], r12d
lea rdx, [rbp + 0x70]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140004e30
mov esi, dword [rbp + 0x80]
mov r15, qword [rbp - 0x70]
nop
mov eax, dword [rbp + 0x70]
mov r8, r12
test rax, rax
setne r8b
test rax, rax
je 0x140004d1e
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x98], xmm0
mov qword [rbp + 0xa8], rax
lea rdx, [rbp + 0x88]
lea rcx, [rbp + 0x98]
call fcn.1400043e0
nop
mov r9, qword [rbp + 0xa0]
mov r8, qword [rbp + 0x98]
sub r9, r8
mov rdx, qword [r14 + 8]
mov rcx, r14
call fcn.140008840
mov r8, qword [r15 + 0x38]
test r8, r8
je 0x140004cb9
mov rcx, qword [r14 + 8]
sub rcx, qword [r14]
xorps xmm1, xmm1
js 0x140004c86
cvtsi2ss xmm1, rcx
jmp 0x140004c9b
mov rax, rcx
shr rax, 1
and ecx, 1
or rax, rcx
cvtsi2ss xmm1, rax
addss xmm1, xmm1
movd xmm0, esi
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [rbp + 0x78], xmm1
mov rax, qword [r8]
lea rdx, [rbp + 0x78]
mov rcx, r8
call qword [rax + 0x10]
nop
mov rcx, qword [rbp + 0x98]
test rcx, rcx
je 0x140004cf9
mov rdx, qword [rbp + 0xa8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004cf4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004fec
call fcn.1400380e4
mov dword [rbp + 0x70], r12d
lea rdx, [rbp + 0x70]
mov rbx, qword [rbp + 0x88]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x140004e30
jmp 0x140004c10
test rbx, rbx
je 0x140004d2d
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
mov rcx, qword [rbp + 0xc0]
test rcx, rcx
je 0x140004d40
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
cmp qword [rbp + 0x90], 0
je 0x140004d57
mov rcx, qword [rbp + 0x90]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rax, r14
mov rcx, qword [rbp + 0xd8]
xor rcx, rsp
call fcn.140038080
add rsp, 0x1e0
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpReceiveResponse_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpSetCredentials_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpSetCredentials_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpQueryDataAvailable_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpSendRequest_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call fcn.14003fcd4
nop
call fcn.14003fcd4
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpOpen_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp + 0x10]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp + 0x10]
call fcn.140039fb4
nop
call fcn.14003fcd4
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpConnect_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call fcn.14003fcd4
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpQueryAuthSchemes_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpQueryAuthSchemes_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpQueryHeaders_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
nop
call fcn.14003fcd4
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Error__WinHttpQueryHeaders_
lea rcx, [rsp + 0x48]
call fcn.1400062d0
nop
mov r8d, ebx
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.140002c10
lea rdx, [0x14007d4d0]
lea rcx, [rbp - 0x60]
call fcn.140039fb4
int3