Function at 0x404b7c
Capabilities:
Get socket status
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
mov rbp, rsp
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x78
mov dword [rbp + 0x10], ecx
mov dword [rbp - 0x60], 0
mov dword [rbp - 0x5c], 0x3e8
lea rax, [rbp - 0x68]
mov rcx, rax
call fcn.004073a0
mov ecx, 1
mov rax, qword [sym.imp.msvcrt.dll__isatty]
call rax
test eax, eax
jne 0x404bcd
mov edx, 0x8000
mov ecx, 1
mov rax, qword [sym.imp.msvcrt.dll__setmode]
call rax
mov ecx, 0
mov rax, qword [sym.imp.msvcrt.dll__isatty]
call rax
mov dword [rbp - 0x48], eax
cmp dword [rbp - 0x48], 0
jne 0x404bf7
mov edx, 0x8000
mov ecx, 0
mov rax, qword [sym.imp.msvcrt.dll__setmode]
call rax
mov rax, qword [0x0040bba0]
mov eax, dword [rax]
cmp eax, 0x3f
ja 0x404c24
mov rcx, qword [0x0040bba0]
mov rax, qword [0x0040bba0]
mov edx, dword [rax]
mov esi, dword [rbp + 0x10]
mov ebx, edx
mov qword [rcx + rbx*8 + 8], rsi
add edx, 1
mov dword [rax], edx
mov word [rbp - 0x4a], 2
mov word [rbp - 0x3c], 0
mov dword [rbp - 0x38], 0
mov eax, dword [rbp - 0x38]
mov dword [rbp - 0x34], eax
mov eax, dword [0x0040b07c]
test eax, eax
je 0x404cff
mov eax, dword [0x0040b07c]
mov dword [rbp - 0x34], eax
mov r12, qword [0x0040bba8]
mov word [rbp - 0x3c], 1
movzx eax, word [0x0040802c]
test ax, ax
je 0x404c7c
mov dword [0x0040b07c], 0
jmp 0x404cff
mov dword [rbp - 0x40], 0
jmp 0x404ce7
mov rax, qword [0x0040bba0]
mov edx, dword [rbp - 0x40]
mov rax, qword [rax + rdx*8 + 8]
test rax, rax
jne 0x404ce3
jmp 0x404cc2
mov rax, qword [0x0040bba0]
mov rdx, qword [0x0040bba0]
mov ecx, dword [rbp - 0x40]
add ecx, 1
mov ecx, ecx
mov rcx, qword [rdx + rcx*8 + 8]
mov edx, dword [rbp - 0x40]
mov qword [rax + rdx*8 + 8], rcx
add dword [rbp - 0x40], 1
mov rax, qword [0x0040bba0]
mov eax, dword [rax]
sub eax, 1
cmp eax, dword [rbp - 0x40]
ja 0x404c9b
mov rax, qword [0x0040bba0]
mov edx, dword [rax]
sub edx, 1
mov dword [rax], edx
jmp 0x404cf5
add dword [rbp - 0x40], 1
mov rax, qword [0x0040bba0]
mov eax, dword [rax]
cmp eax, dword [rbp - 0x40]
ja 0x404c85
mov ecx, 0
call sub.msvcrt.dll__close
mov eax, dword [0x0040b0cc]
test eax, eax
je 0x404d1a
mov eax, dword [0x0040b0cc]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__sleep]
call rax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov ecx, 0
mov rax, qword [sym.imp.WSOCK32.dll_WSASetLastError]
call rax
jmp 0x405233
mov word [rbp - 0x3a], 0x2008
cmp word [rbp - 0x3c], 0
je 0x404d54
mov word [rbp - 0x3c], 0
jmp 0x4050d5
mov rdx, qword [0x0040ba88]
mov rax, qword [0x0040bba0]
mov rbx, rax
mov eax, 0x41
mov rdi, rdx
mov rsi, rbx
mov rcx, rax
rep movsq qword [rdi], qword [rsi]
mov rax, qword [0x0040b088]
test rax, rax
je 0x404d9e
mov rdx, qword [0x0040b088]
mov rax, qword [0x0040b090]
mov r8d, 8
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [0x0040ba88]
lea rdx, [rbp - 0x60]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0x10
mov rax, qword [sym.imp.WSOCK32.dll_select]
call rax
mov ebx, eax
test ebx, ebx
jns 0x404e26
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
cmp eax, 0x2714
je 0x404e26
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov dword [rbp - 0x50], eax
lea rcx, [0x00409995]
call fcn.004034eb
mov eax, dword [rbp + 0x10]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, 1
jmp 0x405275
test ebx, ebx
jne 0x404ec0
lea rax, [rbp - 0x70]
mov rcx, rax
call fcn.004073a0
mov eax, dword [0x0040b0dc]
test eax, eax
je 0x404ec0
mov rdx, qword [rbp - 0x70]
mov rax, qword [rbp - 0x68]
sub rdx, rax
mov rax, qword [0x0040b088]
mov eax, dword [rax]
cdqe
cmp rdx, rax
jle 0x404ec0
movzx eax, word [0x0040b0da]
cmp ax, 1
jbe 0x404e78
lea rcx, [0x004099a4]
call fcn.004034eb
mov eax, dword [rbp + 0x10]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov rax, qword [0x0040bba0]
mov dword [rax], 0
mov ecx, 0
mov rax, qword [sym.imp.WSOCK32.dll_WSASetLastError]
call rax
mov eax, 0
jmp 0x405275
mov rdx, qword [0x0040ba88]
mov eax, dword [rbp + 0x10]
mov rcx, rax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x404fb7
lea rax, [rbp - 0x68]
mov rcx, rax
call fcn.004073a0
mov rdx, qword [0x0040ba90]
mov eax, dword [rbp + 0x10]
mov r9d, 0
mov r8d, 0x2000
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_recv]
call rax
mov ebx, eax
test ebx, ebx
jg 0x404f97
mov dword [rbp - 0x44], 0
jmp 0x404f80
mov rax, qword [0x0040bba0]
mov edx, dword [rbp - 0x44]
mov rdx, qword [rax + rdx*8 + 8]
mov eax, dword [rbp + 0x10]
cmp rdx, rax
jne 0x404f7c
jmp 0x404f5b
mov rax, qword [0x0040bba0]
mov rdx, qword [0x0040bba0]
mov ecx, dword [rbp - 0x44]
add ecx, 1
mov ecx, ecx
mov rcx, qword [rdx + rcx*8 + 8]
mov edx, dword [rbp - 0x44]
mov qword [rax + rdx*8 + 8], rcx
add dword [rbp - 0x44], 1
mov rax, qword [0x0040bba0]
mov eax, dword [rax]
sub eax, 1
cmp eax, dword [rbp - 0x44]
ja 0x404f34
mov rax, qword [0x0040bba0]
mov edx, dword [rax]
sub edx, 1
mov dword [rax], edx
jmp 0x404f8e
add dword [rbp - 0x44], 1
mov rax, qword [0x0040bba0]
mov eax, dword [rax]
cmp eax, dword [rbp - 0x44]
ja 0x404f1b
mov dword [rbp - 0x34], 0
jmp 0x404fb7
mov dword [rbp - 0x38], ebx
mov r13, qword [0x0040ba90]
movzx eax, word [0x0040b0f0]
test ax, ax
je 0x404fb7
mov edx, ebx
mov rcx, r13
call fcn.00404abb
cmp dword [rbp - 0x34], 0
jne 0x4050d4
cmp dword [rbp - 0x48], 0
je 0x40507e
call sub.msvcrt.dll__kbhit
test eax, eax
je 0x4050d5
mov rax, qword [0x0040bba8]
mov rcx, rax
call sub.msvcrt.dll_gets
movzx eax, word [0x0040b0e2]
test ax, ax
je 0x40501b
mov rbx, qword [0x0040bba8]
mov rcx, rbx
call sub.msvcrt.dll_strlen
lea rax, [rbx + rax]
mov r8d, 2
lea rdx, [0x004099b0]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rbx, qword [0x0040bba8]
mov rcx, rbx
call sub.msvcrt.dll_strlen
lea rax, [rbx + rax]
mov r8d, 2
lea rdx, [0x004099b2]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [0x0040bba8]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov ebx, eax
mov dword [rbp - 0x34], ebx
mov r12, qword [0x0040bba8]
movzx eax, word [0x0040802c]
test ax, ax
jne 0x4050d5
mov eax, ebx
mov dword [0x0040b07c], eax
mov ecx, 0
call sub.msvcrt.dll__close
jmp 0x4050d5
mov rax, qword [0x0040bba8]
mov r8d, 0x2000
mov rdx, rax
mov ecx, 0
call sub.msvcrt.dll__read
mov ebx, eax
test ebx, ebx
jg 0x4050aa
mov ecx, 0
call sub.msvcrt.dll__close
jmp 0x4050d5
mov dword [rbp - 0x34], ebx
mov r12, qword [0x0040bba8]
movzx eax, word [0x0040802c]
test ax, ax
jne 0x4050d5
mov eax, ebx
mov dword [0x0040b07c], eax
mov ecx, 0
call sub.msvcrt.dll__close
jmp 0x4050d5
nop
cmp dword [rbp - 0x34], 0x2008
ja 0x4050e7
cmp dword [rbp - 0x38], 0x2008
jbe 0x40510b
mov edx, dword [rbp - 0x38]
mov eax, dword [rbp - 0x34]
mov r8d, edx
mov edx, eax
lea rcx, [0x004099b4]
call fcn.004034eb
mov dword [rbp - 0x38], 0
mov eax, dword [rbp - 0x38]
mov dword [rbp - 0x34], eax
cmp word [rbp - 0x3a], 0
jne 0x405128
lea rcx, [0x004099d2]
call fcn.004034eb
mov eax, 1
jmp 0x405275
cmp dword [rbp - 0x38], 0
je 0x405190
mov eax, dword [rbp - 0x38]
mov r8d, eax
mov rdx, r13
mov ecx, 1
call sub.msvcrt.dll__write
mov ebx, eax
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
mov rcx, rax
call sub.msvcrt.dll_fflush
test ebx, ebx
jle 0x405190
movzx eax, word [0x0040b0d4]
test ax, ax
je 0x405174
mov r8d, ebx
mov rdx, r13
mov ecx, 1
call fcn.004048cc
movsxd rax, ebx
add r13, rax
mov eax, ebx
sub dword [rbp - 0x38], eax
mov edx, dword [0x0040b080]
mov eax, ebx
lea eax, [rdx + rax]
mov dword [0x0040b080], eax
cmp dword [rbp - 0x34], 0
je 0x4051f1
mov eax, dword [0x0040b0cc]
test eax, eax
je 0x4051b1
mov eax, dword [rbp - 0x34]
mov edx, eax
mov rcx, r12
call fcn.0040377b
mov ebx, eax
jmp 0x4051b4
mov ebx, dword [rbp - 0x34]
mov eax, dword [rbp + 0x10]
mov r9d, 0
mov r8d, ebx
mov rdx, r12
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_send]
call rax
mov ebx, eax
test ebx, ebx
jle 0x4051f1
movsxd rax, ebx
add r12, rax
mov eax, ebx
sub dword [rbp - 0x34], eax
mov edx, dword [0x0040b084]
mov eax, ebx
lea eax, [rdx + rax]
mov dword [0x0040b084], eax
mov eax, dword [0x0040b0cc]
test eax, eax
je 0x40521d
mov eax, dword [0x0040b0cc]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__sleep]
call rax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
jmp 0x405233
cmp dword [rbp - 0x34], 0
jne 0x405229
cmp dword [rbp - 0x38], 0
je 0x405233
sub word [rbp - 0x3a], 1
jmp 0x4050d5
mov rdx, qword [0x0040bba0]
mov eax, dword [rbp + 0x10]
mov rcx, rax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x404d3c
mov eax, dword [rbp + 0x10]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, 0
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop r12
pop r13
leave
ret