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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1858
call fcn.00417b40
push ebx
push esi
push edi
xor esi, esi
mov ecx, 0x5ff
xor eax, eax
lea edi, [ebp - 0x1856]
mov word [ebp - 0x1858], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0xe
xor eax, eax
pop ecx
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x458]
mov dword [ebp - 0x58], 0x3c
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x1458]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0xc58]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x1858]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x858]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x1058]
mov dword [ebp - 0x3c], eax
mov eax, 0x200
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x58]
push eax
push closesocket
push esi
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
push esi
push esi
push esi
push 1
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
push esi
mov dword [ebp - 0x18], eax
push dword [ebp - 0x40]
mov dword [ebp - 0x1c], 4
mov dword [ebp - 0x14], esi
push dword [ebp - 0x48]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
push 0x100
push esi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
push esi
push str.HTTP_1.1
mov dword [ebp - 0x10], eax
push dword [ebp - 0x2c]
push str.HEAD
push eax
call edi
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
push esi
push esi
push esi
push esi
push esi
push esi
push eax
mov dword [ebp + 8], eax
call ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push 0x20000005
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0x100
push esi
push esi
push str.HTTP_1.1
push dword [ebp - 0x2c]
push 0x4223d8
push dword [ebp - 0x10]
call edi
push esi
push esi
push esi
push esi
push esi
push esi
push eax
mov dword [ebp + 8], eax
call ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov edi, 0x400
xor ebx, ebx
push edi
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 4], eax
push esi
push 0x80
push 2
push esi
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp dword [ebp - 0xc], esi
mov dword [ebp + 0xc], eax
jbe 0x40a0c8
push edi
push esi
push dword [ebp - 4]
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
lea eax, [ebp - 8]
push esi
push eax
add ebx, dword [ebp - 8]
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0xc], ebx
ja 0x40a08e
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call sub.MFC42.DLL_operatordelete
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
pop ecx
push dword [ebp + 8]
call esi
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x18]
call esi
pop edi
pop esi
pop ebx
leave
ret