Function at 0x1400048f1
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
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov dword [rbp + 0x40], ecx
mov dword [rbp - 0x28], 0
mov dword [rbp - 0x24], 0x3e8
lea rax, [rbp - 0x30]
mov rcx, rax
call sub.msvcrt.dll__time64
mov ecx, 1
mov rax, qword [sym.imp.msvcrt.dll__isatty]
call rax
test eax, eax
jne 0x140004944
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 - 0x18], eax
cmp dword [rbp - 0x18], 0
jne 0x14000496e
mov edx, 0x8000
mov ecx, 0
mov rax, qword [sym.imp.msvcrt.dll__setmode]
call rax
mov rax, qword [0x1400131d8]
mov eax, dword [rax]
cmp eax, 0x3f
ja 0x14000499d
mov rcx, qword [0x1400131d8]
mov rax, qword [0x1400131d8]
mov edx, dword [rax]
lea r8d, [rdx + 1]
mov dword [rax], r8d
mov eax, dword [rbp + 0x40]
mov edx, edx
mov qword [rcx + rdx*8 + 8], rax
mov word [rbp - 0x1a], 2
mov word [rbp - 0xc], 0
mov dword [rbp - 8], 0
mov eax, dword [rbp - 8]
mov dword [rbp - 4], eax
mov eax, dword [0x14001318c]
test eax, eax
je 0x140004a78
mov eax, dword [0x14001318c]
mov dword [rbp - 4], eax
mov r12, qword [0x1400131c8]
mov word [rbp - 0xc], 1
movzx eax, word [0x14000d030]
test ax, ax
je 0x1400049f5
mov dword [0x14001318c], 0
jmp 0x140004a78
mov dword [rbp - 0x10], 0
jmp 0x140004a60
mov rax, qword [0x1400131d8]
mov edx, dword [rbp - 0x10]
mov rax, qword [rax + rdx*8 + 8]
test rax, rax
jne 0x140004a5c
jmp 0x140004a3b
mov rdx, qword [0x1400131d8]
mov eax, dword [rbp - 0x10]
lea ecx, [rax + 1]
mov rax, qword [0x1400131d8]
mov ecx, ecx
mov rcx, qword [rdx + rcx*8 + 8]
mov edx, dword [rbp - 0x10]
mov qword [rax + rdx*8 + 8], rcx
add dword [rbp - 0x10], 1
mov rax, qword [0x1400131d8]
mov eax, dword [rax]
sub eax, 1
cmp dword [rbp - 0x10], eax
jb 0x140004a14
mov rax, qword [0x1400131d8]
mov edx, dword [rax]
sub edx, 1
mov dword [rax], edx
jmp 0x140004a6e
add dword [rbp - 0x10], 1
mov rax, qword [0x1400131d8]
mov eax, dword [rax]
cmp dword [rbp - 0x10], eax
jb 0x1400049fe
mov ecx, 0
call sub.msvcrt.dll__close
mov eax, dword [0x140013208]
test eax, eax
je 0x140004a99
mov eax, dword [0x140013208]
imul eax, eax, 0x3e8
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.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 0x140004fbf
mov word [rbp - 0xa], 0x2008
cmp word [rbp - 0xc], 0
je 0x140004ad3
mov word [rbp - 0xc], 0
jmp 0x140004e4c
mov rax, qword [0x1400131d8]
mov rdx, qword [0x1400131e0]
mov r8, rax
mov eax, 0x41
mov rdi, rdx
mov rsi, r8
mov rcx, rax
rep movsq qword [rdi], qword [rsi]
mov rax, qword [0x140013198]
test rax, rax
je 0x140004b15
mov rdx, qword [0x140013198]
mov rax, qword [0x1400131a0]
mov rdx, qword [rdx]
mov qword [rax], rdx
mov rax, qword [0x1400131e0]
lea rdx, [rbp - 0x28]
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 0x140004ba0
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
cmp eax, 0x2714
je 0x140004ba0
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov dword [rbp - 0x20], eax
lea rax, str.select_fuxored
mov rcx, rax
call fcn.140003200
mov eax, dword [rbp + 0x40]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, 1
jmp 0x140005001
test ebx, ebx
jne 0x140004c3d
lea rax, [rbp - 0x38]
mov rcx, rax
call sub.msvcrt.dll__time64
mov eax, dword [0x140013218]
test eax, eax
je 0x140004c3d
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x30]
sub rdx, rax
mov rax, qword [0x140013198]
mov eax, dword [rax]
cdqe
cmp rdx, rax
jle 0x140004c3d
movzx eax, word [0x140013216]
cmp ax, 1
jbe 0x140004bf5
lea rax, str.net_timeout
mov rcx, rax
call fcn.140003200
mov eax, dword [rbp + 0x40]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov rax, qword [0x1400131d8]
mov dword [rax], 0
mov ecx, 0
mov rax, qword [sym.imp.WSOCK32.dll_WSASetLastError]
call rax
mov eax, 0
jmp 0x140005001
mov rdx, qword [0x1400131e0]
mov eax, dword [rbp + 0x40]
mov rcx, rax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x140004d34
lea rax, [rbp - 0x30]
mov rcx, rax
call sub.msvcrt.dll__time64
mov rdx, qword [0x1400131d0]
mov eax, dword [rbp + 0x40]
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 0x140004d14
mov dword [rbp - 0x14], 0
jmp 0x140004cfd
mov rax, qword [0x1400131d8]
mov edx, dword [rbp - 0x14]
mov rdx, qword [rax + rdx*8 + 8]
mov eax, dword [rbp + 0x40]
cmp rdx, rax
jne 0x140004cf9
jmp 0x140004cd8
mov rdx, qword [0x1400131d8]
mov eax, dword [rbp - 0x14]
lea ecx, [rax + 1]
mov rax, qword [0x1400131d8]
mov ecx, ecx
mov rcx, qword [rdx + rcx*8 + 8]
mov edx, dword [rbp - 0x14]
mov qword [rax + rdx*8 + 8], rcx
add dword [rbp - 0x14], 1
mov rax, qword [0x1400131d8]
mov eax, dword [rax]
sub eax, 1
cmp dword [rbp - 0x14], eax
jb 0x140004cb1
mov rax, qword [0x1400131d8]
mov edx, dword [rax]
sub edx, 1
mov dword [rax], edx
jmp 0x140004d0b
add dword [rbp - 0x14], 1
mov rax, qword [0x1400131d8]
mov eax, dword [rax]
cmp dword [rbp - 0x14], eax
jb 0x140004c98
mov dword [rbp - 4], 0
jmp 0x140004d34
mov dword [rbp - 8], ebx
mov r13, qword [0x1400131d0]
movzx eax, word [0x140013230]
test ax, ax
je 0x140004d34
mov edx, ebx
mov rcx, r13
call fcn.140004829
cmp dword [rbp - 4], 0
jne 0x140004e48
cmp dword [rbp - 0x18], 0
je 0x140004df2
call sub.msvcrt.dll__kbhit
test eax, eax
je 0x140004e4c
mov ecx, 0
mov rax, qword [fcn.14000c500]
call rax
mov rdx, rax
mov rax, qword [0x1400131c8]
mov r8, rdx
mov edx, 8
mov rcx, rax
call sub.msvcrt.dll_fgets
movzx eax, word [0x14001321e]
test ax, ax
je 0x140004da0
mov rbx, qword [0x1400131c8]
mov rcx, rbx
call sub.msvcrt.dll_strlen
add rax, rbx
mov word [rax], 0xd
mov rbx, qword [0x1400131c8]
mov rcx, rbx
call sub.msvcrt.dll_strlen
add rax, rbx
mov word [rax], 0xa
mov rax, qword [0x1400131c8]
mov rcx, rax
call sub.msvcrt.dll_strlen
mov ebx, eax
mov dword [rbp - 4], ebx
mov r12, qword [0x1400131c8]
movzx eax, word [0x14000d030]
test ax, ax
jne 0x140004e4c
mov eax, ebx
mov dword [0x14001318c], eax
mov ecx, 0
call sub.msvcrt.dll__close
jmp 0x140004e4c
mov rax, qword [0x1400131c8]
mov r8d, 0x2000
mov rdx, rax
mov ecx, 0
call sub.msvcrt.dll__read
mov ebx, eax
test ebx, ebx
jg 0x140004e1e
mov ecx, 0
call sub.msvcrt.dll__close
jmp 0x140004e4c
mov dword [rbp - 4], ebx
mov r12, qword [0x1400131c8]
movzx eax, word [0x14000d030]
test ax, ax
jne 0x140004e4b
mov eax, ebx
mov dword [0x14001318c], eax
mov ecx, 0
call sub.msvcrt.dll__close
jmp 0x140004e4c
nop
jmp 0x140004e4c
nop
cmp dword [rbp - 4], 0x2008
ja 0x140004e5e
cmp dword [rbp - 8], 0x2008
jbe 0x140004e85
mov edx, dword [rbp - 8]
mov eax, dword [rbp - 4]
mov r8d, edx
mov edx, eax
lea rax, str.Preposterous_Pointers:__d___d
mov rcx, rax
call fcn.140003200
mov dword [rbp - 8], 0
mov eax, dword [rbp - 8]
mov dword [rbp - 4], eax
cmp word [rbp - 0xa], 0
jne 0x140004ea5
lea rax, str.too_many_output_retries
mov rcx, rax
call fcn.140003200
mov eax, 1
jmp 0x140005001
cmp dword [rbp - 8], 0
je 0x140004f11
mov eax, dword [rbp - 8]
mov r8d, eax
mov rdx, r13
mov ecx, 1
call sub.msvcrt.dll__write
mov ebx, eax
mov ecx, 0
mov rax, qword [fcn.14000c500]
call rax
mov rcx, rax
call sub.msvcrt.dll_fflush
test ebx, ebx
jle 0x140004f11
movzx eax, word [0x140013210]
test ax, ax
je 0x140004ef6
mov r8d, ebx
mov rdx, r13
mov ecx, 1
call fcn.140004628
movsxd rax, ebx
add r13, rax
mov eax, ebx
sub dword [rbp - 8], eax
mov eax, dword [0x140013190]
mov edx, ebx
add eax, edx
mov dword [0x140013190], eax
cmp dword [rbp - 4], 0
je 0x140004f71
mov eax, dword [0x140013208]
test eax, eax
je 0x140004f32
mov eax, dword [rbp - 4]
mov edx, eax
mov rcx, r12
call fcn.1400034b3
mov ebx, eax
jmp 0x140004f35
mov ebx, dword [rbp - 4]
mov eax, dword [rbp + 0x40]
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 0x140004f71
movsxd rax, ebx
add r12, rax
mov eax, ebx
sub dword [rbp - 4], eax
mov eax, dword [0x140013194]
mov edx, ebx
add eax, edx
mov dword [0x140013194], eax
mov eax, dword [0x140013208]
test eax, eax
je 0x140004fa3
mov eax, dword [0x140013208]
imul eax, eax, 0x3e8
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
jmp 0x140004fbf
cmp dword [rbp - 4], 0
jne 0x140004faf
cmp dword [rbp - 8], 0
je 0x140004fbf
movzx eax, word [rbp - 0xa]
sub eax, 1
mov word [rbp - 0xa], ax
jmp 0x140004e4c
mov rdx, qword [0x1400131d8]
mov eax, dword [rbp + 0x40]
mov rcx, rax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x140004abb
mov eax, dword [rbp + 0x40]
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [rbp + 0x40]
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
pop rbp
ret