Function at 0x140137e50
Capabilities:
Create pipe
Create thread

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov qword [rbp - 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x150], rbx
mov rax, qword [0x14028a238]
xor rax, rsp
mov qword [rbp], rax
mov r15, r8
mov r14, rdx
mov qword [rbp - 0x48], rdx
xor r12d, r12d
lea r13, [0x140298b00]
nop word [rax + rax]
lea rdx, [rbp - 0x20]
mov rcx, r14
call fcn.14013f6c0
cmp qword [rax + 0x18], 8
jb 0x140137eb6
mov rax, qword [rax]
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], 0x1000
mov dword [rsp + 0x20], 0x1000
mov edx, 0x40000003
mov r9d, 0xff
mov r8d, 6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rsi, rax
mov r8, qword [rbp - 8]
cmp r8, 8
jb 0x140137f07
inc r8
mov rdx, qword [rbp - 0x20]
lea rcx, [rbp - 0x20]
call fcn.1400c3a10
mov qword [rbp - 8], 7
mov qword [rbp - 0x10], r12
mov word [rbp - 0x20], r12w
lea rax, [rsi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401381b2
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 0x68], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x48]
call fcn.140129e90
nop
mov rax, qword [rbp - 0x68]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], r15
lea rdx, [rbp - 0x80]
mov rcx, rsi
call fcn.140136c90
movzx ebx, al
or r9d, 0xffffffff
xor r8d, r8d
lea rdx, [rsp + 0x70]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x1401382c8
test bl, bl
je 0x140138083
mov dword [rsp + 0x50], r12d
xor r9d, r9d
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x80]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x140138083
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
lea r8d, [rax + 0x39]
lea rdx, str._Wa3rdPartyHost::ServerListen__GetOverlappedResult_failed
lea rcx, [rbp - 0x40]
call fcn.1400c3720
nop
call fcn.1400dfb30
mov rbx, rax
mov qword [rbp - 0x58], r13
mov rcx, r13
call fcn.14016e8f8
test eax, eax
je 0x140138000
mov ecx, eax
call fcn.14016e464
mov byte [rbp - 0x50], 1
cmp qword [rbx + 0x48], 0
je 0x140138040
mov dword [rsp + 0x40], 1
mov rdi, qword [rbx + 0x48]
test rdi, rdi
je 0x1401381cd
mov rax, qword [rdi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [fcn.140005fb0]
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x40]
mov rcx, rdi
call rbx
jmp 0x14013804d
lea rdx, [rbp - 0x40]
mov rcx, rbx
call fcn.1400db0e0
nop
mov rcx, r13
call fcn.14016e91c
test eax, eax
je 0x140138061
mov ecx, eax
call fcn.14016e464
nop
mov r8, qword [rbp - 0x28]
cmp r8, 8
jb 0x14013807b
inc r8
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
call fcn.1400c3a10
mov rcx, rsi
jmp 0x140138183
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
mov r8d, 0x2f
lea rdx, str._Wa3rdPartyHost::ServerListen__client_connected
lea rcx, [rbp - 0x40]
call fcn.1400c3720
nop
call fcn.1400dfb30
mov rbx, rax
mov qword [rsp + 0x58], r13
mov rcx, r13
call fcn.14016e8f8
test eax, eax
je 0x1401380cb
mov ecx, eax
call fcn.14016e464
mov byte [rsp + 0x60], 1
cmp qword [rbx + 0x48], 0
je 0x14013810c
mov dword [rsp + 0x40], 1
mov rdi, qword [rbx + 0x48]
test rdi, rdi
je 0x1401381d3
mov rax, qword [rdi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [fcn.140005fb0]
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x40]
mov rcx, rdi
call rbx
jmp 0x140138119
lea rdx, [rbp - 0x40]
mov rcx, rbx
call fcn.1400db0e0
nop
mov rcx, r13
call fcn.14016e91c
test eax, eax
je 0x14013812d
mov ecx, eax
call fcn.14016e464
nop
mov r8, qword [rbp - 0x28]
cmp r8, 8
jb 0x140138147
inc r8
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
call fcn.1400c3a10
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call fcn.14016d134
mov qword [rax + 8], rsi
mov qword [rax], r14
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r12d
mov r9, rax
lea r8, [0x14013ed60]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
test rax, rax
je 0x1401381d9
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x140137ea0
mov rcx, rbx
call fcn.140138520
mov edx, 8
mov rcx, rbx
call fcn.14016d8bc
jmp 0x140137ea0
mov edx, 0x1f4
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1401383c4
jmp 0x140137ea0
call fcn.14016e304
nop
call fcn.14016e304
nop
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
mov r8d, 0x32
lea rdx, str._Wa3rdPartyHost::ServerListen__CreateThread_failed
lea rcx, [rbp - 0x40]
call fcn.1400c3720
nop
call fcn.1400dfb30
mov rbx, rax
mov qword [rsp + 0x58], r13
mov rcx, r13
call fcn.14016e8f8
test eax, eax
je 0x140138221
mov ecx, eax
call fcn.14016e464
mov byte [rsp + 0x60], 1
cmp qword [rbx + 0x48], 0
je 0x140138264
mov dword [rsp + 0x40], 1
mov rdi, qword [rbx + 0x48]
test rdi, rdi
jne 0x140138244
call fcn.14016e304
int3
mov rax, qword [rdi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [fcn.140005fb0]
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x40]
mov rcx, rdi
call rbx
jmp 0x140138271
lea rdx, [rbp - 0x40]
mov rcx, rbx
call fcn.1400db0e0
nop
mov rcx, r13
call fcn.14016e91c
test eax, eax
je 0x140138285
mov ecx, eax
call fcn.14016e464
nop
mov r8, qword [rbp - 0x28]
cmp r8, 8
jb 0x1401382a0
inc r8
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
call fcn.1400c3a10
nop
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x1401383c4
mov rcx, rbx
call fcn.140138520
mov edx, 8
mov rcx, rbx
call fcn.14016d8bc
jmp 0x1401383c4
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], r12
mov word [rbp - 0x40], r12w
mov r8d, 0x34
lea rdx, str._Wa3rdPartyHost::ServerListen__cancelHandle_signaled
lea rcx, [rbp - 0x40]
call fcn.1400c3720
nop
call fcn.1400dfb30
mov rbx, rax
mov qword [rsp + 0x58], r13
mov rcx, r13
call fcn.14016e8f8
test eax, eax
je 0x140138310
mov ecx, eax
call fcn.14016e464
mov byte [rsp + 0x60], 1
cmp qword [rbx + 0x48], 0
je 0x140138353
mov dword [rsp + 0x40], 1
mov rdi, qword [rbx + 0x48]
test rdi, rdi
jne 0x140138333
call fcn.14016e304
int3
mov rax, qword [rdi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [fcn.140005fb0]
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x40]
mov rcx, rdi
call rbx
jmp 0x140138360
lea rdx, [rbp - 0x40]
mov rcx, rbx
call fcn.1400db0e0
nop
mov rcx, r13
call fcn.14016e91c
test eax, eax
je 0x140138374
mov ecx, eax
call fcn.14016e464
nop
mov r8, qword [rbp - 0x28]
cmp r8, 8
jb 0x14013838e
inc r8
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
call fcn.1400c3a10
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x1401383b8
mov rcx, rbx
call fcn.140138520
mov edx, 8
mov rcx, rbx
call fcn.14016d8bc
nop
mov rcx, r14
call fcn.1400d5cb0
mov al, 1
jmp 0x1401383ce
mov rcx, r14
call fcn.1400d5cb0
xor al, al
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.14016ce60
mov rbx, qword [rsp + 0x150]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret