Function at 0x140019500
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:
jmp 0x140019500
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
sub rsp, 0x2d0
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x78
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x2f8]
mov rax, qword [0x1400298a8]
xor rax, rbp
mov qword [rbp + 0x298], rax
lea rcx, reloc.WS2_32.dll_accept
call fcn.1400012ad
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x48], 0
mov dword [rbp + 0x108], 0
mov dword [rbp + 0x10c], 0x3e8
lea rcx, [rbp + 0x148]
call fcn.140019ff0
mov ecx, 1
call qword [sym.imp.ucrtbased.dll__isatty]
test eax, eax
jne 0x140019597
mov edx, 0x8000
mov ecx, 1
call qword [sym.imp.ucrtbased.dll__setmode]
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__isatty]
mov dword [rbp + 0x124], eax
cmp dword [rbp + 0x124], 0
jne 0x1400195bb
mov edx, 0x8000
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__setmode]
mov rax, qword [0x14002a760]
cmp dword [rax], 0x40
jae 0x1400195f6
mov rax, qword [0x14002a760]
mov eax, dword [rax]
mov ecx, dword [rbp + 0x2c0]
mov rdx, qword [0x14002a760]
mov qword [rdx + rax*8 + 8], rcx
mov rax, qword [0x14002a760]
mov eax, dword [rax]
inc eax
mov rcx, qword [0x14002a760]
mov dword [rcx], eax
xor eax, eax
test eax, eax
jne 0x1400195bb
mov eax, 2
mov word [rbp + 0xa4], ax
xor eax, eax
mov word [rbp + 0xe4], ax
mov dword [rbp + 0x84], 0
mov eax, dword [rbp + 0x84]
mov dword [rbp + 0x64], eax
cmp dword [0x140029eec], 0
je 0x140019723
mov eax, dword [0x140029eec]
mov dword [rbp + 0x64], eax
mov rax, qword [0x14002a770]
mov qword [rbp + 0x28], rax
mov eax, 1
mov word [rbp + 0xe4], ax
movzx eax, word [reloc.WS2_32.dll_accept]
test eax, eax
je 0x14001966b
mov dword [0x140029eec], 0
jmp 0x140019723
mov dword [rbp + 0x1a4], 0
jmp 0x140019685
mov eax, dword [rbp + 0x1a4]
inc eax
mov dword [rbp + 0x1a4], eax
mov rax, qword [0x14002a760]
mov eax, dword [rax]
cmp dword [rbp + 0x1a4], eax
jae 0x140019711
mov eax, dword [rbp + 0x1a4]
mov rcx, qword [0x14002a760]
cmp qword [rcx + rax*8 + 8], 0
jne 0x14001970c
mov rax, qword [0x14002a760]
mov eax, dword [rax]
dec eax
cmp dword [rbp + 0x1a4], eax
jae 0x1400196f6
mov eax, dword [rbp + 0x1a4]
inc eax
mov eax, eax
mov ecx, dword [rbp + 0x1a4]
mov rdx, qword [0x14002a760]
mov r8, qword [0x14002a760]
mov rax, qword [r8 + rax*8 + 8]
mov qword [rdx + rcx*8 + 8], rax
mov eax, dword [rbp + 0x1a4]
inc eax
mov dword [rbp + 0x1a4], eax
jmp 0x1400196ab
mov rax, qword [0x14002a760]
mov eax, dword [rax]
dec eax
mov rcx, qword [0x14002a760]
mov dword [rcx], eax
jmp 0x140019711
jmp 0x140019677
xor eax, eax
test eax, eax
jne 0x14001966b
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__close]
cmp dword [0x140029f3c], 0
je 0x140019738
mov ecx, dword [0x140029f3c]
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.ucrtbased.dll__errno]
mov dword [rax], 0
xor ecx, ecx
call sub.WS2_32.dll_WSASetLastError
mov eax, dword [rbp + 0x2c0]
mov rdx, qword [0x14002a760]
mov ecx, eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140019ca4
mov eax, 0x2008
mov word [rbp + 0xc4], ax
movzx eax, word [rbp + 0xe4]
test eax, eax
je 0x14001978c
xor eax, eax
mov word [rbp + 0xe4], ax
jmp 0x140019aea
mov rdi, qword [0x14002a758]
mov rsi, qword [0x14002a760]
mov ecx, 0x208
rep movsb byte [rdi], byte [rsi]
cmp qword [0x140029ef8], 0
je 0x1400197c4
mov r8d, 8
mov rdx, qword [0x140029ef8]
mov rcx, qword [0x140029f00]
call sub.VCRUNTIME140D.dll_memcpy
lea rax, [rbp + 0x108]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [0x14002a758]
mov ecx, reloc.WS2_32.dll_recv
call sub.WS2_32.dll_select
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
jge 0x14001983c
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x14001983c
call sub.WS2_32.dll_WSAGetLastError
mov dword [rbp + 0x184], eax
lea rcx, str.select_fuxored
call fcn.14000105f
mov eax, dword [rbp + 0x2c0]
mov edx, 2
mov ecx, eax
call sub.WS2_32.dll_shutdown
mov eax, dword [rbp + 0x2c0]
mov ecx, eax
call sub.WS2_32.dll_closesocket
mov eax, 1
jmp 0x140019cc5
cmp dword [rbp + 4], 0
jne 0x1400198d0
lea rcx, [rbp + 0x168]
call fcn.140019ff0
cmp dword [0x140029f58], 0
jbe 0x1400198d0
mov rax, qword [rbp + 0x148]
mov rcx, qword [rbp + 0x168]
sub rcx, rax
mov rax, rcx
mov rcx, qword [0x140029ef8]
movsxd rcx, dword [rcx]
cmp rax, rcx
jle 0x1400198d0
movzx eax, word [0x140029f54]
cmp eax, 1
jle 0x140019896
lea rcx, str.net_timeout
call fcn.14000105f
mov eax, dword [rbp + 0x2c0]
mov edx, 2
mov ecx, eax
call sub.WS2_32.dll_shutdown
mov eax, dword [rbp + 0x2c0]
mov ecx, eax
call sub.WS2_32.dll_closesocket
mov rax, qword [0x14002a760]
mov dword [rax], 0
xor ecx, ecx
call sub.WS2_32.dll_WSASetLastError
xor eax, eax
jmp 0x140019cc5
mov eax, dword [rbp + 0x2c0]
mov rdx, qword [0x14002a758]
mov ecx, eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400199f8
lea rcx, [rbp + 0x148]
call fcn.140019ff0
mov eax, dword [rbp + 0x2c0]
xor r9d, r9d
mov r8d, 0x2000
mov rdx, qword [0x14002a768]
mov ecx, eax
call sub.WS2_32.dll_recv
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
jg 0x1400199e4
mov dword [rbp + 0x1c4], 0
jmp 0x14001993c
mov eax, dword [rbp + 0x1c4]
inc eax
mov dword [rbp + 0x1c4], eax
mov rax, qword [0x14002a760]
mov eax, dword [rax]
cmp dword [rbp + 0x1c4], eax
jae 0x1400199d1
mov eax, dword [rbp + 0x1c4]
mov ecx, dword [rbp + 0x2c0]
mov rdx, qword [0x14002a760]
cmp qword [rdx + rax*8 + 8], rcx
jne 0x1400199cc
mov rax, qword [0x14002a760]
mov eax, dword [rax]
dec eax
cmp dword [rbp + 0x1c4], eax
jae 0x1400199b6
mov eax, dword [rbp + 0x1c4]
inc eax
mov eax, eax
mov ecx, dword [rbp + 0x1c4]
mov rdx, qword [0x14002a760]
mov rdi, qword [0x14002a760]
mov rax, qword [rdi + rax*8 + 8]
mov qword [rdx + rcx*8 + 8], rax
mov eax, dword [rbp + 0x1c4]
inc eax
mov dword [rbp + 0x1c4], eax
jmp 0x14001996b
mov rax, qword [0x14002a760]
mov eax, dword [rax]
dec eax
mov rcx, qword [0x14002a760]
mov dword [rcx], eax
jmp 0x1400199d1
jmp 0x14001992e
xor eax, eax
test eax, eax
jne 0x140019922
mov dword [rbp + 0x64], 0
jmp 0x1400199f8
mov eax, dword [rbp + 4]
mov dword [rbp + 0x84], eax
mov rax, qword [0x14002a768]
mov qword [rbp + 0x48], rax
cmp dword [rbp + 0x64], 0
je 0x140019a03
jmp 0x140019aea
cmp dword [rbp + 0x124], 0
je 0x140019a95
call qword [sym.imp.ucrtbased.dll__kbhit]
test eax, eax
je 0x140019a93
mov rcx, qword [0x14002a770]
call sub.ucrtbased.dll_gets
movzx eax, word [0x140029f60]
test eax, eax
je 0x140019a44
lea rdx, reloc.WS2_32.dll_listen
mov rcx, qword [0x14002a770]
call sub.ucrtbased.dll_strcat
lea rdx, [0x140023d4c]
mov rcx, qword [0x14002a770]
call sub.ucrtbased.dll_strcat
mov rcx, qword [0x14002a770]
call sub.ucrtbased.dll_strlen
mov dword [rbp + 4], eax
mov eax, dword [rbp + 4]
mov dword [rbp + 0x64], eax
mov rax, qword [0x14002a770]
mov qword [rbp + 0x28], rax
movzx eax, word [reloc.WS2_32.dll_accept]
test eax, eax
jne 0x140019a93
mov eax, dword [rbp + 4]
mov dword [0x140029eec], eax
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__close]
jmp 0x140019aea
mov r8d, 0x2000
mov rdx, qword [0x14002a770]
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__read]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
jg 0x140019abd
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__close]
jmp 0x140019aea
mov eax, dword [rbp + 4]
mov dword [rbp + 0x64], eax
mov rax, qword [0x14002a770]
mov qword [rbp + 0x28], rax
movzx eax, word [reloc.WS2_32.dll_accept]
test eax, eax
jne 0x140019aea
mov eax, dword [rbp + 4]
mov dword [0x140029eec], eax
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll__close]
cmp dword [rbp + 0x64], 0x2008
ja 0x140019aff
cmp dword [rbp + 0x84], 0x2008
jbe 0x140019b28
mov r8d, dword [rbp + 0x84]
mov edx, dword [rbp + 0x64]
lea rcx, str.Preposterous_Pointers:__d___d
call fcn.14000105f
mov dword [rbp + 0x84], 0
mov eax, dword [rbp + 0x84]
mov dword [rbp + 0x64], eax
movzx eax, word [rbp + 0xc4]
test eax, eax
jne 0x140019b49
lea rcx, str.too_many_output_retries
call fcn.14000105f
mov eax, 1
jmp 0x140019cc5
cmp dword [rbp + 0x84], 0
je 0x140019bdb
mov r8d, dword [rbp + 0x84]
mov rdx, qword [rbp + 0x48]
mov ecx, 1
call qword [sym.imp.ucrtbased.dll__write]
mov dword [rbp + 4], eax
xor ecx, ecx
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.ucrtbased.dll_fflush]
cmp dword [rbp + 4], 0
jle 0x140019bdb
movzx eax, word [0x140029f48]
test eax, eax
je 0x140019ba3
mov r8d, dword [rbp + 4]
mov rdx, qword [rbp + 0x48]
mov ecx, 1
call fcn.140001226
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x48], rax
mov eax, dword [rbp + 4]
mov ecx, dword [rbp + 0x84]
sub ecx, eax
mov eax, ecx
mov dword [rbp + 0x84], eax
mov eax, dword [rbp + 4]
mov ecx, dword [0x140029ef0]
add ecx, eax
mov eax, ecx
mov dword [0x140029ef0], eax
cmp dword [rbp + 0x64], 0
je 0x140019c54
cmp dword [0x140029f3c], 0
je 0x140019bfb
mov edx, dword [rbp + 0x64]
mov rcx, qword [rbp + 0x28]
call fcn.1400010a5
mov dword [rbp + 4], eax
jmp 0x140019c01
mov eax, dword [rbp + 0x64]
mov dword [rbp + 4], eax
mov eax, dword [rbp + 0x2c0]
xor r9d, r9d
mov r8d, dword [rbp + 4]
mov rdx, qword [rbp + 0x28]
mov ecx, eax
call sub.WS2_32.dll_send
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
jle 0x140019c54
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x28], rax
mov eax, dword [rbp + 4]
mov ecx, dword [rbp + 0x64]
sub ecx, eax
mov eax, ecx
mov dword [rbp + 0x64], eax
mov eax, dword [rbp + 4]
mov ecx, dword [0x140029ef4]
add ecx, eax
mov eax, ecx
mov dword [0x140029ef4], eax
cmp dword [0x140029f3c], 0
je 0x140019c7a
mov ecx, dword [0x140029f3c]
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.ucrtbased.dll__errno]
mov dword [rax], 0
jmp 0x14001974b
cmp dword [rbp + 0x64], 0
jne 0x140019c89
cmp dword [rbp + 0x84], 0
je 0x140019c9f
movzx eax, word [rbp + 0xc4]
dec ax
mov word [rbp + 0xc4], ax
jmp 0x140019aea
jmp 0x14001974b
mov eax, dword [rbp + 0x2c0]
mov edx, 2
mov ecx, eax
call sub.WS2_32.dll_shutdown
mov eax, dword [rbp + 0x2c0]
mov ecx, eax
call sub.WS2_32.dll_closesocket
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.14000124e
mov rax, rdi
mov rcx, qword [rbp + 0x298]
xor rcx, rbp
call fcn.140001154
lea rsp, [rbp + 0x2a0]
pop rdi
pop rsi
pop rbp
ret