Function at 0x10016550
Capabilities:
Initialize winhttp library
Parse url
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100b1749
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x100e30c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
sub esp, 0x18
mov eax, esp
mov dword [ebp - 0x110], esp
lea ecx, [ebp + 8]
push ecx
push str.ex_cfg_fetch:_url:
push eax
call fcn.100183f0
add esp, 0xc
call fcn.1001f3b0
add esp, 0x18
lea edx, [ebp + 8]
push edx
lea ecx, [ebp - 0x34]
call fcn.1000bc50
mov byte [ebp - 4], 1
push 0x3c
push 0
lea eax, [ebp - 0x90]
push eax
call fcn.1008b830
add esp, 0xc
mov dword [ebp - 0x90], 0x3c
mov dword [ebp - 0x88], 0xffffffff
mov dword [ebp - 0x7c], 0xffffffff
mov dword [ebp - 0x60], 0xffffffff
mov dword [ebp - 0x58], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.100045d0
mov dword [ebp - 0xd8], eax
lea ecx, [ebp - 0x34]
call fcn.1000b9d0
mov dword [ebp - 0xdc], eax
lea ecx, [ebp - 0x90]
push ecx
push 0
mov edx, dword [ebp - 0xd8]
push edx
mov eax, dword [ebp - 0xdc]
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
jne 0x1001667a
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x10c], esp
push str.ex_cfg_fetch:_unable_to_parse_url
call fcn.1000bbd0
call fcn.1001f3b0
add esp, 0x18
mov byte [ebp - 0x9c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call fcn.1000bb50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.1000bb50
mov al, byte [ebp - 0x9c]
jmp 0x10016be1
push 0
push 0
push 0
push 0
push 0x100d15ec
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x80]
push edx
lea ecx, [ebp - 0x1a4]
call fcn.10017c30
mov dword [ebp - 0xf4], eax
push 0
movzx eax, word [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0xf4]
call fcn.1000b9d0
push eax
mov ecx, dword [ebp - 0xa4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0xa0], eax
lea ecx, [ebp - 0x1a4]
call fcn.1000bb50
nop
cmp dword [ebp - 0xa0], 0
jne 0x10016775
push str.ex_cfg_fetch:_unable_to_connect_host
lea ecx, [ebp - 0x12c]
call fcn.1000bbd0
mov dword [ebp - 0xf8], eax
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0xfc], edx
mov byte [ebp - 4], 2
sub esp, 0x18
mov eax, esp
mov dword [ebp - 0x114], esp
mov ecx, dword [ebp - 0x80]
push ecx
mov edx, dword [ebp - 0xfc]
push edx
push eax
call fcn.10010460
add esp, 0xc
call fcn.1001f3b0
add esp, 0x18
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x12c]
call fcn.1000bb50
nop
mov byte [ebp - 0x99], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call fcn.1000bb50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.1000bb50
mov al, byte [ebp - 0x99]
jmp 0x10016be1
cmp dword [ebp - 0x84], 4
jne 0x1001678a
mov dword [ebp - 0xac], 0x800000
jmp 0x10016794
mov dword [ebp - 0xac], 0
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
lea ecx, [ebp - 0x174]
call fcn.10017c30
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 0xbc]
mov dword [ebp - 0xc0], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xcc], eax
mov ecx, dword [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x64]
push edx
lea ecx, [ebp - 0x15c]
call fcn.10017c30
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp - 0xc4]
mov dword [ebp - 0xc8], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xc8]
mov dword [ebp - 0xd0], ecx
mov edx, dword [ebp - 0xcc]
push edx
mov eax, dword [ebp - 0xd0]
push eax
lea ecx, [ebp - 0x144]
push ecx
call fcn.10010520
add esp, 0xc
mov dword [ebp - 0xd4], eax
mov edx, dword [ebp - 0xac]
push edx
push 0
push 0
push 0
mov ecx, dword [ebp - 0xd4]
call fcn.1000b9d0
push eax
push 0x100d1654
mov eax, dword [ebp - 0xa0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x98], eax
lea ecx, [ebp - 0x144]
call fcn.1000bb50
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x15c]
call fcn.1000bb50
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x174]
call fcn.1000bb50
nop
cmp dword [ebp - 0x98], 0
jne 0x100168cf
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x100], esp
push str.ex_cfg_fetch:_unable_to_open_request
call fcn.1000bbd0
call fcn.1001f3b0
add esp, 0x18
mov byte [ebp - 0x9a], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call fcn.1000bb50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.1000bb50
mov al, byte [ebp - 0x9a]
jmp 0x10016be1
mov dword [ebp - 0x18], 0x3380
push 4
lea ecx, [ebp - 0x18]
push ecx
push 0x1f
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov dword [ebp - 0x1c], 0xa00
push 4
lea eax, [ebp - 0x1c]
push eax
push 0x54
mov ecx, dword [ebp - 0xa4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
je 0x10016944
push 0
mov eax, dword [ebp - 0x98]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x54], 0
lea ecx, [ebp - 0x4c]
call fcn.10004810
mov byte [ebp - 4], 5
mov dword [ebp - 0xb8], 0
cmp dword [ebp - 0xa8], 0
je 0x10016b21
push 0
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push 5
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x100169a0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x50], 0
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x100169c1
jmp 0x10016b21
mov edx, dword [ebp - 0x50]
add edx, 1
push edx
call fcn.100875b8
add esp, 4
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xe0]
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0x94], 0
jne 0x100169f0
jmp 0x10016b21
mov ecx, dword [ebp - 0x50]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x94]
push edx
call fcn.1008b830
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
mov edx, dword [ebp - 0x94]
push edx
mov eax, dword [ebp - 0x98]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x10016a73
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0xb0], ecx
mov edx, dword [ebp - 0xb0]
push edx
call fcn.10087069
add esp, 4
cmp dword [ebp - 0xb0], 0
jne 0x10016a58
mov dword [ebp - 0xe4], 0
jmp 0x10016a6e
mov dword [ebp - 0x94], 0x8123
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0xe4], eax
jmp 0x10016b3e
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x94]
push edx
lea ecx, [ebp - 0x18c]
call fcn.1000bff0
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0xe8]
mov dword [ebp - 0xec], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0xec]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.1000bf20
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18c]
call fcn.10004710
nop
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0xb4], edx
mov eax, dword [ebp - 0xb4]
push eax
call fcn.10087069
add esp, 4
cmp dword [ebp - 0xb4], 0
jne 0x10016aee
mov dword [ebp - 0xf0], 0
jmp 0x10016b04
mov dword [ebp - 0x94], 0x8123
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0xf0], ecx
cmp dword [ebp - 0x54], 0
jne 0x10016b14
mov dword [ebp - 0xb8], 1
cmp dword [ebp - 0xb8], 0
je 0x100169a0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x104], esp
push str.ex_cfg_fetch:_done
call fcn.1000bbd0
call fcn.1001f3b0
add esp, 0x18
cmp dword [ebp - 0x98], 0
je 0x10016b55
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
cmp dword [ebp - 0xa0], 0
je 0x10016b6c
mov eax, dword [ebp - 0xa0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
cmp dword [ebp - 0xa4], 0
je 0x10016b83
mov ecx, dword [ebp - 0xa4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x108], esp
push str.ex_cfg_fetch:_cleaned_up
call fcn.1000bbd0
call fcn.1001f3b0
add esp, 0x18
lea edx, [ebp - 0x4c]
push edx
mov ecx, dword [ebp + 0x20]
call fcn.10017d00
nop
mov byte [ebp - 0x9b], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
call fcn.10004710
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call fcn.1000bb50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.1000bb50
mov al, byte [ebp - 0x9b]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1008702a
mov esp, ebp
pop ebp
ret