Function at 0x404390
Capabilities:
Connect to http server
Create http request
Download and write a file
Get file size
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push 0x400
lea ecx, [ebp - 0x4c]
call fcn.00401000
push 0x400
lea ecx, [ebp - 0x44]
call fcn.00401000
push 0x3c
push 0
lea eax, [ebp - 0x3c]
push eax
call fcn.00404020
add esp, 0xc
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x30], 3
lea ecx, [ebp - 0x4c]
call fcn.00401040
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x44]
call fcn.00401040
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0x400
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x28], ecx
lea edx, [ebp - 0x3c]
push edx
push 0x10000000
mov eax, dword [ebp + 8]
push eax
call fcn.00404060
add esp, 4
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
jne 0x404456
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x54], eax
cmp dword [ebp + 0x10], 0
je 0x404431
push 0xf
push 0
call dword [ebp + 0x10]
add esp, 8
mov dword [ebp - 0x88], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00401090
lea ecx, [ebp - 0x4c]
call fcn.00401090
mov eax, dword [ebp - 0x88]
jmp 0x40474e
push 0
push 0
push 0
push 0
push str.Mozilla_4.0__compatible__MSIE_6.0b__Windows_NT_5.0__.NET_CLR_1.0.2914_
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x40472e
push 1
push 0
push 3
push 0
push 0
push 0x50
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
je 0x404714
push 1
push 0x400000
push 0
push 0
push 0
mov ecx, dword [ebp - 0x10]
push ecx
push 0x4052d0
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x4046f8
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x4046d2
cmp dword [ebp + 0x10], 0
je 0x4044f9
push 0
push 2
call dword [ebp + 0x10]
add esp, 8
push 0
push 2
push 0
push 0
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
mov dword [ebp - 0x68], eax
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
cmp dword [ebp + 0x10], 0
je 0x404532
mov eax, dword [ebp - 0x68]
push eax
push 3
call dword [ebp + 0x10]
add esp, 8
mov ecx, dword [ebp + 0x14]
movzx edx, byte [ecx]
test edx, edx
jne 0x40464a
push 0x400
lea ecx, [ebp - 0x78]
call fcn.00401050
lea eax, [ebp - 0x84]
push eax
push 0x400
lea ecx, [ebp - 0x78]
call fcn.00401040
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
je 0x40457e
cmp dword [ebp - 0x84], 0
jne 0x40458b
lea ecx, [ebp - 0x78]
call fcn.00401090
jmp 0x40464a
mov dword [ebp - 0x70], 0
push 0
lea edx, [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x84]
push eax
lea ecx, [ebp - 0x78]
call fcn.00401040
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
je 0x4045c6
mov edx, dword [ebp - 0x70]
cmp edx, dword [ebp - 0x84]
je 0x40462b
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp + 0x10], 0
je 0x4045fe
push 0x14
push 0
call dword [ebp + 0x10]
add esp, 8
mov dword [ebp - 0x8c], 0xfffffffe
lea ecx, [ebp - 0x78]
call fcn.00401090
lea ecx, [ebp - 0x44]
call fcn.00401090
lea ecx, [ebp - 0x4c]
call fcn.00401090
mov eax, dword [ebp - 0x8c]
jmp 0x40474e
cmp dword [ebp + 0x10], 0
je 0x40463d
mov ecx, dword [ebp - 0x70]
push ecx
push 4
call dword [ebp + 0x10]
add esp, 8
lea ecx, [ebp - 0x78]
call fcn.00401090
jmp 0x404532
lea edx, [ebp - 0x64]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [ebp - 0x6c]
je 0x4046c0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp + 0x10], 0
je 0x40469b
push 0x13
push 0
call dword [ebp + 0x10]
add esp, 8
mov dword [ebp - 0x90], 0xfffffffd
lea ecx, [ebp - 0x44]
call fcn.00401090
lea ecx, [ebp - 0x4c]
call fcn.00401090
mov eax, dword [ebp - 0x90]
jmp 0x40474e
cmp dword [ebp + 0x10], 0
je 0x4046d0
push 0
push 5
call dword [ebp + 0x10]
add esp, 8
jmp 0x4046e2
cmp dword [ebp + 0x10], 0
je 0x4046e2
push 0x12
push 0
call dword [ebp + 0x10]
add esp, 8
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x404708
cmp dword [ebp + 0x10], 0
je 0x404708
push 0x11
push 0
call dword [ebp + 0x10]
add esp, 8
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x404724
cmp dword [ebp + 0x10], 0
je 0x404724
push 0x10
push 0
call dword [ebp + 0x10]
add esp, 8
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x94], 0
lea ecx, [ebp - 0x44]
call fcn.00401090
lea ecx, [ebp - 0x4c]
call fcn.00401090
mov eax, dword [ebp - 0x94]
mov esp, ebp
pop ebp
ret