Function at 0x100401fc0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration
Start tcp server
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x168
mov qword [rsp + 0x1b8], rdx
mov ebx, ecx
mov edx, 1
mov word [rsp + 0x4c], cx
mov ecx, 2
mov word [rsp + 0x4a], r8w
mov r8d, 6
call sym.socket
mov edx, 2
mov dword [rsp + 0x74], 0
mov r14d, eax
mov word [rsp + 0x70], dx
mov eax, ebx
mov dword [rsp + 0x54], 0
xchg ah, al
mov word [rsp + 0x72], ax
cmp r14d, 0xffffffff
je 0x100402440
mov dword [rsp + 0x20], 4
mov r8d, 4
mov edx, pe_overlay
mov ecx, r14d
lea r9, [rsp + 0xf0]
mov dword [rsp + 0xf0], 1
call sym.setsockopt
lea rdx, [rsp + 0x70]
mov r8d, 0x10
mov ecx, r14d
call sym.bind
test eax, eax
jne 0x1004021d0
mov edx, 0x7fffffff
mov ecx, r14d
call sym.listen
test eax, eax
jne 0x1004024a0
mov dword [rsp + 0x54], 1
movzx ebx, bx
lea r12, str._n____Listening_On_Port__d..._n
call sym.__getreent
mov r8d, ebx
mov rdx, r12
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 0x1004020e2
mov r8d, ebx
mov rdx, r12
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
mov eax, dword [rsp + 0x54]
test eax, eax
je 0x1004024da
movzx eax, word [rsp + 0x4a]
mov dword [rsp + 0x54], 0x10
mov r12d, 0xffffffff
lea rbp, str._n____Waiting_Connect_On_Port__d..._n
xchg ah, al
mov word [rsp + 0x4e], ax
lea rdi, str._d._d._d._d:_d
nop word cs:[rax + rax]
mov rcx, qword [rsp + 0x1b8]
call sym.gethost
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x100402410
movzx r12d, word [rsp + 0x4c]
call sym.__getreent
mov rdx, rbp
mov rcx, qword [rax + 0x10]
mov r8d, r12d
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x100402185
mov r8d, r12d
mov rdx, rbp
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
lea r13, [rsp + 0x70]
lea r8, [rsp + 0x54]
mov ecx, r14d
mov rdx, r13
call sym.accept
mov r12d, eax
cmp eax, 0xffffffff
jne 0x100402208
mov ecx, r14d
call sym.close
mov ecx, r12d
call sym.close
xor eax, eax
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sym.__getreent
movzx ebx, bx
lea r12, str._n_____Bind_On_Port__d_Failed_n
mov rcx, qword [rax + 0x10]
mov r8d, ebx
mov rdx, r12
call sym.fprintf
mov rcx, qword [0x100409018]
test rcx, rcx
jne 0x1004020cb
jmp 0x1004020e2
movzx eax, word [rsp + 0x72]
movzx r9d, byte [rsp + 0x75]
mov rdx, rdi
lea rsi, [rsp + 0x80]
xchg ah, al
movzx eax, ax
movzx r8d, byte [rsp + 0x74]
mov rcx, rsi
lea r15, [rsp + 0xf0]
mov dword [rsp + 0x30], eax
movzx eax, byte [rsp + 0x77]
mov dword [rsp + 0x28], eax
movzx eax, byte [rsp + 0x76]
mov dword [rsp + 0x20], eax
call sym.sprintf
movzx eax, word [rsp + 0x4a]
mov rdx, rdi
mov rcx, r15
movzx r8d, bl
mov dword [rsp + 0x30], eax
mov eax, ebx
shr eax, 0x18
mov dword [rsp + 0x28], eax
mov rax, rbx
shr rax, 0x10
movzx eax, al
mov dword [rsp + 0x20], eax
movzx eax, bh
mov r9d, eax
call sym.sprintf
call sym.__getreent
lea rdx, str._n____Connect_From__s__Now_Connect_to__s_n
mov r9, r15
mov r8, rsi
mov rcx, qword [rax + 0x10]
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
lea rdx, str._n____Connect_From__s__Now_Connect_to__s_n
test rcx, rcx
je 0x1004022d7
mov r9, r15
mov r8, rsi
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
movzx eax, word [rsp + 0x4e]
mov r8d, 6
mov edx, 1
mov ecx, 2
mov dword [rsp + 0x74], ebx
mov word [rsp + 0x72], ax
call sym.socket
mov r8d, 0x10
mov rdx, r13
mov ecx, eax
mov ebx, eax
call sym.connect
test eax, eax
jne 0x1004023b0
mov dword [rsp + 0x68], r12d
lea r13, str._n____Connect__s_Successed_Start_Transfer..._n
mov dword [rsp + 0x6c], ebx
call sym.__getreent
mov r8, r15
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 0x100402369
mov r8, r15
mov rdx, r13
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
lea r13, [rsp + 0x58]
mov rcx, r13
call sym.pthread_attr_init
mov rcx, r13
mov edx, 1
call sym.pthread_attr_setdetachstate
lea rcx, [rsp + 0x60]
lea r9, [rsp + 0x68]
mov rdx, r13
lea r8, [sym.in_data_tran]
call sym.pthread_create
mov ecx, 0x1388
call sym.usleep
jmp 0x100402120
call sym.__getreent
lea r13, str._n_____Connect__s_Failed..._n
mov r8, r15
mov rcx, qword [rax + 0x10]
mov rdx, r13
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rcx, qword [0x100409018]
test rcx, rcx
je 0x1004023fc
mov r8, r15
mov rdx, r13
call sym.fprintf
mov rcx, qword [0x100409018]
call sym.fflush
mov ecx, ebx
call sym.close
mov ecx, r12d
call sym.close
jmp 0x100402120
call sym.__getreent
mov r8, qword [rsp + 0x1b8]
lea rdx, str._n_____Reslove_Host__s_Failed..._n
mov rcx, qword [rax + 0x10]
call sym.fprintf
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
jmp 0x1004021a2
call sym.__getreent
mov r8d, 0x1b
mov edx, 1
lea r12, str._n_____Create_Socket_Failed_n
mov r9, qword [rax + 0x10]
mov rcx, r12
call sym.fwrite
mov r9, qword [0x100409018]
test r9, r9
je 0x1004020e2
mov r8d, 0x1b
mov rcx, r12
mov edx, 1
call sym.fwrite
mov rcx, qword [0x100409018]
call sym.fflush
jmp 0x1004020e2
call sym.__getreent
mov r8d, 0x14
mov edx, 1
lea r12, str._n_____Listen_Failed_n
mov r9, qword [rax + 0x10]
mov rcx, r12
call sym.fwrite
mov r9, qword [0x100409018]
mov r8d, 0x14
test r9, r9
jne 0x100402479
jmp 0x1004020e2
mov ecx, r14d
call sym.close
mov eax, 0xffffffff
jmp 0x1004021b4