Function at 0x1400309d0
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 [0x1400fe4a8]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov r14, rdx
mov r15, rcx
call fcn.140049730
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 0x140030a38
mov qword [r15 + 0x28], 0xffffffffffffffff
jmp 0x140030af0
test rsi, rsi
mov rcx, r15
sete dl
call fcn.14003d2f0
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140030af0
cmp qword [r15 + 0x18], 8
mov rcx, r15
jb 0x140030a60
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.1400290f0
mov rbx, rax
cmp qword [rax + 0x18], 0x10
jb 0x140030a95
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.14002eef0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x140030af0
mov rcx, qword [rsp + 0x70]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140030aeb
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140030c1f
call fcn.1400ce80c
mov ecx, 0x30
call fcn.1400ce7d0
mov r9, rax
test rax, rax
je 0x140030b27
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 0x140030b2a
mov r9, r12
mov qword [rsp + 0x28], r12
lea r8, [0x140030920]
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 0x140030b60
cmp rcx, rax
je 0x140030c26
call fcn.14003cea0
mov qword [rsp + rsi*8 + 0x50], rbx
test rbx, rbx
jne 0x140030b86
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.failed_to_create_thread__d
lea rcx, str.server
call fcn.14002eef0
inc rsi
cmp rsi, 2
jb 0x140030a21
lea rdx, str.server_has_created_named_pipe_and_is_ready_to_service_request
lea rcx, str.server
call fcn.14002eef0
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 0x140030e50
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 0x140030c46
mov rdx, qword [rax + 0x20]
cmp rdx, r14
jae 0x140030c2d
mov rax, qword [rax + 0x10]
jmp 0x140030c40
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 0x140030c3a
cmp r14, rdx
cmovb rsi, rax
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r12b
je 0x140030c10
cmp byte [rsi + 0x19], r12b
jne 0x140030c4f
mov rcx, qword [rsi]
cmp byte [rcx + 0x19], r12b
jne 0x140030c6d
cmp r14, qword [rcx + 0x20]
jae 0x140030c63
mov rsi, rcx
mov rcx, qword [rcx]
jmp 0x140030c67
mov rcx, qword [rcx + 0x10]
cmp byte [rcx + 0x19], r12b
je 0x140030c55
cmp rbx, qword [r8]
jne 0x140030c86
cmp byte [rsi + 0x19], r12b
je 0x140030c86
lea rcx, [r15 + 0x58]
call fcn.140031610
jmp 0x140030d3b
cmp rbx, rsi
je 0x140030d3b
nop
mov r8, qword [rbx + 0x10]
mov rdx, rbx
cmp byte [r8 + 0x19], r12b
je 0x140030ce5
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], r12b
jne 0x140030cba
cmp rbx, qword [rax + 0x10]
jne 0x140030cba
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r12b
je 0x140030ca7
mov rcx, qword [rdx + 8]
mov rbx, rax
cmp byte [rcx + 0x19], r12b
jne 0x140030d1c
mov rax, rdx
nop word [rax + rax]
cmp rax, qword [rcx + 0x10]
jne 0x140030d1c
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], r12b
je 0x140030cd0
jmp 0x140030d1c
mov rcx, qword [r8]
mov rbx, r8
cmp byte [rcx + 0x19], r12b
jne 0x140030d00
mov rax, qword [rcx]
mov rbx, rcx
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x140030cf1
mov rcx, qword [r8]
cmp byte [rcx + 0x19], r12b
jne 0x140030d1c
nop dword [rax]
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], r12b
je 0x140030d10
lea rcx, [r15 + 0x58]
call fcn.1400122d0
mov edx, 0x28
mov rcx, rax
call fcn.1400ce80c
cmp rbx, rsi
jne 0x140030c90
test r14, r14
je 0x140030df1
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 0x140030da3
call fcn.14003cea0
xor ebx, ebx
mov qword [r14 + 0x68], rbx
jmp 0x140030da5
xor ebx, ebx
mov rcx, qword [r14 + 0x60]
test rcx, rcx
je 0x140030db7
call fcn.14003cea0
mov qword [r14 + 0x60], rbx
mov rcx, qword [r14 + 0x58]
test rcx, rcx
je 0x140030dc9
call fcn.14003cea0
mov qword [r14 + 0x58], rbx
mov rcx, qword [r14 + 0x50]
test rcx, rcx
je 0x140030ddb
call fcn.14003cea0
mov qword [r14 + 0x50], rbx
lea rcx, [r14 + 0x18]
call sub.KERNEL32.dll_DeleteCriticalSection
mov edx, 0x88
mov rcx, r14
call fcn.1400ce80c
cmp byte [r15 + 0x68], r12b
jne 0x140030dfd
cmp qword [r15 + 0x60], r12
je 0x140030e47
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 0x140030bf0
jmp 0x140030e50
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.14003d600
sub rbx, 1
jne 0x140030e60
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 0x140030ea0
lea rcx, [r15 + 0x30]
call sub.KERNEL32.dll_EnterCriticalSection
mov rbx, qword [r15 + 0x58]
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], 0
jne 0x140030fe9
nop word [rax + rax]
mov rsi, qword [rbx + 0x20]
test rsi, rsi
je 0x140030f94
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 0x140030f48
call fcn.14003cea0
mov qword [rsi + 0x68], r12
mov rcx, qword [rsi + 0x60]
test rcx, rcx
je 0x140030f5a
call fcn.14003cea0
mov qword [rsi + 0x60], r12
mov rcx, qword [rsi + 0x58]
test rcx, rcx
je 0x140030f6c
call fcn.14003cea0
mov qword [rsi + 0x58], r12
mov rcx, qword [rsi + 0x50]
test rcx, rcx
je 0x140030f7e
call fcn.14003cea0
mov qword [rsi + 0x50], r12
lea rcx, [rsi + 0x18]
call sub.KERNEL32.dll_DeleteCriticalSection
mov edx, 0x88
mov rcx, rsi
call fcn.1400ce80c
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x140030fc0
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140030fbb
cmp rbx, qword [rax + 0x10]
jne 0x140030fbb
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140030fa8
mov rbx, rax
jmp 0x140030fdf
mov rdx, qword [rax]
mov rbx, rax
cmp byte [rdx + 0x19], 0
jne 0x140030fdf
nop dword [rax]
mov rax, qword [rdx]
mov rbx, rdx
mov rdx, rax
cmp byte [rax + 0x19], 0
je 0x140030fd0
cmp byte [rbx + 0x19], 0
je 0x140030ee0
lea rcx, [r15 + 0x58]
call fcn.140031610
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 0x140031018
call fcn.14003cea0
mov qword [rbx], r12
test r14, r14
jne 0x140031000
mov rbx, qword [rsp + 0x320]
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.1400ce8e0
add rsp, 0x2d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret