Function at 0x140012b00
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x330
mov rax, qword [0x1400a6fa0]
xor rax, rsp
mov qword [rsp + 0x300], rax
mov qword [r11 + 0x10], rbp
mov qword [r11 - 0x10], r12
mov qword [r11 - 0x18], r13
mov qword [r11 - 0x20], r14
mov qword [r11 - 0x28], r15
xor r15d, r15d
lea rax, vtable.CPipeServerWithPowerShell.0
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov qword [rsp + 0x60], rax
lea ecx, [r15 + 8]
mov qword [r11 - 0x2b8], r15
call fcn.1400409cc
test rax, rax
je 0x140012b71
lea rcx, [rsp + 0xa0]
mov qword [rax], rcx
jmp 0x140012b74
mov rax, r15
lea rcx, [rsp + 0xa0]
mov qword [rsp + 0x340], rbx
mov qword [rsp + 0xa0], rax
call fcn.14000f2c0
lea rcx, [rsp + 0xf2]
xor edx, edx
mov qword [rsp + 0xd0], rax
mov byte [rax + 0x49], 1
mov rax, qword [rsp + 0xd0]
mov qword [rax + 8], rax
mov rax, qword [rsp + 0xd0]
mov r8d, 0x206
mov qword [rax], rax
mov rax, qword [rsp + 0xd0]
mov r14, r15
mov qword [rax + 0x10], rax
mov qword [rsp + 0xd8], r15
mov word [rsp + 0xf0], r15w
mov r13d, r15d
call fcn.140051b60
mov r12, r15
mov ebp, r15d
mov dword [rsp + 0x40], r15d
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test rax, rax
je 0x140012e68
mov edi, 1
cmp dword [rsp + 0x40], edi
jle 0x140012e68
mov qword [rsp + 0x350], rsi
mov edx, 0x2d
lea r8d, [rdi + 0x2e]
lea rsi, [rax + 8]
nop dword [rax + rax]
mov rcx, qword [rsi]
movzx eax, word [rcx]
cmp dx, ax
je 0x140012c7c
cmp r8w, ax
je 0x140012c7c
test ebp, ebp
jle 0x140012cbf
lea eax, [rbp + 1]
cmp eax, edi
jne 0x140012cbf
mov r8, rcx
lea rcx, [rsp + 0xf0]
mov edx, 0x103
call fcn.14004f708
mov edx, 0x2d
lea r8d, [rdx + 2]
jmp 0x140012cbf
lea rbx, [rcx + 2]
lea rdx, str.start
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x140012ca1
lea edx, [rax + 0x2d]
lea r13d, [rax + 1]
lea r8d, [rax + 0x2f]
jmp 0x140012cbf
lea rdx, [0x14008c16c]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov edx, 0x2d
test eax, eax
lea r8d, [rdx + 2]
cmove ebp, edi
inc edi
add rsi, 8
cmp edi, dword [rsp + 0x40]
jl 0x140012c40
mov rsi, qword [rsp + 0x350]
test r13d, r13d
je 0x140012e68
lea r8, str.GlobalMUTEX_EXCHANGE_PSHTOOL_PIPE_SERVER_PROCESS
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov r14, rax
test rax, rax
jne 0x140012d04
lea edi, [rax - 2]
jmp 0x140012e6c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140012d1b
mov edi, 0xfffffffd
jmp 0x140012e6c
mov dword [rsp + 0x30], r15d
lea r9, str.D:TBNetPrimitiveBackupExchangeBackupPiperToPowerShellForMailapiPSHToolForMail64PSHToolForMail64.cpp
lea r8, str.freeker__no_PSHToolForMail64_runs__so_activate_one
lea rdx, str._s:_File___s_Line___ld_Error__0x_lx_0x_lx_._n
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0xa5
call fcn.1400407c0
call fcn.140012060
test eax, eax
setne cl
call fcn.1400123e0
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbx, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140012e5c
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
call fcn.1400010d0
test eax, eax
je 0x140012da5
mov rbx, qword [rsp + 0x50]
mov edi, 0xfffffffc
jmp 0x140012e61
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0xf0]
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x140012de5
lea r8, [rsp + 0xf0]
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov r12, rax
test rax, rax
je 0x140012de5
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rbx, qword [rsp + 0x50]
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140012e05
call fcn.140019f50
cmp qword [rsp + 0x70], r15
jne 0x140012e24
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x30], r15
lea r9, str.D:TBNetPrimitiveBackupExchangeBackupPiperToPowerShellForMailapiPSHToolForMail64PipeServerWithPowerShell.cpp
lea r8, str.PSHToolForMail64__pipeserver_Uninitialize_end.
lea rdx, str._s:_File___s_Line___ld_Error__0x_lx_0x_lx_._n
xor ecx, ecx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x78], r15
mov dword [rsp + 0x20], 0x61
call fcn.1400407c0
mov edi, r15d
jmp 0x140012e61
mov edi, 0xfffffffb
test rbx, rbx
jne 0x140012e74
jmp 0x140012e6c
or rdi, 0xffffffffffffffff
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x320]
mov rbp, qword [rsp + 0x348]
mov rbx, qword [rsp + 0x340]
test r14, r14
je 0x140012e9a
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0x318]
test r12, r12
je 0x140012eb6
cmp r12, 0xffffffffffffffff
je 0x140012eb6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
lea r9, str.D:TBNetPrimitiveBackupExchangeBackupPiperToPowerShellForMailapiPSHToolForMail64PSHToolForMail64.cpp
lea r8, str.PSHToolForMail64
and eax, 0xfff
lea rdx, str._s:_File___s_Line___ld_Error__0x_lx_0x_lx_._n
xor ecx, ecx
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 0xe2
call fcn.1400407c0
mov rcx, qword [rsp + 0xa0]
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x58], rax
mov rax, qword [rax]
mov qword [rsp + 0x50], rcx
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x98], rax
lea r9, [rsp + 0x50]
movaps xmm1, xmmword [rsp + 0x90]
movdqa xmmword [rsp + 0x90], xmm1
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0xa0]
call fcn.14000cf50
mov rcx, qword [rsp + 0xd0]
call fcn.140040a10
mov rcx, qword [rsp + 0xa0]
mov qword [rsp + 0xd0], r15
mov qword [rsp + 0xd8], r15
call fcn.140040a10
mov rcx, qword [rsp + 0x68]
mov r12, qword [rsp + 0x328]
lea r11, vtable.CPipeServerWithPowerShell.0
mov qword [rsp + 0x60], r11
test rcx, rcx
je 0x140012fa1
call fcn.140019f50
cmp qword [rsp + 0x70], r15
jne 0x140012fc0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x30], r15
lea r9, str.D:TBNetPrimitiveBackupExchangeBackupPiperToPowerShellForMailapiPSHToolForMail64PipeServerWithPowerShell.cpp
lea r8, str.PSHToolForMail64__pipeserver_Uninitialize_end.
lea rdx, str._s:_File___s_Line___ld_Error__0x_lx_0x_lx_._n
xor ecx, ecx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x78], r15
mov dword [rsp + 0x20], 0x61
call fcn.1400407c0
mov rcx, qword [rsp + 0x68]
mov r15, qword [rsp + 0x310]
test rcx, rcx
je 0x14001301f
call fcn.140019f50
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14001301f
mov rax, qword [rcx]
mov edx, 1
call qword [rax + 0x48]
mov eax, edi
mov rcx, qword [rsp + 0x300]
xor rcx, rsp
call fcn.14004e770
add rsp, 0x330
pop rdi
ret