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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x8050]
mov eax, 0x8150
call fcn.140019a40
sub rsp, rax
mov rax, qword [0x140021010]
xor rax, rsp
mov qword [rbp + 0x8040], rax
mov rsi, qword [0x140022e28]
xor r15d, r15d
mov edx, r15d
mov r8d, 1
mov dword [rbp + 0x4030], edx
mov dword [rbp + 0x20], r8d
mov r9, qword [rsi]
mov r11, qword [rsi + 0x10]
mov qword [rbp + 0x28], r11
test r9, r9
je 0x140016060
nop
cmp dword [r9], 2
mov ecx, r15d
jl 0x140016009
test edx, edx
je 0x140015fe1
mov r10, qword [r9 + 0x60]
cmp qword [rbp + rcx*8 + 0x4038], r10
je 0x140015fe1
inc ecx
cmp ecx, edx
jb 0x140015fd1
cmp ecx, edx
jne 0x140016042
cmp edx, 0x800
jae 0x140016042
mov rax, qword [r9 + 0x60]
mov qword [rbp + rcx*8 + 0x4038], rax
mov edx, dword [rbp + 0x4030]
inc edx
mov dword [rbp + 0x4030], edx
jmp 0x140016042
test r8d, r8d
je 0x140016020
mov r10, qword [r9 + 0x60]
cmp qword [rbp + rcx*8 + 0x28], r10
je 0x140016020
inc ecx
cmp ecx, r8d
jb 0x140016012
cmp ecx, r8d
jne 0x140016042
cmp r8d, 0x800
jae 0x140016042
mov rax, qword [r9 + 0x60]
mov qword [rbp + rcx*8 + 0x28], rax
mov r8d, dword [rbp + 0x20]
inc r8d
mov dword [rbp + 0x20], r8d
mov rax, qword [r9 + 0x60]
mov r9, qword [r9 + 0xa0]
cmp rax, r11
cmovbe rax, r11
mov r11, rax
test r9, r9
jne 0x140015fc0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x8190], r14
lea ecx, [r11 + 1]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov dword [rsp + 0x60], r15d
lea r8, [rbp + 0x4030]
mov dword [rsp + 0x64], 0x2710
lea rdx, [rbp + 0x20]
call qword [sym.imp.WS2_32.dll_select]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov qword [rsi + 0x20], rax
mov rdi, rsi
mov rbx, qword [rsi]
test rbx, rbx
je 0x14001628a
movabs r14, 0x20c49ba5e353f7cf
nop dword [rax]
mov rcx, qword [rbx + 0x60]
lea rdx, [rbp + 0x20]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1400160e2
mov rcx, rbx
call fcn.140015790
test eax, eax
jne 0x14001645f
mov rcx, qword [rbx + 0x60]
lea rdx, [rbp + 0x4030]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1400161f0
mov rax, qword [rbx + 0x88]
test rax, rax
jne 0x140016194
cmp qword [rbx + 0x98], r15
je 0x1400161bc
cmp qword [rbx + 0x90], 0x2000
jae 0x140016152
mov rcx, qword [rbx + 0x80]
mov edx, 0x2000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x140016365
mov qword [rbx + 0x80], rax
mov qword [rbx + 0x90], 0x2000
mov r9, qword [rbx + 0x98]
mov edx, 1
mov r8, qword [rbx + 0x90]
mov rcx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov qword [rbx + 0x88], rax
test rax, rax
jne 0x140016194
mov rcx, qword [rbx + 0x98]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rbx + 0x98], r15
jmp 0x1400161f0
mov rdx, qword [rbx + 0x80]
xor r9d, r9d
mov rcx, qword [rbx + 0x60]
mov r8d, eax
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x1400161c4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400161f0
mov dword [rbx], 6
jmp 0x1400161f0
mov rcx, qword [rbx + 0x80]
cdqe
sub qword [rbx + 0x88], rax
mov r8, qword [rbx + 0x88]
lea rdx, [rcx + rax]
call sub.VCRUNTIME140.dll_memmove
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x20]
mov qword [rbx + 0x48], rcx
mov rdx, qword [rsi + 0x28]
test rdx, rdx
je 0x14001621a
mov rcx, qword [rsi + 0x20]
mov rax, r14
sub rcx, qword [rbx + 0x48]
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rcx, rdx
jg 0x140016253
mov rdx, qword [rsi + 0x30]
test rdx, rdx
je 0x140016244
mov rcx, qword [rsi + 0x20]
mov rax, r14
sub rcx, qword [rbx + 0x40]
imul rdx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rcx, rdx
jg 0x140016253
mov rax, qword [rsi + 0x38]
test rax, rax
je 0x14001625b
cmp qword [rbx + 0x70], rax
jb 0x14001625b
mov dword [rbx], 6
jmp 0x140016260
cmp dword [rbx], 6
jne 0x140016274
mov rax, qword [rbx + 0xa0]
mov rcx, rbx
mov qword [rdi], rax
call fcn.1400156e0
jmp 0x14001627e
mov rdi, qword [rdi]
add rdi, 0xa0
mov rbx, qword [rdi]
test rbx, rbx
jne 0x1400160c0
mov rcx, qword [rsi + 0x10]
lea rdx, [rbp + 0x20]
mov qword [rsp + 0x8180], r12
mov qword [rsp + 0x8188], r13
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14001644d
mov rcx, qword [rsi + 0x10]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_accept]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14001644d
mov r12d, reloc.WS2_32.dll_socket
lea r13d, [r12 - 0x15]
nop word [rax + rax]
mov ecx, 0xa8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x14001648d
xor edx, edx
mov r8d, 0xa8
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbx + 0x60], rdi
lea r8, [rsp + 0x30]
mov qword [rbx + 8], rsi
mov edx, 0x8004667e
mov rcx, qword [rsi + 0x20]
mov qword [rbx + 0x40], rcx
mov rcx, qword [rsi + 0x20]
mov qword [rbx + 0x48], rcx
mov rcx, rdi
mov dword [rsp + 0x30], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], 0x80
lea rdx, [rbp - 0x60]
mov rcx, rdi
lea r14, [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
jne 0x14001636f
mov byte [r14], r15b
jmp 0x1400163e6
mov eax, 0xfffffffe
jmp 0x14001645f
xor r8d, r8d
lea rcx, [rsp + 0x40]
mov r9, r14
lea edx, [r8 + 0x1c]
cmp word [rbp - 0x60], r12w
jne 0x1400163ae
movups xmm0, xmmword [rbp - 0x58]
mov dword [rsp + 0x38], 0x41
mov dword [rsp + 0x42], r15d
movups xmmword [rsp + 0x48], xmm0
mov word [rsp + 0x46], r15w
mov dword [rsp + 0x58], r15d
mov word [rsp + 0x40], r12w
jmp 0x1400163d6
xor eax, eax
mov dword [rsp + 0x38], socket
xorps xmm0, xmm0
mov qword [rsp + 0x50], rax
movups xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x58], eax
mov eax, dword [rbp - 0x5c]
mov dword [rsp + 0x44], eax
mov word [rsp + 0x40], r13w
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSAAddressToStringA]
mov rax, qword [rsi]
mov qword [rbx + 0xa0], rax
mov qword [rsi], rbx
mov dword [rsp + 0x68], r15d
mov qword [rbp - 0x80], rbx
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x18]
mov qword [rsp + 0x70], rcx
lea rcx, [rsp + 0x68]
mov rax, qword [rbx + 8]
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x78], r14
call qword [rax + reloc.WS2_32.dll_htonl]
mov ecx, eax
test eax, eax
js 0x140016489
je 0x140016431
cmp eax, 1
jne 0x140016484
mov dword [rbx], 6
mov rcx, qword [rsi + 0x10]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WS2_32.dll_accept]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400162e0
xor eax, eax
mov r12, qword [rsp + 0x8180]
mov r13, qword [rsp + 0x8188]
mov r14, qword [rsp + 0x8190]
mov rcx, qword [rbp + 0x8040]
xor rcx, rsp
call fcn.140018980
add rsp, 0x8150
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0xfffffffb
mov eax, ecx
jmp 0x14001644f
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffe
jmp 0x14001644f