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

Disassembly:
push ebp
mov eax, 0x154c
push edi
push esi
push ebx
call fcn.00451258
sub esp, eax
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x153c], eax
xor eax, eax
lea eax, [esp + 0x48]
lea esi, [esp + 0x98]
mov dword [esp + 0x70], pe_nt_image_headers32
mov dword [esp + 0x74], eax
lea eax, [esp + 0xd3c]
lea edx, [esp + 0x53c]
mov ebp, dword [esp + 0x1560]
mov dword [esp + 0x7c], eax
movzx eax, byte [esp + 0x156c]
mov dword [esp + 0x6c], esi
mov ebx, dword [esp + 0x1564]
shl eax, 4
mov dword [esp + 0x48], edx
mov dword [esp + 8], eax
lea eax, [esp + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1568]
mov dword [esp + 0x4c], 0x800
mov dword [esp], eax
mov dword [esp + 0x78], 1
mov dword [esp + 0x80], 0x800
mov dword [esp + 0x84], 0
call sub.cygwin1.dll_recvmsg
test eax, eax
js 0x46d9e6
lea edx, [esp + 0x53c]
test byte [esp + 0x85], 1
jne 0x46db42
cmp dword [esp + 0x80], 0xb
jbe 0x40c5e8
mov ecx, dword [esp + 0x7c]
test ecx, ecx
je 0x40c5e8
mov edi, dword [ecx + 4]
mov byte [esp + 0x28], 0
test edi, edi
jne 0x40c5ed
cmp dword [ecx + 8], 3
jne 0x40c5ed
cmp ecx, 0xfffffff4
je 0x40c98e
movzx ecx, byte [ecx + 0xc]
and ecx, 3
cmp cl, 3
sete byte [esp + 0x28]
jmp 0x40c5ed
mov byte [esp + 0x28], 0
lea edi, [esp + 0x88]
mov dword [esp + 0xc], eax
lea eax, [ebx + 0xd0]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], edi
call fcn.004088e0
sub esp, 4
lea eax, [esp + 0x50]
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.0040c370
mov eax, dword [esp + 0x94]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x40c920
movzx eax, byte [ebx + 0xb4]
xor eax, 1
movzx eax, al
cmp dword [esp + 0x58], eax
jne 0x46db07
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
cmp eax, dword [ebx + 0x130]
mov edi, edx
sbb edi, dword [ebx + 0x134]
jb 0x40c6de
add eax, 1
mov dword [ebx + 0x130], eax
movzx eax, word [esp + 0x5c]
adc edx, 0
mov dword [ebx + 0x134], edx
cmp ax, 0xffff
jne 0x40c7f8
cmp word [esp + 0x5e], 0xffff
je 0x40c6c0
call fcn.0041ea90
movzx edx, word [esp + 0x5e]
cmp ax, 0xffff
je 0x40c8c8
movzx eax, ax
sub eax, edx
js 0x40c8b0
cmp eax, 0x1387
jle 0x40c880
lea esi, [esi]
nop
mov byte [ebx + 0x28], 1
call fcn.0041ea90
cmp byte [ebx + 0xb4], 0
mov dword [ebx + 0x138], eax
mov dword [ebx + 0x13c], edx
jne 0x40c740
mov eax, dword [esp + 0x60]
mov ecx, dword [eax - 4]
lea edx, [eax - 0xc]
lea ebx, [eax - 4]
test ecx, ecx
js 0x40c860
cmp edx, sym.imp.cygstdc_6.dll_std::string::_Rep::_S_empty_rep_storage
jne 0x40c980
mov dword [ebp], eax
mov eax, dword [esp + 0x60]
lea edx, [eax - 0xc]
cmp eax, method.std::string.swap_std::string_
jne 0x40c950
mov eax, dword [esp + 0x153c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x40c989
add esp, 0x154c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret 4
lea eax, [ebx + 0x30]
mov edx, dword [esp + 0x70]
mov dword [esp + 0x28], eax
cmp dword [ebx + 0xb0], edx
jne 0x40c773
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call sub.cygwin1.dll_memcmp
mov edx, dword [esp + 0x2c]
test eax, eax
je 0x40c6de
mov edi, dword [esp + 0x28]
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x28]
mov dword [ebx + 0xb0], edx
lea esi, [esp + 0x13b]
lea ebx, [esp + 0x11b]
mov dword [esp + 0x18], 0x1a
mov dword [esp + 0x14], 0x20
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x401
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], edi
call sub.cygwin1.dll_getnameinfo
mov edi, eax
test eax, eax
jne 0x46da7b
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str.Server_now_attached_to_client_at__s:_s_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x40c6de
mov word [ebx + 0x124], ax
call fcn.0041ea90
cmp byte [esp + 0x28], 0
mov dword [ebx + 0x128], eax
mov dword [ebx + 0x12c], edx
je 0x40c686
sub word [ebx + 0x124], 0x1f4
cmp byte [ebx + 0xb4], 0
je 0x40c686
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x2b
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], str.Received_explicit_congestion_notification._n
call sub.cygwin1.dll_fwrite
jmp 0x40c686
lea eax, [esp + 0x44]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00451178
jmp 0x40c6ff
mov word [esp + 0x28], ax
fild word [esp + 0x28]
cmp byte [ebx + 0x150], 0
jne 0x40c8d8
fst qword [ebx + 0x158]
fmul dword [0x477f24]
mov byte [ebx + 0x150], 1
fstp qword [ebx + 0x160]
jmp 0x40c6c0
add eax, 0x10000
cmp eax, 0x1387
jg 0x40c6c0
jmp 0x40c880
mov eax, edx
neg eax
jne 0x40c8b0
fldz
jmp 0x40c889
fld dword [0x477f28]
fmul qword [ebx + 0x160]
fld qword [ebx + 0x158]
fsub st(2)
fabs
fmul dword [0x477f2c]
faddp st(1)
fstp qword [ebx + 0x160]
fld qword [ebx + 0x158]
fmul dword [0x477f30]
fxch st(1)
fmul dword [0x477f34]
faddp st(1)
fstp qword [ebx + 0x158]
jmp 0x40c6c0
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x40c636
lea eax, [esp + 0x44]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x40c636
mov ecx, 0xffffffff
lock xadd dword [eax - 4], ecx
test ecx, ecx
jg 0x40c714
lea eax, [esp + 0x44]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00451180
jmp 0x40c714
lock add dword [ebx], 1
jmp 0x40c6ff
call sub.cygwin1.dll___stack_chk_fail
mov dword [esp + 0xc], str.ecn_octet_p
mov dword [esp + 8], str.std::string_Network::Connection::recv_one_int__bool_
mov dword [esp + 4], 0x205
mov dword [esp], str.network.cc
call sub.cygwin1.dll___assert_func
jmp 0x46da47
mov dword [esp], 0x10
call sub.cygstdc_6.dll___cxa_allocate_exception
mov dword [esp], edi
mov esi, eax
call sub.cygwin1.dll_gai_strerror
mov ebx, eax
lea edi, [esp + 0x40]
lea eax, [esp + 0x3f]
mov dword [esp + 4], str.recv_one:_getnameinfo:
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00467290
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.00451158
mov edx, dword [eax]
lea ebp, [esp + 0x44]
mov dword [esp + 0x44], edx
mov dword [eax], method.std::string.swap_std::string_
mov dword [esp + 8], 0
mov dword [esp + 4], ebp
mov dword [esp], esi
call fcn.00462400
mov dword [esp], ebp
call fcn.004510f0
mov dword [esp], edi
call fcn.004510f0
mov dword [esp + 8], 0x462650
mov dword [esp + 4], 0x47df0c
mov dword [esp], esi
call sub.cygstdc_6.dll___cxa_throw
mov ecx, str.recv_one
mov edx, 0x20e
mov eax, str.p.direction___server___TO_SERVER_:_TO_CLIENT_
call fcn.0046d8c9
mov dword [esp], ebp
mov ebx, eax
call fcn.004510f0
mov dword [esp], edi
call fcn.004510f0
mov dword [esp], esi
call sub.cygstdc_6.dll___cxa_free_exception
jmp 0x46da49
mov dword [esp], 0x10
call sub.cygstdc_6.dll___cxa_allocate_exception
mov edi, eax
call sub.cygwin1.dll___errno
mov esi, dword [eax]
lea ebx, [esp + 0x50]
lea eax, [esp + 0x44]
mov dword [esp + 4], str.Received_oversize_datagram
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00467290
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.00462400
mov dword [esp], ebx
call fcn.004510f0
mov dword [esp + 8], 0x462650
mov dword [esp + 4], 0x47df0c
mov dword [esp], edi
call sub.cygstdc_6.dll___cxa_throw
lea eax, [esp + 0x94]
mov dword [esp], eax
call fcn.004510f0
mov dword [esp], ebx
call sub.cyggcc_s_1.dll__Unwind_Resume
mov dword [esp], ebx
mov esi, eax
call fcn.004510f0
mov dword [esp], edi
call sub.cygstdc_6.dll___cxa_free_exception
mov dword [esp], esi
call sub.cyggcc_s_1.dll__Unwind_Resume
mov esi, eax
jmp 0x46dbc4