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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084e45
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x100a5064]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 4], 0
mov dword [ebp - 0xac], ecx
lea ecx, [ebp - 0x74]
push edi
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x54], 0
call fcn.10018fc0
mov dword [ebp - 0x54], 2
lea eax, [ebp - 0x74]
mov dword [ebp - 4], 1
push eax
mov edx, str.fetch_request
lea ecx, [ebp - 0x90]
call fcn.1000ebe0
add esp, 4
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x10018676
mov eax, dword [eax]
push ecx
mov edx, eax
mov ecx, 0x100a7628
call fcn.10011180
push eax
call fcn.1000eb40
mov byte [ebp - 4], 1
add esp, 8
mov edx, dword [ebp - 0x7c]
cmp edx, 8
jb 0x100186cd
mov ecx, dword [ebp - 0x90]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100186c3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018d73
push edx
push ecx
call fcn.1005be67
add esp, 8
xor eax, eax
mov dword [ebp - 0x80], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x7c], 7
mov word [ebp - 0x90], ax
cmp edx, 8
jb 0x10018721
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018717
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018d73
push edx
push ecx
call fcn.1005be67
add esp, 8
xor eax, eax
mov dword [ebp - 0x64], 0
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
jb 0x1001873d
mov esi, dword [esi]
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
test eax, eax
je 0x10018d78
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x54], 6
mov edx, edi
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.10017dd0
mov ecx, edi
call fcn.10018110
movzx esi, ax
lea ecx, [ebp - 0x90]
lea eax, [edi + 0x30]
push eax
call fcn.10018fc0
cmp dword [ebp - 0x7c], 8
lea eax, [ebp - 0x90]
mov edi, dword [ebp - 0x40]
cmovae eax, dword [ebp - 0x90]
push 0
push esi
push eax
push edi
mov dword [ebp - 0x54], 0x16
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, dword [ebp - 0x7c]
mov esi, eax
test esi, esi
sete al
mov byte [ebp - 0x4d], al
cmp edx, 8
jb 0x100187f8
mov ecx, dword [ebp - 0x90]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100187eb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018db5
push edx
push ecx
call fcn.1005be67
mov al, byte [ebp - 0x4d]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], 7
mov word [ebp - 0x90], cx
test al, al
jne 0x10018dba
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x54], 0x1e
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x74], ecx
push 3
mov dword [ebp - 0x64], ecx
xor eax, eax
push 0x10096fa8
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
mov byte [ebp - 4], 6
call fcn.100062c0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x74]
push dword [ebp - 0x1c]
lea edx, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x18]
call fcn.10018360
add esp, 8
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x60]
cmp edx, 8
jb 0x100188a1
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018897
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018df4
push edx
push ecx
call fcn.1005be67
add esp, 8
mov esi, dword [ebp - 0x18]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x4d], al
test ecx, ecx
je 0x10018909
mov edx, str.Sending_proxy_credentials
call fcn.1000e860
push eax
call fcn.1000eb40
mov eax, dword [ebp - 0x78]
add esp, 4
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x100188e7
mov ecx, dword [eax]
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x100188f1
mov eax, dword [ebx]
push 0
push ecx
push eax
push dword [ebp - 0x14]
push 1
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
test eax, eax
je 0x10018ab7
mov edx, str.Sending_request
call fcn.1000e860
push eax
call fcn.1000eb40
add esp, 4
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x10018d55
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x10018d37
push 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x24], 4
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x10018cfb
mov eax, dword [ebp - 0x20]
sub eax, 0xc8
je 0x10018adf
sub eax, 0xc9
je 0x10018a14
sub eax, 6
je 0x100189a9
mov edx, str.Error:_unexpected_status_code
call fcn.1000e860
push eax
call fcn.1000eb40
add esp, 4
jmp 0x100189f7
mov edx, str.407_The_proxy_requires_authentication
call fcn.1000e860
push eax
call fcn.1000eb40
add esp, 4
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x30]
call fcn.100184d0
mov ecx, dword [eax + 8]
call fcn.10018580
cmp dword [ebp - 0x1c], 0x197
mov ecx, eax
mov dword [ebp - 0x14], ecx
jne 0x10018a0f
mov edx, str.Break_for_multiple_407_response
call fcn.1000e860
push eax
call fcn.1000eb40
add esp, 4
mov esi, dword [ebp - 0x18]
mov byte [ebp - 0x4d], 1
mov ecx, dword [ebp - 0x14]
cmp byte [ebp - 0x4d], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
je 0x100188c3
jmp 0x10018af2
mov esi, dword [ebp - 0x18]
jmp 0x100189fa
mov edx, str.401_The_server_requires_authentication
call fcn.1000e860
push eax
call fcn.1000eb40
add esp, 4
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x84]
call fcn.100184d0
mov ecx, dword [eax + 8]
mov esi, dword [eax]
call fcn.10018580
test eax, eax
setne byte [ebp - 0x55]
test eax, eax
je 0x100189f0
mov edx, str.Sending_server_credentials
call fcn.1000e860
push eax
call fcn.1000eb40
mov eax, dword [ebp - 0x78]
add esp, 4
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x10018a69
mov ecx, dword [eax]
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x10018a73
mov eax, dword [ebx]
push 0
push ecx
push eax
movzx eax, byte [ebp - 0x55]
push eax
push esi
mov esi, dword [ebp - 0x18]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
test eax, eax
jne 0x100189f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpSetCredentials_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0xa8]
push esi
jmp 0x10018dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpSetCredentials_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0xa8]
push esi
jmp 0x10018dd7
mov edx, str.200_The_resource_was_successfully_retrieved
call fcn.1000e860
push eax
call fcn.1000eb40
add esp, 4
mov eax, dword [ebp - 0x5c]
xorps xmm0, xmm0
movq qword [eax], xmm0
mov dword [eax + 8], 0
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x54], 0x1f
push eax
push esi
mov dword [ebp - 0x14], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x10018c46
mov eax, dword [ebp - 0x14]
xor ebx, ebx
test eax, eax
setne bl
test eax, eax
je 0x10018cbe
xorps xmm0, xmm0
mov dword [ebp - 0x28], 0
movq qword [ebp - 0x30], xmm0
mov byte [ebp - 4], 0x11
mov dword [ebp - 0x24], 0
test ebx, ebx
jne 0x10018b81
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x10018c6e
mov ebx, dword [ebp - 0x1c]
or dword [ebp - 0x54], 0x20
xor eax, eax
mov dword [ebp - 0x28], 0
xorps xmm0, xmm0
movq qword [ebp - 0x30], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
test ebx, ebx
je 0x10018bb0
push ecx
push ebx
lea ecx, [ebp - 0x30]
call fcn.100114f0
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x24]
push ecx
push ebx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10018c96
push dword [ebp - 0x4c]
mov eax, dword [ebp - 0x5c]
mov ecx, eax
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [eax + 4]
call fcn.10019fb0
and dword [ebp - 0x54], 0xffffffdf
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x10018c2c
mov edx, dword [ebp - 0x28]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10018c0d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018d73
push edx
push ecx
call fcn.1005be67
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x10018b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpQueryDataAvailable_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0xa8]
push esi
jmp 0x10018d98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpQueryDataAvailable_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0x12
lea eax, [ebp - 0xa8]
push esi
jmp 0x10018dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpReadData_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0xa8]
push esi
jmp 0x10018d98
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test esi, esi
je 0x10018ccb
push esi
call ebx
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x10018cd5
push eax
call ebx
test edi, edi
je 0x10018cdc
push edi
call ebx
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005b901
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpQueryHeaders_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0xe
push esi
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0xec]
call fcn.100170b0
push 0x100a38ec
lea eax, [ebp - 0xec]
jmp 0x10018daf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpReceiveResponse_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0xd
jmp 0x10018d17
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpSendRequest_
lea ecx, [ebp - 0xa8]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 0xc
jmp 0x10018d17
call fcn.10064c03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpOpen_
lea ecx, [ebp - 0x3c]
mov esi, eax
call fcn.10006230
mov dword [ebp - 4], 3
lea eax, [ebp - 0x3c]
push esi
push eax
lea ecx, [ebp - 0x12c]
call fcn.100170b0
push 0x100a38ec
lea eax, [ebp - 0x12c]
push eax
call fcn.1005d5bb
call fcn.10064c03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpConnect_
lea ecx, [ebp - 0x74]
mov esi, eax
call fcn.10006230
mov byte [ebp - 4], 5
lea eax, [ebp - 0x74]
push esi
push eax
lea ecx, [ebp - 0xec]
call fcn.100170b0
push 0x100a38ec
lea eax, [ebp - 0xec]
push eax
call fcn.1005d5bb
call fcn.10064c03
int3