Function at 0x408800
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4a86b8
push 0x47eeb0
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x1060
call fcn.004891f0
mov eax, dword [0x4aab30]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1058], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1054], eax
mov ebx, edx
mov dword [ebp - 0x1064], ebx
mov dword [ebp - 0x1050], ecx
xor edi, edi
mov dword [ebp - 0x1060], edi
mov byte [ebp - 0x102c], 0
mov dword [ebp - 0x103c], edi
mov dword [ebp - 0x1034], edi
mov dword [ebp - 0x1030], edi
mov dword [ebp - 0x1038], edi
mov dword [ebp - 0x1028], edi
mov dword [ebp - 0x104c], 0xffffffff
mov dword [ebp - 0x1068], edi
mov byte [ebp - 0x1022], 0
mov dword [ebp - 4], edi
lea edx, [ebp - 0x1030]
push edx
lea ecx, [ebp - 0x1034]
push ecx
lea edx, [ebp - 0x103c]
push edx
push edi
push edi
push edi
push edi
push edi
push eax
mov edx, ebx
mov ecx, 0x4a05ac
call fcn.00407f80
add esp, 0x24
mov esi, eax
mov dword [ebp - 0x1028], esi
cmp esi, edi
je 0x4088f4
mov eax, dword [ebp - 0x1054]
push eax
push ebx
push str.Unable_to_download__S_from__S.
call fcn.00405dc0
add esp, 0xc
jmp 0x408bda
push edi
push 0x80
push 2
push edi
push 1
push 0x40000000
mov ebx, dword [ebp - 0x1050]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x104c], eax
cmp eax, 0xffffffff
jne 0x408940
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x1028], esi
push esi
push ebx
push str.Unable_to_create_file:__S._Error_code:__lu.
mov ecx, esi
call fcn.00405e70
add esp, 0xc
jmp 0x408bda
mov dword [ebp - 0x1048], edi
mov dword [ebp - 0x1044], edi
lea esp, [esp]
lea ecx, [ebp - 0x1078]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
lea ecx, [ecx]
mov byte [ebp - 0x1023], 0
mov dword [ebp - 0x1038], edi
lea edx, [ebp - 0x1038]
push edx
push 0x1000
lea eax, [ebp - 0x1020]
push eax
mov ecx, dword [ebp - 0x1030]
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
mov dword [ebp - 0x105c], ebx
cmp ebx, edi
jne 0x408b17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x1028], esi
cmp esi, edi
je 0x408b17
mov byte [ebp - 0x1021], 1
lea edx, [ebp - 0x1070]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [ebp - 0x1070]
sub ecx, dword [ebp - 0x1078]
mov eax, dword [ebp - 0x106c]
sbb eax, dword [ebp - 0x1074]
xor edx, edx
cmp eax, edx
jb 0x4089fb
ja 0x4089f0
mov eax, 0x23c34600
cmp ecx, eax
jb 0x4089fb
mov byte [ebp - 0x1021], dl
jmp 0x408af0
mov eax, fcn.004194e0
cmp eax, edi
je 0x408a4c
mov eax, dword [ebp - 0x1044]
push eax
mov ecx, dword [ebp - 0x1048]
push ecx
mov edx, dword [ebp - 0x1058]
push edx
call fcn.004194e0
add esp, 0xc
movzx ebx, al
mov dword [ebp - 0x105c], ebx
mov byte [ebp - 0x1021], bl
cmp ebx, edi
jne 0x408a3b
mov byte [ebp - 0x1022], 1
test bl, bl
jne 0x408a53
xor esi, esi
mov dword [ebp - 0x1028], esi
jmp 0x408bda
mov byte [ebp - 0x1021], 1
mov eax, dword [ebp - 0x103c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp eax, edi
je 0x408a66
push eax
call esi
mov eax, dword [ebp - 0x1034]
cmp eax, edi
je 0x408a73
push eax
call esi
mov eax, dword [ebp - 0x1030]
cmp eax, edi
je 0x408a80
push eax
call esi
mov dword [ebp - 0x103c], edi
mov dword [ebp - 0x1034], edi
mov dword [ebp - 0x1030], edi
lea eax, [ebp - 0x1030]
push eax
lea ecx, [ebp - 0x1034]
push ecx
mov edx, dword [ebp - 0x1044]
push edx
mov eax, dword [ebp - 0x1048]
push eax
mov ecx, dword [ebp - 0x1054]
push ecx
lea edx, [ebp - 0x103c]
mov ecx, dword [ebp - 0x1064]
call fcn.00408240
add esp, 0x14
mov esi, eax
mov dword [ebp - 0x1028], esi
cmp esi, edi
jne 0x408ae3
mov byte [ebp - 0x1021], 0
mov byte [ebp - 0x1023], 1
cmp byte [ebp - 0x1021], 1
je 0x4089b3
cmp esi, edi
je 0x408b17
push esi
mov edx, dword [ebp - 0x1050]
push edx
mov eax, dword [ebp - 0x1054]
push eax
push str.Download_failed._Server__S_file:__S._Error_code:__lu.
mov ecx, esi
call fcn.00405e70
add esp, 0x10
jmp 0x408bda
cmp byte [ebp - 0x1023], 0
jne 0x408960
mov eax, dword [ebp - 0x1038]
cmp eax, edi
je 0x408bda
push edi
lea ecx, [ebp - 0x1068]
push ecx
push eax
lea edx, [ebp - 0x1020]
push edx
mov eax, dword [ebp - 0x104c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408b7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x1028], esi
push esi
mov ecx, dword [ebp - 0x1050]
push ecx
push str.Unable_to_write_to_file:__S._Error_code:__lu.
mov ecx, esi
call fcn.00405e70
add esp, 0xc
jmp 0x408bda
mov edx, dword [ebp - 0x1038]
add dword [ebp - 0x1048], edx
adc dword [ebp - 0x1044], edi
mov eax, fcn.004194e0
cmp eax, edi
je 0x408bc6
mov eax, dword [ebp - 0x1044]
push eax
mov ecx, dword [ebp - 0x1048]
push ecx
mov edx, dword [ebp - 0x1058]
push edx
call fcn.004194e0
add esp, 0xc
movzx ebx, al
mov dword [ebp - 0x105c], ebx
cmp ebx, edi
jne 0x408bca
mov byte [ebp - 0x1022], 1
cmp ebx, edi
je 0x408bda
cmp dword [ebp - 0x1038], edi
je 0x408bda
cmp esi, edi
je 0x408950
mov dword [ebp - 4], 0xfffffffe
call fcn.00408c0c
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0047a722
mov esp, ebp
pop ebp
ret