Function at 0x406779
Capabilities:
Check for time delay via gettickcount
Get http content length
Read data from internet
Receive data
Send data
Send http request

Disassembly:
mov eax, 0x43d100
call fcn.0041d79c
mov eax, 0x2860
call fcn.0041e8e0
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x406885
cmp dword [ebp + 0x10], 1
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
jne 0x4067ee
push edi
push dword [ebp + 8]
call fcn.00406ac2
push ebx
push 2
push SysReAllocStringLen
mov dword [ebp - 0x10], eax
push dword [ebp + 8]
push dword [esi + 8]
call dword [sym.imp.WININET.dll_FtpOpenFileA]
cmp eax, ebx
mov dword [ebp + 0x10], eax
jne 0x40688c
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x10
push str.FTP_Error
push str.FtpOpenFile_Error
jmp 0x40687e
push ebx
push 0x84400000
push str._zip
push ebx
push str.HTTP_1.0
push dword [ebp + 8]
push 0x44e378
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
cmp esi, ebx
mov dword [ebp + 0x10], esi
jne 0x406825
push 0x10
push str.HTTP_Error
push str.HTTP_Open_Error
jmp 0x40687e
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x406849
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x10
push str.HTTP_Error
push str.HTTP_Send_Error
jmp 0x40687e
lea eax, [ebp + 8]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20000005
push esi
mov dword [ebp + 8], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40688c
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x10
push str.HTTP_Error
push str.HTTP_Query_Info_Error
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor al, al
jmp 0x406ab1
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x40], al
call fcn.00402b70
mov eax, dword [0x4544d8]
push 0x44e1c8
add eax, 0x424
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00434ae0
push edi
push eax
lea eax, [ebp + 8]
mov byte [ebp - 4], 1
push eax
call fcn.00434ae0
mov esi, dword [eax]
mov byte [ebp - 4], 2
push esi
call fcn.0041d7c0
pop ecx
push eax
push esi
lea ecx, [ebp - 0x40]
call fcn.00402d52
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call fcn.0043488f
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.0043488f
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
jne 0x406900
mov eax, 0x440680
push 0x44e330
push eax
call fcn.0041e8c7
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp - 0x14], eax
jne 0x406938
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x10
push str.DOWNLOAD
push str.Can_t_open_local_file
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp + 0xb], bl
jmp 0x406aa0
xor esi, esi
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x18], eax
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call fcn.00402b70
push edi
mov byte [ebp - 4], 3
call fcn.0041d7c0
pop ecx
push eax
push edi
lea ecx, [ebp - 0x30]
call fcn.00402d52
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x50]
push str.Downloading
push eax
call fcn.00406b8e
add esp, 0xc
push dword [0x44067c]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
push ebx
push eax
call fcn.00402a76
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 3
call fcn.00402b70
mov ecx, dword [0x4544d8]
lea eax, [ebp - 0x30]
push eax
call fcn.0040984c
cmp dword [ebp - 0x10], ebx
jbe 0x406a75
mov edi, 0x27ff
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x286c]
push edi
push eax
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetReadFile]
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x286c]
push dword [ebp + 0xc]
push 1
push eax
call fcn.0041e75d
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, edi
add esi, dword [ebp + 0xc]
div ecx
add esp, 0x10
test eax, eax
jne 0x406a09
mov eax, esi
xor edx, edx
div ecx
push ebx
imul eax, eax, 0x64
jmp 0x406a14
mov eax, esi
xor edx, edx
imul eax, eax, 0x64
div dword [ebp - 0x10]
push ebx
push eax
mov eax, dword [0x4544d8]
push 0x402
push dword [eax + 0xa60]
call dword [sym.imp.USER32.dll_SendMessageA]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x20], eax
sub eax, dword [ebp - 0x18]
push 1
push ebx
add dword [ebp + 8], eax
push ebx
lea eax, [ebp - 0x6c]
push ebx
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp eax, ebx
je 0x406a61
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
je 0x406a75
cmp esi, dword [ebp - 0x10]
jb 0x4069be
push dword [ebp - 0x14]
call fcn.0041e6e0
cmp esi, dword [ebp - 0x10]
pop ecx
mov byte [ebp + 0xb], bl
jb 0x406a8a
mov byte [ebp + 0xb], 1
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], bl
call fcn.00402b70
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x40]
call fcn.00402b70
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc