Function at 0x401c80
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 0xffffffffffffffff
push 0x40f772
mov eax, dword fs:[0]
push eax
mov eax, 0x2034
call fcn.00403ed0
mov eax, dword [0x414030]
xor eax, esp
mov dword [esp + 0x2030], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x414030]
xor eax, esp
push eax
lea eax, [esp + 0x2048]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x2058]
mov edi, dword [esp + 0x205c]
push ebp
lea eax, [esp + 0x20]
xor ebx, ebx
push str.About_to_download
push eax
mov esi, ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], ebx
call fcn.00401340
push str._to
push eax
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x2068], ebx
call fcn.004012fd
push edi
push eax
lea edx, [esp + 0x40]
push edx
mov byte [esp + 0x2074], 1
call fcn.004012c4
push eax
mov byte [esp + 0x2078], 2
call fcn.00402650
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 0x28
mov byte [esp + 0x2050], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401d55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x2050], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401d7d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x2050], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401da8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
cmp dword [section..data], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
jle 0x4020ba
jmp 0x401dc8
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4020be
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x1c]
push edx
push ebp
mov ecx, esi
call fcn.00401b30
mov ebp, dword [esp + 0x18]
test eax, eax
setne al
test ebp, ebp
je 0x401ff1
test al, al
je 0x401ff1
mov eax, dword [esi + 4]
test eax, eax
je 0x401e12
mov ecx, dword [esi + 8]
push 0
push 0
push 0
push ecx
call eax
push ebp
mov ecx, esi
call fcn.004019f0
push edi
lea edx, [esp + 0x38]
push str.About_to_create_local_file
push edx
mov ebp, eax
call fcn.00401340
push eax
mov dword [esp + 0x2060], 3
call fcn.00402650
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
add esp, 0x10
mov dword [esp + 0x2050], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401e6b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
push 0
push 0x80
push 2
push 0
push 0
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401f6c
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
je 0x401eac
mov ecx, dword [esi + 8]
push ebp
push edi
push 1
push ecx
call eax
test eax, eax
je 0x402064
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
push edx
push 0x2000
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x401f33
lea ebx, [ebx]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x401f57
push 0
lea edx, [esp + 0x28]
push edx
push eax
lea eax, [esp + 0x4c]
push eax
push ebx
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401f33
mov eax, dword [esi + 4]
add edi, dword [esp + 0x24]
test eax, eax
je 0x401f15
mov ecx, dword [esi + 8]
push ebp
push edi
push 1
push ecx
call eax
test eax, eax
je 0x402064
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x28]
push edx
push 0x2000
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x401ed0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 4]
test ecx, ecx
mov dword [esi + 0xc], eax
je 0x401fdf
mov edx, dword [esi + 8]
push 0
push eax
push 4
push edx
call ecx
jmp 0x401fdf
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp ebp, edi
jne 0x401f33
mov dword [esp + 0x14], 1
jmp 0x401fdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Failed_to_create_local_file__error_code_is
lea ecx, [esp + 0x24]
mov dword [esi + 0xc], eax
call fcn.0040128d
mov eax, dword [esi + 0xc]
push eax
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x2058], 4
call fcn.00402850
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 8
mov dword [esp + 0x2050], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401fca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 4]
test eax, eax
je 0x401fdf
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
push 0
push ecx
push 5
push edx
call eax
mov eax, dword [esi + 4]
test eax, eax
je 0x402064
mov ecx, dword [esp + 0x38]
push 0
push ecx
push 3
jmp 0x40205e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Unable_to_download_file__error_
lea ecx, [esp + 0x30]
mov dword [esi + 0xc], eax
call fcn.0040128d
mov eax, dword [esi + 0xc]
push eax
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x2058], 5
call fcn.00402850
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
add esp, 8
mov dword [esp + 0x2050], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40204f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 4]
test eax, eax
je 0x402064
mov ecx, dword [esi + 0xc]
push 0
push ecx
push 2
mov edx, dword [esi + 8]
push edx
call eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402073
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x402083
cmp ebx, 0xffffffff
je 0x402083
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x14], 0
jne 0x4020a3
mov eax, dword [section..data]
add eax, 0xffffffff
cmp dword [esp + 0x1c], eax
jge 0x4020a3
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x1c]
add eax, 1
cmp eax, dword [section..data]
mov dword [esp + 0x1c], eax
jl 0x401dc0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2048]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2030]
xor ecx, esp
call fcn.00402fe1
add esp, 0x2040
ret 8