Function at 0x140031300
Capabilities:
Create thread

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1d0]
sub rsp, 0x2d0
mov rax, qword [0x1401114a8]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov r14, rdx
mov r15, rcx
call fcn.14004a4c0
xorps xmm0, xmm0
mov qword [rsp + 0x320], rbx
xor r12d, r12d
mov r13, rax
movdqu xmmword [rsp + 0x50], xmm0
mov esi, r12d
mov rdi, qword [r15 + 0x28]
cmp rdi, 0xffffffffffffffff
je 0x140031368
mov qword [r15 + 0x28], 0xffffffffffffffff
jmp 0x140031420
test rsi, rsi
mov rcx, r15
sete dl
call fcn.14003e170
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140031420
cmp qword [r15 + 0x18], 8
mov rcx, r15
jb 0x140031390
mov rcx, qword [r15]
mov qword [rsp + 0x60], rcx
lea rdx, [rsp + 0x40]
mov rcx, qword [r15 + 0x10]
mov qword [rsp + 0x68], rcx
lea rcx, [rsp + 0x70]
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x40], xmm0
call fcn.14002c1f0
mov rbx, rax
cmp qword [rax + 0x18], 0x10
jb 0x1400313c5
mov rbx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rbx
lea rdx, str.failed_to_create_named_pipe__s__d
mov r9d, eax
lea rcx, str.server
call fcn.1400700c0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x140031420
mov rcx, qword [rsp + 0x70]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003141b
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003154f
call fcn.1400d4a4c
mov ecx, 0x30
call fcn.1400d4a10
mov r9, rax
test rax, rax
je 0x140031457
mov rax, qword [r15 + 0x20]
mov qword [r9], rax
lea rax, [r15 + 0x30]
mov qword [r9 + 0x18], rax
lea rax, [r15 + 0x58]
mov qword [r9 + 0x20], rax
mov qword [r9 + 8], rdi
mov qword [r9 + 0x10], r14
mov qword [r9 + 0x28], r13
jmp 0x14003145a
mov r9, r12
mov qword [rsp + 0x28], r12
lea r8, [0x140031210]
xor edx, edx
mov dword [rsp + 0x20], r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, qword [rsp + rsi*8 + 0x50]
mov rbx, rax
test rcx, rcx
je 0x140031490
cmp rcx, rax
je 0x140031556
call fcn.14003dc20
mov qword [rsp + rsi*8 + 0x50], rbx
test rbx, rbx
jne 0x1400314b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.failed_to_create_thread__d
lea rcx, str.server
call fcn.1400700c0
inc rsi
cmp rsi, 2
jb 0x140031351
lea rdx, str.server_has_created_named_pipe_and_is_ready_to_service_request
lea rcx, str.server
call fcn.1400700c0
mov rax, qword [r14]
mov rcx, r14
call qword [rax]
mov rcx, qword [r15 + 0x20]
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x60], r12
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
mov r14, qword [rsp + 0x40]
test r14, r14
je 0x140031780
nop dword [rax]
lea rcx, [r15 + 0x30]
call sub.KERNEL32.dll_EnterCriticalSection
mov r8, qword [r15 + 0x58]
mov rbx, r8
mov rsi, r8
mov rcx, qword [r8 + 8]
mov rax, rcx
cmp byte [rcx + 0x19], r12b
jne 0x140031576
mov rdx, qword [rax + 0x20]
cmp rdx, r14
jae 0x14003155d
mov rax, qword [rax + 0x10]
jmp 0x140031570
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
cmp byte [rsi + 0x19], r12b
je 0x14003156a
cmp r14, rdx
cmovb rsi, rax
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r12b
je 0x140031540
cmp byte [rsi + 0x19], r12b
jne 0x14003157f
mov rcx, qword [rsi]
cmp byte [rcx + 0x19], r12b
jne 0x14003159d
cmp r14, qword [rcx + 0x20]
jae 0x140031593
mov rsi, rcx
mov rcx, qword [rcx]
jmp 0x140031597
mov rcx, qword [rcx + 0x10]
cmp byte [rcx + 0x19], r12b
je 0x140031585
cmp rbx, qword [r8]
jne 0x1400315b6
cmp byte [rsi + 0x19], r12b
je 0x1400315b6
lea rcx, [r15 + 0x58]
call fcn.140032110
jmp 0x14003166b
cmp rbx, rsi
je 0x14003166b
nop
mov r8, qword [rbx + 0x10]
mov rdx, rbx
cmp byte [r8 + 0x19], r12b
je 0x140031615
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], r12b
jne 0x1400315ea
cmp rbx, qword [rax + 0x10]
jne 0x1400315ea
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r12b
je 0x1400315d7
mov rcx, qword [rdx + 8]
mov rbx, rax
cmp byte [rcx + 0x19], r12b
jne 0x14003164c
mov rax, rdx
nop word [rax + rax]
cmp rax, qword [rcx + 0x10]
jne 0x14003164c
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], r12b
je 0x140031600
jmp 0x14003164c
mov rcx, qword [r8]
mov rbx, r8
cmp byte [rcx + 0x19], r12b
jne 0x140031630
mov rax, qword [rcx]
mov rbx, rcx
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x140031621
mov rcx, qword [r8]
cmp byte [rcx + 0x19], r12b
jne 0x14003164c
nop dword [rax]
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x140031640
lea rcx, [r15 + 0x58]
call fcn.1400133e0
mov edx, 0x28
mov rcx, rax
call fcn.1400d4a4c
cmp rbx, rsi
jne 0x1400315c0
test r14, r14
je 0x140031721
mov rcx, qword [r14]
mov rdx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
mov rcx, qword [r14 + 8]
mov rdx, 0xffffffffffffffff
mov qword [r14], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
mov rcx, qword [r14 + 0x10]
mov rdx, 0xffffffffffffffff
mov qword [r14 + 8], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
mov qword [r14 + 0x10], 0xffffffffffffffff
mov rcx, qword [r14 + 0x68]
test rcx, rcx
je 0x1400316d3
call fcn.14003dc20
xor ebx, ebx
mov qword [r14 + 0x68], rbx
jmp 0x1400316d5
xor ebx, ebx
mov rcx, qword [r14 + 0x60]
test rcx, rcx
je 0x1400316e7
call fcn.14003dc20
mov qword [r14 + 0x60], rbx
mov rcx, qword [r14 + 0x58]
test rcx, rcx
je 0x1400316f9
call fcn.14003dc20
mov qword [r14 + 0x58], rbx
mov rcx, qword [r14 + 0x50]
test rcx, rcx
je 0x14003170b
call fcn.14003dc20
mov qword [r14 + 0x50], rbx
lea rcx, [r14 + 0x18]
call sub.KERNEL32.dll_DeleteCriticalSection
mov edx, 0x88
mov rcx, r14
call fcn.1400d4a4c
cmp byte [r15 + 0x68], r12b
jne 0x14003172d
cmp qword [r15 + 0x60], r12
je 0x140031777
lea rcx, [r15 + 0x30]
call sub.KERNEL32.dll_LeaveCriticalSection
mov rcx, qword [r15 + 0x20]
lea r9, [rsp + 0x60]
xor eax, eax
mov dword [rsp + 0x20], 0xffffffff
lea r8, [rsp + 0x40]
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x30], eax
call qword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
mov r14, qword [rsp + 0x40]
test r14, r14
jne 0x140031520
jmp 0x140031780
lea rcx, [r15 + 0x30]
call sub.KERNEL32.dll_LeaveCriticalSection
mov r14d, 2
mov ebx, r14d
nop dword [rax]
xor edx, edx
lea rcx, [rbp - 0x64]
mov r8d, 0x218
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0x60]
mov dword [rbp - 0x70], 1
lea rdx, [rbp - 0x70]
mov qword [rbp - 0x6c], r13
mov rcx, r15
call fcn.14003e4e0
sub rbx, 1
jne 0x140031790
lea rbx, [rsp + 0x50]
nop dword [rax + rax]
mov rcx, qword [rbx]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rax, [rsp + 0x60]
add rbx, 8
cmp rbx, rax
jne 0x1400317d0
lea rcx, [r15 + 0x30]
call sub.KERNEL32.dll_EnterCriticalSection
mov rbx, qword [r15 + 0x58]
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
jne 0x140031919
nop word [rax + rax]
mov rsi, qword [rbx + 0x20]
test rsi, rsi
je 0x1400318c4
mov rcx, qword [rsi]
mov rdx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
mov rcx, qword [rsi + 8]
mov rdx, 0xffffffffffffffff
mov qword [rsi], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
mov rcx, qword [rsi + 0x10]
mov rdx, 0xffffffffffffffff
mov qword [rsi + 8], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
mov qword [rsi + 0x10], 0xffffffffffffffff
mov rcx, qword [rsi + 0x68]
test rcx, rcx
je 0x140031878
call fcn.14003dc20
mov qword [rsi + 0x68], r12
mov rcx, qword [rsi + 0x60]
test rcx, rcx
je 0x14003188a
call fcn.14003dc20
mov qword [rsi + 0x60], r12
mov rcx, qword [rsi + 0x58]
test rcx, rcx
je 0x14003189c
call fcn.14003dc20
mov qword [rsi + 0x58], r12
mov rcx, qword [rsi + 0x50]
test rcx, rcx
je 0x1400318ae
call fcn.14003dc20
mov qword [rsi + 0x50], r12
lea rcx, [rsi + 0x18]
call sub.KERNEL32.dll_DeleteCriticalSection
mov edx, 0x88
mov rcx, rsi
call fcn.1400d4a4c
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x1400318f0
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1400318eb
cmp rbx, qword [rax + 0x10]
jne 0x1400318eb
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1400318d8
mov rbx, rax
jmp 0x14003190f
mov rdx, qword [rax]
mov rbx, rax
cmp byte [rdx + 0x19], 0
jne 0x14003190f
nop dword [rax]
mov rax, qword [rdx]
mov rbx, rdx
mov rdx, rax
cmp byte [rax + 0x19], 0
je 0x140031900
cmp byte [rbx + 0x19], 0
je 0x140031810
lea rcx, [r15 + 0x58]
call fcn.140032110
lea rcx, [r15 + 0x30]
call sub.KERNEL32.dll_LeaveCriticalSection
lea rbx, [rsp + 0x60]
mov rcx, qword [rbx - 8]
lea rbx, [rbx - 8]
dec r14
test rcx, rcx
je 0x140031948
call fcn.14003dc20
mov qword [rbx], r12
test r14, r14
jne 0x140031930
mov rbx, qword [rsp + 0x320]
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.1400d4b20
add rsp, 0x2d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret