Function at 0x4086d0
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e0f65
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x109c
call fcn.004bda90
push esi
mov ecx, 0x51719f
call fcn.004bd4ad
push 0
push 0
push 0
push 0
push 0x4e7d10
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x408720
xor al, al
jmp 0x408b6e
push 0x3c
push 0
lea eax, [ebp - 0xa8]
push eax
call fcn.004c0800
add esp, 0xc
push 0x3c
push 0
lea ecx, [ebp - 0xa8]
push ecx
call fcn.004c0800
add esp, 0xc
mov dword [ebp - 0xa8], 0x3c
mov dword [ebp - 0xa0], 0xffffffff
mov dword [ebp - 0x94], 0xffffffff
mov dword [ebp - 0x78], 0xffffffff
mov dword [ebp - 0x70], 0xffffffff
mov edx, dword [ebp + 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
add eax, 2
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x28]
mov dx, word [ecx]
mov word [ebp - 0x2e], dx
add dword [ebp - 0x28], 2
cmp word [ebp - 0x2e], 0
jne 0x408781
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x54]
sar eax, 1
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0xa8]
push ecx
push 0
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x4087c3
xor al, al
jmp 0x408b6e
mov ecx, dword [ebp - 0x98]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00406860
mov dword [ebp - 4], 0
push 0
push 0x4e7d38
lea ecx, [ebp - 0x14]
call fcn.00408c80
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
je 0x408826
mov edx, dword [ebp - 0x44]
push edx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x14]
call fcn.00409f80
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x60], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x60]
push edx
lea ecx, [ebp - 0x14]
call fcn.004073c0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.00407110
push 0
movzx eax, word [ebp - 0x90]
push eax
lea ecx, [ebp - 0x14]
call fcn.00407560
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x408867
mov byte [ebp - 0x19], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x19]
jmp 0x408b6e
mov dword [ebp - 0x48], 0
movzx edx, word [ebp - 0x90]
cmp edx, 0x1bb
jne 0x408884
mov dword [ebp - 0x48], 0x800000
mov eax, dword [ebp - 0x48]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x7c]
push ecx
push 0x4e7d3c
mov edx, dword [ebp - 0x4c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4088cf
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1a], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x1a]
jmp 0x408b6e
mov dword [ebp - 0x68], 0x3300
push 4
lea ecx, [ebp - 0x68]
push ecx
push 0x1f
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40891b
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1b], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x1b]
jmp 0x408b6e
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x408964
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x1c]
jmp 0x408b6e
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x4089a3
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x1d]
jmp 0x408b6e
mov dword [ebp - 0x38], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x6c], 4
push 0
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x38]
push eax
push 0
push 0x20000005
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x408a07
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x1e]
jmp 0x408b6e
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x408a5b
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1f], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x1f]
jmp 0x408b6e
mov ecx, 1
test ecx, ecx
je 0x408b3a
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x34]
push edx
push 0x1000
lea eax, [ebp - 0x10a8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x408a93
cmp dword [ebp - 0x34], 0
jne 0x408a98
jmp 0x408b3a
mov dword [ebp - 0x50], 0
push 0
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x34]
push eax
lea ecx, [ebp - 0x10a8]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408af4
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x20], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x20]
jmp 0x408b6e
mov eax, dword [ebp - 0x50]
xor ecx, ecx
add eax, dword [ebp - 0x40]
adc ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
cmp dword [ebp + 0x10], 0
je 0x408b35
cmp dword [ebp - 0x38], 0
je 0x408b35
push 0
push 0x64
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x40]
push eax
call fcn.004bda50
mov ecx, dword [ebp - 0x38]
xor esi, esi
push esi
push ecx
push edx
push eax
call fcn.004bd9a0
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
jmp 0x408a5b
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x21], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407110
mov al, byte [ebp - 0x21]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret