Function at 0x40c1c0
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42443c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x10074
call fcn.00422240
mov eax, dword [0x430510]
xor eax, ebp
mov dword [ebp - 0x18], 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 + 0xc]
mov ebx, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x10084], ecx
mov dword [ebp - 4], esi
or ecx, 0xffffffff
xor edi, edi
mov dword [ebp - 0x10060], eax
mov dword [ebp - 0x10058], ecx
mov dword [ebp - 0x10080], edi
mov dword [ebp - 0x1007c], esi
mov dword [ebp - 0x10078], esi
mov byte [ebp - 4], 1
mov eax, dword [ebx]
cmp eax, esi
je 0x40c53c
cmp dword [ebx + 0x34], 0x10
mov edx, dword [ebx + 0x30]
lea ecx, [ebx + 0x20]
jb 0x40c246
mov ecx, dword [ecx]
push 0
push edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x40c508
lea esp, [esp]
push 0xffff
lea edx, [ebp - 0x1001b]
push 0
push edx
mov byte [ebp - 0x1001c], 0
call fcn.0041a000
mov ecx, dword [ebx]
add esp, 0xc
push 0
push 0x10000
lea eax, [ebp - 0x1001c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40c2cd
mov edx, dword [ebp - 0x1005c]
push edx
lea eax, [ebp + eax - 0x1001c]
sub esi, edi
push eax
lea edx, [ebp - 0x1001c]
lea ecx, [edi + esi]
push edx
push ecx
lea esi, [ebp - 0x10080]
call fcn.0040ad40
mov esi, dword [ebp - 0x1007c]
mov edi, dword [ebp - 0x10080]
jmp 0x40c260
mov eax, esi
sub eax, edi
je 0x40c4fb
mov eax, edi
mov dword [ebp - 0x10024], 0xf
mov dword [ebp - 0x10028], 0
mov byte [ebp - 0x10038], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c2f7
sub eax, edx
push eax
push edi
lea ecx, [ebp - 0x10038]
call fcn.00408e20
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x10024]
mov eax, dword [ebp - 0x10038]
cmp edx, 0x10
jae 0x40c328
lea eax, [ebp - 0x10038]
lea ecx, [eax + 0xc]
mov eax, dword [ebp - 0x10038]
cmp edx, 0x10
jae 0x40c33c
lea eax, [ebp - 0x10038]
mov edx, dword [ebp - 0x1005c]
push edx
add eax, 9
push ecx
push eax
lea eax, [ebp - 0x10054]
push eax
mov dword [ebp - 0x10040], 0xf
mov dword [ebp - 0x10044], 0
mov byte [ebp - 0x10054], 0
call fcn.0040d210
mov byte [ebp - 4], 3
cmp dword [ebp - 0x10040], 0x10
mov eax, dword [ebp - 0x10054]
jae 0x40c388
lea eax, [ebp - 0x10054]
push eax
call fcn.00414c59
add esp, 4
push 4
lea ecx, [ebp - 0x10038]
push ecx
mov dword [ebx + 0xac], eax
call fcn.0040c7d0
test eax, eax
je 0x40c4ad
push 4
lea edx, [ebp - 0x10038]
push edx
call fcn.0040c7d0
xor ebx, ebx
add eax, 4
mov dword [ebp - 0x1005c], eax
mov dword [ebp - 0x10070], ebx
mov dword [ebp - 0x1006c], ebx
mov dword [ebp - 0x10068], ebx
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x1005c]
push edx
push esi
add eax, edi
xor ecx, ecx
push eax
push ecx
lea ecx, [ebp - 0x10070]
call fcn.0040d380
cmp byte [ebp + 0x10], bl
je 0x40c422
lea eax, [ebp - 0x10070]
push eax
mov eax, dword [ebp - 0x10060]
call fcn.0040c6d0
mov eax, dword [ebp - 0x1006c]
mov ebx, dword [ebp - 0x10070]
sub eax, ebx
mov dword [ebp - 0x10058], eax
jmp 0x40c4a0
mov eax, dword [ebp - 0x10084]
cmp dword [eax + 0x14], 8
jb 0x40c430
mov eax, dword [eax]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [ebp - 0x10070]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c490
mov edi, dword [ebp - 0x1006c]
push 0
lea ecx, [ebp - 0x1005c]
push ecx
sub edi, ebx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x40c48a
mov eax, dword [ebp - 0x10060]
lea edx, [ebp - 0x10070]
push edx
call fcn.0040c6d0
mov dword [ebp - 0x10058], edi
mov edi, dword [ebp - 0x10080]
test esi, esi
je 0x40c4a0
cmp esi, 0xffffffff
je 0x40c4a0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40c4ad
push ebx
call fcn.004140b8
add esp, 4
mov esi, 0x10
cmp dword [ebp - 0x10040], esi
jb 0x40c4c9
mov eax, dword [ebp - 0x10054]
push eax
call fcn.004140b8
add esp, 4
mov dword [ebp - 0x10040], 0xf
mov dword [ebp - 0x10044], 0
mov byte [ebp - 0x10054], 0
cmp dword [ebp - 0x10024], esi
jb 0x40c4fb
mov ecx, dword [ebp - 0x10038]
push ecx
call fcn.004140b8
add esp, 4
test edi, edi
je 0x40c508
push edi
call fcn.004140b8
add esp, 4
mov eax, dword [ebp - 0x10058]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.004140c3
mov esp, ebp
pop ebp
ret 0xc
mov eax, ecx
jmp 0x40c50e