Function at 0x100401a60
Capabilities:
Create tcp socket
Set socket configuration
Start tcp server

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov ebp, 1
lea r13, str._n____Create_Socket__d_Successed_n
lea r14, str._n____Bind_On_Port__u_Success_n
lea r15, str._n____Listen_On_Port__u_Successed_n
mov word [rsp + 0x7e], dx
lea rax, [rsp + 0x90]
mov edx, 2
mov word [rsp + 0x56], cx
mov qword [rsp + 0x90], 0xffffffffffffffff
mov word [rsp + 0x7c], cx
mov word [rsp + 0xa0], dx
mov dword [rsp + 0xa4], 0
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], ecx
mov r8d, 6
mov edx, 1
mov ecx, 2
call sym.socket
mov r12d, eax
mov rax, qword [rsp + 0x48]
mov dword [rax + rbp*4 - 4], r12d
cmp r12d, 0xffffffff
je 0x100401eb8
call sym.__getreent
mov r8d, ebp
mov rdx, r13
mov rcx, qword [rax + 0x10]
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401b4a
mov r8d, ebp
mov rdx, r13
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
movzx edi, word [rsp + rbp*2 + 0x7a]
mov dword [rsp + 0x20], 4
mov r8d, 4
mov ecx, r12d
lea rbx, [rsp + 0x98]
mov edx, pe_overlay
lea rsi, [rsp + 0xa0]
mov dword [rsp + 0x98], 1
mov r9, rbx
mov eax, edi
xchg ah, al
mov word [rsp + 0xa2], ax
call sym.setsockopt
mov r8d, 0x10
mov rdx, rsi
mov ecx, r12d
call sym.bind
test eax, eax
jne 0x100401f7e
call sym.__getreent
mov r8d, edi
mov rdx, r14
mov rcx, qword [rax + 0x10]
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401bf2
mov r8d, edi
mov rdx, r14
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
mov edx, 0x7fffffff
mov ecx, r12d
call sym.listen
test eax, eax
jne 0x100401f37
call sym.__getreent
mov r8d, edi
mov rdx, r15
mov rcx, qword [rax + 0x10]
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401c4c
mov r8d, edi
mov rdx, r15
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
mov dword [rsp + 0x44], 1
cmp rbp, 2
jne 0x100401eae
mov qword [rsp + 0x58], rbx
mov ebx, dword [rsp + 0x50]
xor ebp, ebp
lea r12, str._n____Waiting_Connect_On_Port__u_n
lea r14, [rsp + 0x78]
xor edi, edi
lea rax, [rsp + 0x80]
mov dword [rsp + 0x78], 0x10
lea r13, str._n____Connect_From__d._d._d._d:_d_On_Port__d_n
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x68], rax
call sym.__getreent
movzx ebx, bx
mov rdx, r12
mov rcx, qword [rax + 0x10]
mov r8d, ebx
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401ce8
mov r8d, ebx
mov rdx, r12
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
mov ecx, dword [rsp + rdi*4 + 0x90]
mov r8, r14
mov rdx, rsi
call sym.accept
mov dword [rsp + rdi*4 + 0x98], eax
cmp eax, 0xffffffff
jne 0x100401d60
call sym.__getreent
mov r8d, ebx
lea rdx, str._n_____Accept_Failed_On_Port__d_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401ea0
mov r8d, ebx
lea rdx, str._n_____Accept_Failed_On_Port__d_n
xor ebp, ebp
xor edi, edi
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
movzx ebx, word [rsp + 0x56]
jmp 0x100401ca0
movzx edx, byte [rsp + 0xa6]
movzx eax, word [rsp + 0xa2]
movzx r8d, byte [rsp + 0xa7]
movzx r9d, byte [rsp + 0xa5]
movzx r15d, byte [rsp + 0xa4]
mov dword [rsp + 0x48], edx
mov dword [rsp + 0x50], r8d
mov dword [rsp + 0x44], r9d
xchg ah, al
movzx edi, ax
call sym.__getreent
mov r8d, dword [rsp + 0x50]
mov edx, dword [rsp + 0x48]
mov rcx, qword [rax + 0x10]
mov r9d, dword [rsp + 0x44]
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x28], r8d
mov r8d, r15d
mov dword [rsp + 0x20], edx
mov rdx, r13
mov dword [rsp + 0x30], edi
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401e3e
movzx eax, word [rsp + 0xa2]
mov dword [rsp + 0x38], ebx
mov rdx, r13
xchg ah, al
movzx r9d, byte [rsp + 0xa5]
movzx eax, ax
movzx r8d, byte [rsp + 0xa4]
mov dword [rsp + 0x30], eax
movzx eax, byte [rsp + 0xa7]
mov dword [rsp + 0x28], eax
movzx eax, byte [rsp + 0xa6]
mov dword [rsp + 0x20], eax
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
cmp ebp, 1
je 0x100401e58
xor ebp, 1
movsxd rdi, ebp
movzx ebx, word [rsp + rdi*2 + 0x7c]
jmp 0x100401ca0
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call sym.pthread_attr_init
mov rcx, rbx
mov edx, 1
call sym.pthread_attr_setdetachstate
mov rcx, qword [rsp + 0x68]
mov r9, qword [rsp + 0x58]
mov rdx, rbx
lea r8, [sym.in_data_tran]
call sym.pthread_create
mov ecx, 0x1388
call sym.usleep
jmp 0x100401e43
movzx ebx, word [rsp + 0x56]
xor ebp, ebp
xor edi, edi
jmp 0x100401ca0
mov ebp, 2
jmp 0x100401ad9
mov ebx, dword [rsp + 0x50]
lea r12, str._n_____Create_Socket__d_Failed_n
call sym.__getreent
mov r8d, ebp
mov rdx, r12
mov rcx, qword [rax + 0x10]
call sym.fprintf
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401efa
mov r8d, ebp
mov rdx, r12
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
mov eax, dword [rsp + 0x44]
test eax, eax
jne 0x100401f97
mov ecx, dword [rsp + 0x90]
call sym.close
mov ecx, dword [rsp + 0x94]
call sym.close
mov eax, 0xffffffff
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ebx, dword [rsp + 0x50]
lea r12, str._n_____Listen_On_Port__u_Failed_n
call sym.__getreent
mov r8d, edi
mov rcx, qword [rax + 0x10]
mov rdx, r12
call sym.fprintf
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100401efa
mov r8d, edi
mov rdx, r12
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
jmp 0x100401efa
mov ebx, dword [rsp + 0x50]
lea r12, str._n_____Bind_On_Port__u_Failed_n
call sym.__getreent
mov r8d, edi
mov rcx, qword [rax + 0x10]
jmp 0x100401f4e
lea rax, [rsp + 0x98]
lea rsi, [rsp + 0xa0]
mov qword [rsp + 0x58], rax
jmp 0x100401c67