Function at 0x140003dc0
Capabilities:
Create tcp socket
Get local ipv4 addresses
Get socket information
Read file on windows
Set socket configuration
Start tcp server
Write file on windows

Disassembly:
push rbx
push rbp
push rdi
push r12
sub rsp, 0x68
xor r12d, r12d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x48], r12
mov rbp, rcx
call qword [sym.imp.msvcrt.dll_strtoul]
lea r8d, [r12 + 4]
lea rdx, str.shm:
mov rcx, rbp
mov edi, eax
call qword [sym.imp.msvcrt.dll__strnicmp]
test eax, eax
jne 0x140003e7f
lea rcx, [rbp + 4]
call fcn.1400039b0
test eax, eax
jne 0x14000444d
mov qword [rsp + 0x90], rsi
cmp dword [0x140008910], r12d
jne 0x14000412d
test di, di
je 0x14000409b
xor eax, eax
mov ebx, 2
mov word [rsp + 0x50], r12w
lea edx, [rax + 1]
lea r8d, [rax + 6]
mov ecx, ebx
mov qword [rsp + 0x52], rax
mov dword [rsp + 0x5a], eax
mov word [rsp + 0x5e], ax
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140003ec1
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.socket___failed:__m_n
add rcx, 0x60
call section..text
mov eax, ebx
jmp 0x140004445
mov ecx, dword [0x140008324]
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [0x140008930], rax
test rax, rax
jne 0x140003e10
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.malloc___failed:__m_n
add rcx, 0x60
call section..text
mov eax, 2
add rsp, 0x68
pop r12
pop rdi
pop rbp
pop rbx
ret
movzx ecx, di
mov word [rsp + 0x50], bx
mov dword [rsp + 0x54], r12d
call qword [sym.imp.WS2_32.dll_htons]
lea rdx, [rsp + 0x50]
mov r8d, setsockopt
mov rcx, rsi
mov word [rsp + 0x52], ax
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x140003f14
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.bind___failed_port__u:__m_n
movzx r8d, di
add rcx, 0x60
call section..text
mov eax, ebx
jmp 0x140004445
lea r8, [rsp + 0x98]
lea rdx, [rsp + 0x50]
mov rcx, rsi
mov dword [rsp + 0x98], socket
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x140003f58
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.getsockname___failed:__m_n
add rcx, 0x60
call section..text
mov eax, ebx
jmp 0x140004445
mov edx, 1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x140003fa7
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [rsp + 0x54]
movzx edi, ax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.listen___failed_for__s:_u:__m_n
mov r9d, edi
add rcx, 0x60
mov r8, rax
call section..text
mov eax, ebx
jmp 0x140004445
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
lea rcx, str.Waiting_for_connection_on_port__u._Press_CtrlC_to_cancel._n
movzx edx, ax
call qword [sym.imp.msvcrt.dll_printf]
lea r8, [rsp + 0x98]
lea rdx, [rsp + 0x50]
mov rcx, rsi
mov dword [rsp + 0x98], socket
call qword [sym.imp.WS2_32.dll_accept]
mov qword [0x140008328], rax
cmp rax, 0xffffffffffffffff
jne 0x140004012
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.accept___failed_port__u:__m_n
movzx r8d, di
add rcx, 0x60
call section..text
mov eax, ebx
jmp 0x140004445
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [rsp + 0x54]
movzx edi, ax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
lea rcx, str.Got_connection_from__s:_u._n
mov rdx, rax
mov r8d, edi
call qword [sym.imp.msvcrt.dll_printf]
mov rcx, qword [0x140008328]
mov edx, 6
lea r9, [rsp + 0x98]
lea r8d, [rdx - 5]
mov dword [rsp + 0x98], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14000412d
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.setsockopt_...__TCP_NODELAY_:__m_n
add rcx, 0x60
call section..text
jmp 0x14000412d
lea rdi, [0x1400070dc]
mov rsi, rbp
mov ecx, 2
repe cmpsb byte [rsi], byte [rdi]
jne 0x1400040c2
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [0x140008328], rax
jmp 0x14000412d
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov edx, 0xc0000000
lea r8d, [r9 + 3]
mov rcx, rbp
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x140008328], rax
cmp rax, 0xffffffffffffffff
jne 0x14000411d
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.File_open_failed_on__s:__m_n
mov r8, rbp
add rcx, 0x60
call section..text
mov eax, 1
jmp 0x140004445
lea rcx, str.Waiting_for_I_O_requests_on_device__s._n
mov rdx, rbp
call qword [sym.imp.msvcrt.dll_printf]
mov qword [rsp + 0x60], r13
lea r13, [0x140008fa0]
nop dword [rax]
cmp dword [0x140008910], r12d
je 0x1400041bb
lea rax, [rsp + 0x48]
cmp rax, qword [0x140008930]
jne 0x140004169
cmp dword [0x140008324], 8
mov eax, r12d
setae al
jmp 0x14000427f
mov rcx, qword [0x140008918]
mov rax, qword [0x140008930]
test rcx, rcx
cmove rcx, qword [0x140008928]
sub rax, rcx
mov qword [0x140008918], rcx
cmp rax, 8
jge 0x14000419a
mov eax, r12d
jmp 0x14000427f
mov rcx, qword [0x140008918]
add qword [0x140008918], 8
mov rax, qword [rcx]
mov qword [rsp + 0x48], rax
mov eax, 1
jmp 0x14000427f
mov rbx, qword [0x140008328]
mov edi, r12d
mov bpl, 1
lea rsi, [rsp + 0x48]
nop dword [rax]
mov rcx, qword [0x140008fb8]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
je 0x140004212
mov r8d, 8
lea r9, [rsp + 0x40]
mov rdx, rsi
mov rcx, rbx
sub r8d, edi
mov dword [0x140008fb0], r12d
mov dword [0x140008fb4], r12d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000421f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14000425d
lea r8, [rsp + 0xa0]
mov r9d, 1
mov rdx, r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x140004258
mov eax, dword [rsp + 0xa0]
test eax, eax
je 0x140004260
add edi, eax
add rsi, rax
cmp edi, 8
jb 0x1400041d0
jmp 0x140004260
xor bpl, bpl
jmp 0x140004260
xor bpl, bpl
cmp edi, 8
setne cl
test bpl, cl
je 0x140004276
mov ecx, 0x26
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, 8
mov eax, r12d
sete al
test eax, eax
je 0x140004431
mov rax, qword [rsp + 0x48]
sub rax, 1
je 0x14000441d
sub rax, 1
je 0x140004409
cmp rax, 1
je 0x1400043f5
mov qword [rsp + 0x48], socket
cmp dword [0x140008910], r12d
je 0x14000432e
lea rax, [rsp + 0x48]
cmp rax, qword [0x140008930]
jne 0x1400042dc
cmp dword [0x140008324], 8
mov eax, r12d
setae al
jmp 0x1400043cf
mov rcx, qword [0x140008920]
mov rax, qword [0x140008930]
test rcx, rcx
cmove rcx, qword [0x140008928]
sub rax, rcx
mov qword [0x140008920], rcx
cmp rax, 8
jge 0x14000430d
mov eax, r12d
jmp 0x1400043cf
mov rcx, qword [0x140008920]
mov rax, qword [rsp + 0x48]
add qword [0x140008920], 8
mov qword [rcx], rax
mov eax, 1
jmp 0x1400043cf
mov rbx, qword [0x140008328]
mov edi, r12d
lea rsi, [rsp + 0x48]
nop dword [rax]
mov rcx, qword [0x140008fb8]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
je 0x140004382
mov r8d, 8
lea r9, [rsp + 0x44]
mov rdx, rsi
mov rcx, rbx
sub r8d, edi
mov dword [0x140008fb0], r12d
mov dword [0x140008fb4], r12d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14000438f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400043c6
lea r8, [rsp + 0xa8]
mov r9d, 1
mov rdx, r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1400043c6
mov eax, dword [rsp + 0xa8]
test eax, eax
je 0x1400043c6
add edi, eax
add rsi, rax
cmp edi, 8
jb 0x140004340
cmp edi, 8
mov eax, r12d
sete al
test eax, eax
jne 0x140004140
mov rcx, qword [sym.imp.msvcrt.dll__iob]
lea rdx, str.stdout:__m_n
add rcx, 0x60
call section..text
mov eax, 1
jmp 0x140004440
call fcn.140002100
test eax, eax
jne 0x140004140
mov eax, 1
jmp 0x140004440
call fcn.140001d20
test eax, eax
jne 0x140004140
mov eax, 1
jmp 0x140004440
call fcn.140001440
test eax, eax
jne 0x140004140
mov eax, 1
jmp 0x140004440
lea rcx, str.Connection_closed.
call qword [sym.imp.msvcrt.dll_puts]
xor eax, eax
mov r13, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x90]
add rsp, 0x68
pop r12
pop rdi
pop rbp
pop rbx
ret