Function at 0x14002c3b0
Capabilities:
Check mutex on windows
Get socket status

Disassembly:
jmp 0x14002c3b0
mov r11, rsp
push rbp
lea rbp, [r11 - 0x1c8]
sub rsp, 0x2c0
mov rax, qword [0x140188050]
xor rax, rsp
mov qword [rbp + 0x190], rax
xor eax, eax
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rdi
lea rcx, [rbp - 0x78]
mov qword [r11 - 0x28], r15
xor edx, edx
xor r15d, r15d
mov qword [rsp + 0x62], rax
mov r8d, 0x200
mov word [rsp + 0x60], r15w
mov word [rsp + 0x70], r15w
mov dword [rsp + 0x50], r15d
mov qword [rsp + 0x58], r15
mov dword [rbp - 0x80], r15d
mov dword [rsp + 0x6a], eax
mov word [rsp + 0x6e], ax
mov qword [rsp + 0x72], rax
mov dword [rsp + 0x7a], eax
mov word [rsp + 0x7e], ax
call fcn.1400082a0
lock inc qword [0x1401894e8]
mov eax, r15d
xor r8d, r8d
xchg qword [0x1401894e0], rax
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1401894f8], rax
test rax, rax
je 0x14002c462
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [0x1401894f0], r15b
lea rax, [0x1401382e0]
mov qword [rsp + 0x2d8], rsi
lea r8, [0x14013783d]
mov qword [rsp + 0x2b8], r12
lea rdi, str.0.0.0.0
lea rbx, str.8888
mov qword [rsp + 0x2b0], r13
cmovne r8, rax
mov qword [rsp + 0x2a8], r14
mov r9, rdi
mov qword [rsp + 0x20], rbx
lea rdx, str.starting__sweb_server__IP__s_port__s_..._n
mov ecx, 3
call fcn.14000c900
call fcn.14002acf0
call fcn.14002d630
mov ecx, dword [0x1401836e8]
sub ecx, 0xffffff80
call fcn.14000c5d0
cmp qword [0x140189500], r15
je 0x14002cad5
cmp qword [0x140189508], r15
je 0x14002cad5
lea rax, [0x140138380]
mov dword [rsp + 0x50], reloc.WSOCK32.dll_recv
mov r9, rbx
mov qword [rsp + 0x20], rax
mov r8, rdi
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
call fcn.14002d000
test eax, eax
jns 0x14002c557
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002cb1b
test dword [0x1401877e0], 0x8000
je 0x14002cb1b
lea rax, str.Invalid_server_address_port_number
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xe3
jmp 0x14002cafe
xor r8d, r8d
lea edx, [r8 + 1]
lea ecx, [rdx + 1]
call qword [sym.imp.WSOCK32.dll_socket]
mov qword [0x140182310], rax
cmp rax, 0xffffffffffffffff
jne 0x14002c5d1
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002cb3c
test dword [0x1401877e0], 0x8000
je 0x14002cb3c
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [rsp + 0x30], eax
lea rax, str.open_socket_error__error__d
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xe9
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
mov edx, 4
lea r8, str.esif_ws_init
mov ecx, 0x8000
call fcn.140008b60
jmp 0x14002cb1b
mov r8d, dword [rsp + 0x50]
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jns 0x14002c64f
cmp dword [reloc.WSOCK32.dll_accept], 1
jl 0x14002cb1b
test dword [0x1401877ad], 0x8000
je 0x14002cb1b
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [rsp + 0x40], eax
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
mov qword [rsp + 0x38], rbx
mov edx, 1
lea rax, str.Cannot_bind_Listener_to_IP__s_Port__s___error__d
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rax
lea r8, str.esif_ws_init
mov ecx, 0x8000
mov dword [rsp + 0x20], 0xef
call fcn.140008b60
jmp 0x14002cb1b
mov rcx, qword [0x140182310]
mov edx, 0xa
call qword [sym.imp.WSOCK32.dll_listen]
test eax, eax
jns 0x14002c6a5
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002cb1b
test dword [0x1401877e0], 0x8000
je 0x14002cb1b
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [rsp + 0x30], eax
lea rax, str.listen_system_call_failed__error__d
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xf5
jmp 0x14002c5af
mov rax, r15
lock xadd qword [0x1401894e0], rax
test rax, rax
jne 0x14002cb1b
lea r12, str.Client__d_connected_n
lea r13, str.Out_of_memory_n
mov rdx, qword [0x140182310]
lea r14, str.Client__d_disconnected_n
mov r9, qword [0x140189500]
mov ecx, 1
mov eax, edx
mov r11d, ecx
mov qword [rbp - 0x78], rax
mov r10, r15
lea ebx, [rdx + 1]
mov dword [rbp - 0x80], ecx
cmp r11d, 0xb
jge 0x14002c754
cmp qword [r9], 0xffffffffffffffff
je 0x14002c747
mov edx, r15d
test ecx, ecx
je 0x14002c71f
mov r8d, dword [r9]
nop word [rax + rax]
mov eax, edx
cmp qword [rbp + rax*8 - 0x78], r8
je 0x14002c71f
inc edx
cmp edx, ecx
jb 0x14002c710
cmp edx, ecx
jne 0x14002c73a
cmp ecx, 0x40
jae 0x14002c73a
mov ecx, dword [r9]
mov eax, edx
mov qword [rbp + rax*8 - 0x78], rcx
mov ecx, dword [rbp - 0x80]
inc ecx
mov dword [rbp - 0x80], ecx
mov eax, dword [r9]
inc eax
cmp ebx, eax
cmovl ebx, eax
inc r11d
inc r10
add r9, 0x5c
cmp r10, 0xa
jl 0x14002c6f4
test ebx, ebx
je 0x14002cb1b
mov rcx, qword [0x1401894f8]
mov dword [rsp + 0x58], 2
mov dword [rsp + 0x5c], 0xc350
test rcx, rcx
je 0x14002c77e
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea rax, [rsp + 0x58]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x80]
mov ecx, ebx
call qword [sym.imp.WSOCK32.dll_select]
mov rcx, qword [0x1401894f8]
mov ebx, eax
test rcx, rcx
je 0x14002c7b1
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp ebx, 0xffffffff
je 0x14002cb1b
test ebx, ebx
je 0x14002ca94
mov rcx, qword [0x140182310]
lea rdx, [rbp - 0x80]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x14002c884
mov rcx, qword [0x140182310]
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x70]
mov dword [rsp + 0x50], reloc.WSOCK32.dll_recv
mov ebx, 1
call qword [sym.imp.WSOCK32.dll_accept]
movsxd r14, eax
cmp r14, 0xffffffffffffffff
je 0x14002caaa
mov rax, qword [0x140189500]
mov esi, r15d
mov rdi, r15
cmp ebx, 0xb
jge 0x14002c85c
cmp qword [rax], 0xffffffffffffffff
je 0x14002c836
inc ebx
inc esi
inc rdi
add rax, 0x5c
cmp rdi, 0xa
jl 0x14002c818
jmp 0x14002c85c
movsxd rax, esi
imul rcx, rax, 0x5c
add rcx, qword [0x140189500]
call fcn.14002b350
mov rax, qword [0x140189500]
imul rcx, rdi, 0x5c
mov qword [rcx + rax], r14
or r14, 0xffffffffffffffff
cmp esi, 0xa
jge 0x14002c978
cmp ebx, 0xb
jge 0x14002c978
cmp r14, 0xffffffffffffffff
je 0x14002c87d
mov rcx, r14
call qword [sym.imp.WSOCK32.dll_closesocket]
lea r14, str.Client__d_disconnected_n
mov rsi, r15
nop word [rax + rax]
mov rax, qword [0x140189500]
mov rdi, qword [rsi + rax]
cmp rdi, 0xffffffffffffffff
je 0x14002ca83
cmp rdi, qword [0x140182310]
je 0x14002ca83
lea rdx, [rbp - 0x80]
mov rcx, rdi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x14002ca83
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002c90a
test dword [0x1401877e0], 0x8000
je 0x14002c90a
mov qword [rsp + 0x30], rdi
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
mov qword [rsp + 0x28], r12
lea r8, str.esif_ws_init
mov edx, 4
mov dword [rsp + 0x20], 0x154
mov ecx, 0x8000
call fcn.140008b60
mov rbx, qword [0x140189500]
add rbx, rsi
mov rcx, rbx
call fcn.14002bf20
cmp eax, 0xc1c
jne 0x14002c9d4
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002ca1a
test dword [0x1401877e0], 0x8000
je 0x14002ca1a
mov qword [rsp + 0x30], rdi
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
mov qword [rsp + 0x28], r14
lea r8, str.esif_ws_init
mov edx, 4
mov dword [rsp + 0x20], 0x15b
mov ecx, 0x8000
call fcn.140008b60
jmp 0x14002ca1a
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002c9c6
test dword [0x1401877e0], 0x8000
je 0x14002c9c6
lea rax, str.Connection_Limit_Exceeded___d_
mov dword [rsp + 0x30], 0xa
mov qword [rsp + 0x28], rax
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
lea r8, str.esif_ws_init
mov dword [rsp + 0x20], 0x140
mov edx, 4
mov ecx, 0x8000
call fcn.140008b60
mov rcx, r14
call qword [sym.imp.WSOCK32.dll_closesocket]
jmp 0x14002ca94
cmp eax, 0x708
jne 0x14002ca22
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002ca1a
test dword [0x1401877e0], 0x8000
je 0x14002ca1a
mov qword [rsp + 0x28], r13
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
lea r8, str.esif_ws_init
mov dword [rsp + 0x20], 0x15f
mov edx, 4
mov ecx, 0x8000
call fcn.140008b60
mov rcx, rbx
call fcn.14002b350
mov rcx, qword [rbx + 0xc]
test rcx, rcx
je 0x14002ca30
call fcn.140006db0
mov rcx, qword [rbx + 0x14]
test rcx, rcx
je 0x14002ca3e
call fcn.140006db0
mov rcx, qword [rbx + 0x24]
test rcx, rcx
je 0x14002ca4c
call fcn.140006db0
mov rcx, qword [rbx + 0x1c]
test rcx, rcx
je 0x14002ca5a
call fcn.140006db0
mov rcx, qword [rbx + 0x2c]
test rcx, rcx
je 0x14002ca68
call fcn.140006db0
mov qword [rbx + 0xc], r15
mov qword [rbx + 0x14], r15
mov qword [rbx + 0x24], r15
mov qword [rbx + 0x1c], r15
mov qword [rbx + 0x2c], r15
mov dword [rbx + 0x34], 0xff
add rsi, 0x5c
cmp rsi, 0x398
jl 0x14002c890
mov rax, r15
lock xadd qword [0x1401894e0], rax
test rax, rax
jne 0x14002cb1b
jmp 0x14002c6c8
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002cb1b
test dword [0x1401877e0], 0x8000
je 0x14002cb1b
lea rax, str.accept_2_
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x12f
jmp 0x14002cafe
cmp dword [reloc.WSOCK32.dll_accept], 4
jl 0x14002cb1b
test dword [0x1401877e0], 0x8000
je 0x14002cb1b
lea rax, str.Out_of_memory
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xdb
lea r9, str.........ESIF_WSSourcesesif_ws_server.c
mov edx, 4
lea r8, str.esif_ws_init
mov ecx, 0x8000
call fcn.140008b60
mov rdx, qword [0x140182310]
cmp rdx, 0xffffffffffffffff
je 0x14002cb3c
mov rcx, rdx
call qword [sym.imp.WSOCK32.dll_closesocket]
mov qword [0x140182310], 0xffffffffffffffff
cmp qword [0x140189500], r15
mov r14, qword [rsp + 0x2a8]
mov r13, qword [rsp + 0x2b0]
mov r12, qword [rsp + 0x2b8]
mov rsi, qword [rsp + 0x2d8]
je 0x14002cc57
mov rdi, r15
nop dword [rax]
mov rbx, qword [0x140189500]
add rbx, rdi
je 0x14002cc2e
mov rcx, qword [rbx + 0xc]
test rcx, rcx
je 0x14002cb8e
call fcn.140006db0
mov rcx, qword [rbx + 0x14]
test rcx, rcx
je 0x14002cb9c
call fcn.140006db0
mov rcx, qword [rbx + 0x24]
test rcx, rcx
je 0x14002cbaa
call fcn.140006db0
mov rcx, qword [rbx + 0x1c]
test rcx, rcx
je 0x14002cbb8
call fcn.140006db0
mov rcx, qword [rbx + 0x2c]
test rcx, rcx
je 0x14002cbc6
call fcn.140006db0
mov qword [rbx + 0xc], r15
mov qword [rbx + 0x14], r15
mov qword [rbx + 0x24], r15
mov qword [rbx + 0x1c], r15
mov qword [rbx + 0x2c], r15
mov dword [rbx + 0x34], 0xff
mov rcx, qword [rbx]
mov dword [rbx + 8], r15d
cmp rcx, 0xffffffffffffffff
je 0x14002cbfb
call qword [sym.imp.WSOCK32.dll_closesocket]
mov qword [rbx], 0xffffffffffffffff
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x14002cc09
call fcn.140006db0
mov rcx, qword [rbx + 0x48]
mov qword [rbx + 0x38], r15
mov qword [rbx + 0x40], r15
test rcx, rcx
je 0x14002cc1f
call fcn.140006db0
mov qword [rbx + 0x48], r15
mov qword [rbx + 0x50], r15
mov dword [rbx + 0x58], 0xff
add rdi, 0x5c
cmp rdi, 0x398
jl 0x14002cb70
mov rcx, qword [0x140189500]
test rcx, rcx
je 0x14002cc50
call fcn.140006db0
mov qword [0x140189500], r15
mov rcx, qword [0x140189518]
mov rdi, qword [rsp + 0x2e0]
mov rbx, qword [rsp + 0x2d0]
test rcx, rcx
je 0x14002cc78
call fcn.140006db0
mov rcx, qword [0x140189508]
test rcx, rcx
je 0x14002cc89
call fcn.140006db0
mov rcx, qword [0x140189520]
test rcx, rcx
je 0x14002cc9a
call fcn.140006db0
mov qword [0x140189518], r15
mov qword [0x140189508], r15
mov dword [0x140189510], r15d
mov qword [0x140189520], r15
mov qword [0x140189528], r15
call qword [sym.imp.WSOCK32.dll_WSACleanup]
lock dec qword [0x1401894e8]
mov rcx, qword [0x1401894f8]
mov r15, qword [rsp + 0x2a0]
test rcx, rcx
je 0x14002ccf7
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [0x1401894f8]
test rcx, rcx
je 0x14002ccf7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.14000d260
add rsp, 0x2c0
pop rbp
ret