Function at 0x404a80
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Print debug messages
Query remote server for available data
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
lea ebp, [esp - 0x18b34]
mov eax, 0x18b34
call fcn.0041d820
push 0xffffffffffffffff
push 0x41fc16
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x42e7a0]
xor eax, ebp
mov dword [ebp + 0x18b30], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x18b40]
mov edi, dword [ebp + 0x18b3c]
xor ebx, ebx
push 0x206
mov esi, ecx
lea edx, [ebp + 0x186a2]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x14], ebx
mov word [ebp + 0x186a0], cx
call sub.MSVCR90.dll_memset
push 0x206
lea ecx, [ebp + 0x188aa]
xor eax, eax
push ebx
push ecx
mov word [ebp + 0x188a8], ax
call sub.MSVCR90.dll_memset
push ebx
push ebx
push ebx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp + 0x188a8]
push eax
lea ecx, [ebp + 0x186a0]
push ecx
lea edx, [ebp - 0x14]
push edx
push edi
mov dword [ebp - 0x18], 0x50
mov dword [ebp - 4], ebx
call fcn.00404890
add esp, 0x38
cmp eax, ebx
jne 0x404b58
push str.AfxParseURL_error__r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x404b75
push ebx
push ebx
push ebx
push ebx
push str.SilentUpdate
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jne 0x404b9e
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x18b30]
xor ecx, ebp
call fcn.0041d7e6
add ebp, 0x18b34
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push esi
push ebx
push ecx
push ebx
push ebx
push edx
lea ecx, [ebp + 0x186a0]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, ebx
jne 0x404bc4
push edi
jmp 0x404b6f
push esi
push 0x84400000
lea edx, [ebp - 0x44]
push edx
push ebx
push ebx
lea eax, [ebp + 0x188a8]
push eax
push ebx
push edi
mov dword [ebp - 0x44], 0x422a54
mov dword [ebp - 0x40], ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp esi, ebx
jne 0x404bf8
push esi
jmp 0x404b6f
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x404bf2
push ebx
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp + 0x18ab0]
push edx
push 0x13
push esi
mov dword [ebp - 0x28], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
cmp eax, ebx
je 0x404bf2
lea eax, [ebp + 0x18ab0]
push eax
call dword [sym.imp.MSVCR90.dll__wtol]
add esp, 4
cmp eax, 0xc8
je 0x404c5d
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 0x1c]
push ecx
call esi
jmp 0x404b75
push ebx
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp + 0x18af0]
push eax
push 5
push esi
mov dword [ebp - 0x28], 0x20
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x404c90
lea ecx, [ebp + 0x18af0]
push ecx
call dword [sym.imp.MSVCR90.dll__wtol]
add esp, 4
mov dword [ebp - 0x34], eax
push 0x1869f
lea edx, [ebp + 1]
push ebx
push edx
mov dword [ebp - 0x24], ebx
mov byte [ebp], 0
call sub.MSVCR90.dll_memset
mov edi, dword [ebp - 0x38]
add esp, 0xc
push edi
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x14], ebx
call fcn.0040d090
lea ecx, [ebp - 0xec]
push ecx
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.0040d2f0
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0040c6e0
push eax
call fcn.004049a0
add esp, 4
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 1
call fcn.00404930
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 0
call fcn.00404930
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], ebx
mov edi, eax
mov ebx, 1
push 0
push 0
lea edx, [ebp - 0x3c]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x24]
push eax
push ecx
lea edx, [ebp]
push edx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [ebp - 0x24]
push 0
lea eax, [ebp - 0x30]
push eax
push ecx
lea edx, [ebp]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x30]
add dword [ebp - 0x14], eax
test ebx, ebx
je 0x404d6f
inc dword [ebp - 0x18]
cmp dword [ebp - 0x24], 0
jne 0x404d25
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov ecx, dword [ebp - 0x20]
push ecx
call esi
mov edx, dword [ebp - 0x1c]
push edx
call esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x404d9b
cmp dword [ebp - 0x14], eax
jne 0x404b75
mov eax, ebx
jmp 0x404b77