Function at 0x401080
Capabilities:
Delete file
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
mov eax, 0x1854
call fcn.0040bd30
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0x1850], eax
mov eax, dword [esp + 0x1858]
push ebx
push esi
push edi
push 6
mov edi, ecx
push 0x412c18
xor esi, esi
push edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], esi
call fcn.00408037
push 0x3c
lea ecx, [esp + 0x30]
test eax, eax
push esi
push ecx
sete bl
call fcn.00409070
add esp, 0x18
lea edx, [esp + 0x20]
push edx
push esi
or eax, 0xffffffff
push esi
push edi
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x68], eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x401115
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1850]
xor ecx, esp
call fcn.0040850f
add esp, 0x1854
ret
push ebp
push 0x800
lea eax, [esp + 0x64]
push esi
push eax
call fcn.00409070
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push ecx
push edx
lea eax, [esp + 0x74]
push 0x400
push eax
call fcn.0040851e
add esp, 0x1c
push esi
push esi
push esi
push esi
push str.Microsoft_IE_6.1
mov dword [0x418b28], esi
mov dword [0x418b2c], esi
mov dword [0x418b30], esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebp, eax
cmp ebp, esi
mov dword [esp + 0x20], ebp
je 0x4012f9
mov ecx, dword [esp + 0x3c]
push esi
push ecx
lea edx, [esp + 0x68]
push edx
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
cmp edi, esi
mov dword [esp + 0x18], edi
je 0x4012f2
mov eax, dword [esp + 0x50]
cmp eax, esi
mov word [esp + 0x60], si
je 0x4011b1
push eax
lea eax, [esp + 0x64]
push 0x400
push eax
call fcn.00408430
add esp, 0xc
mov cl, bl
neg cl
lea edx, [esp + 0x60]
sbb ecx, ecx
and ecx, 0x800000
or ecx, 0x100
push ecx
push 0x417fb8
push esi
push esi
push edx
push 0x413b38
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebp, eax
test ebp, ebp
je 0x4012e7
test bl, bl
je 0x401202
push 4
lea eax, [esp + 0x20]
push eax
push 0x1f
push ebp
mov dword [esp + 0x2c], 0x3300
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 0
push 0
push 0
push 0
push 0
push 0
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov esi, eax
test esi, esi
je 0x4012e0
push 0
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov esi, eax
test esi, esi
je 0x4012e0
mov edx, ebp
call fcn.00401040
add eax, 0xffffff38
cmp eax, 0x63
jbe 0x40124a
xor esi, esi
jmp 0x4012e0
mov ecx, dword [esp + 0x14]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor edx, edx
mov edi, eax
cmp edi, 0xffffffff
setne dl
mov dword [esp + 0x10], 1
mov esi, edx
test esi, esi
je 0x4012c1
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpReadData]
cmp dword [esp + 0x10], 0
jbe 0x4012c1
lea eax, [esp + 0x10]
push eax
push 0x1000
lea ecx, [esp + 0x868]
push ecx
push ebp
call ebx
mov esi, eax
test esi, esi
je 0x4012c1
mov eax, dword [esp + 0x10]
push 0
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x86c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x401282
cmp edi, 0xffffffff
je 0x4012dc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x4012dc
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [esp + 0x18]
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ebp, dword [esp + 0x20]
push ebp
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [esp + 0x1860]
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.0040850f
add esp, 0x1854
ret