Function at 0x140001c30
Capabilities:
Create thread
Terminate thread

Disassembly:
push rbp
push rdi
push r12
push r14
push r15
sub rsp, 0x80
mov rax, qword [0x140006008]
xor rax, rsp
mov qword [rsp + 0x70], rax
xor r8d, r8d
mov r15d, edx
mov r14d, ecx
lea edx, [r8 + 1]
lea ecx, [rdx + 1]
call qword [sym.imp.WS2_32.dll_socket]
xor r12d, r12d
mov rdi, rax
test eax, eax
jns 0x140001c7e
lea rcx, str.____Create_socket_error._r_n
call fcn.140001060
mov edi, r12d
mov ebp, edi
test edi, edi
je 0x140001e68
xor r8d, r8d
mov qword [rsp + 0xc0], rbx
mov qword [rsp + 0xc8], rsi
lea edx, [r8 + 1]
lea ecx, [rdx + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
test eax, eax
jns 0x140001cbe
lea rcx, str.____Create_socket_error._r_n
call fcn.140001060
mov ebx, r12d
mov esi, ebx
test ebx, ebx
je 0x140001e58
mov edx, r14d
lea rcx, str.___Listening_port__d_......_r_n
call fcn.140001060
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov edx, r14d
mov ecx, edi
call fcn.140002690
test eax, eax
jne 0x140001d07
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x140001e58
lea rcx, str.___Listen_OK__r_n
call fcn.140001060
mov edx, r15d
lea rcx, str.___Listening_port__d_......_r_n
call fcn.140001060
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov edx, r15d
mov ecx, ebx
call fcn.140002690
test eax, eax
jne 0x140001d52
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x140001e58
lea rcx, str.___Listen_OK__r_n
call fcn.140001060
mov dword [rsp + 0x34], reloc.WS2_32.dll_recv
mov dword [rsp + 0x30], reloc.WS2_32.dll_recv
nop
mov edx, r14d
lea rcx, str.___Waiting_for_Client_on_port:_d_......_r_n
call fcn.140001060
lea r8, [rsp + 0x30]
mov rcx, rbp
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_accept]
mov ecx, dword [rsp + 0x44]
mov rdi, rax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, r14d
lea rcx, str.___Accept_a_Client_on_port__d_from__s_......_r_n
mov r8, rax
call fcn.140001060
mov edx, r15d
lea rcx, str.___Waiting_another_Client_on_port:_d...._r_n
call fcn.140001060
lea r8, [rsp + 0x34]
mov rcx, rsi
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_accept]
mov ecx, dword [rsp + 0x54]
mov rbx, rax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, r15d
lea rcx, str.___Accept_a_Client_on_port__d_from__s_r_n
mov r8, rax
call fcn.140001060
lea rcx, str.___Accept_Connect_OK__r_n
call fcn.140001060
lea rax, [rsp + 0x38]
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x60]
lea r8, [0x1400014a0]
mov dword [rsp + 0x20], r12d
xor edx, edx
mov qword [rsp + 0x68], rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
je 0x140001e4e
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.___CreateThread_OK__r_n_n
call fcn.140001060
jmp 0x140001d70
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rbx, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400027a0
add rsp, 0x80
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret