Function at 0x140006590
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp - 0x39], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14003e050]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r14d, r8d
mov r15, rdx
xor r12d, r12d
mov dword [rbp - 0x49], r12d
mov rbx, qword [0x14003e0b8]
test rbx, rbx
jne 0x140006829
lea ecx, [rbx + 0x58]
call fcn.140028630
mov rdi, rax
mov qword [rbp - 0x41], rax
mov qword [rbp + 0x1f], r12
mov qword [rbp + 0x27], r12
mov qword [rbp + 0x1f], r12
mov qword [rbp + 0x27], 7
mov word [rbp + 0xf], r12w
lea r8d, [r12 + 0x11]
lea rdx, str.RCPreViewFrameWnd
lea rcx, [rbp + 0xf]
call fcn.14000a790
nop
mov dword [rbp - 0x49], 1
mov qword [rbp - 1], r12
mov qword [rbp + 7], r12
mov qword [rbp - 1], r12
mov qword [rbp + 7], 7
mov word [rbp - 0x11], r12w
lea r8d, [r12 + 0x3a]
lea rdx, str.RC_PREVIEW_INSTANCE_C24237CB_7988_4196_8FBA_716DD0BC9F5D
lea rcx, [rbp - 0x11]
call fcn.14000a790
nop
mov ebx, 3
mov dword [rbp - 0x49], ebx
mov qword [rdi], r12
mov qword [rbp - 0x21], r12
mov qword [rbp - 0x19], r12
mov qword [rbp - 0x21], r12
mov qword [rbp - 0x19], 7
mov word [rbp - 0x31], r12w
lea r8d, [r12 + 0x34]
lea rdx, str.98B9F6E6_463F_4E42_874C_927C4C84A8F7_PreviewWorker
lea rcx, [rbp - 0x31]
call fcn.14000a790
nop
mov qword [rdi + 8], r12
mov word [rdi + 0x10], r12w
cmp qword [rbp - 0x21], r12
je 0x1400066ae
lea r8, [rbp - 0x31]
cmp qword [rbp - 0x19], 8
cmovae r8, qword [rbp - 0x31]
jmp 0x1400066b1
mov r8, r12
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rdi + 8], rax
test rax, rax
je 0x1400066d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400066d5
mov byte [rdi + 0x11], 1
mov rdx, qword [rbp - 0x19]
cmp rdx, 8
jb 0x140006718
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x31]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140006713
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140006713
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14002866c
mov qword [rbp - 0x21], r12
mov qword [rbp - 0x19], 7
mov word [rbp - 0x31], r12w
lea rcx, [rdi + 0x18]
lea rdx, [rbp - 0x11]
call fcn.140009a80
nop
lea rcx, [rdi + 0x38]
lea rdx, [rbp + 0xf]
call fcn.140009a80
nop
mov rsi, qword [0x14003e0b8]
mov qword [0x14003e0b8], rdi
test rsi, rsi
je 0x14000676e
mov rcx, rsi
call fcn.14000b6b0
mov edx, 0x58
mov rcx, rsi
call fcn.14002866c
nop
and ebx, 0xfffffffd
mov dword [rbp - 0x49], ebx
mov rdx, qword [rbp + 7]
cmp rdx, 8
jb 0x1400067b7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400067b2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400067b2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14002866c
mov qword [rbp - 1], r12
mov qword [rbp + 7], 7
mov word [rbp - 0x11], r12w
and ebx, 0xfffffffe
mov dword [rbp - 0x49], ebx
mov rdx, qword [rbp + 0x27]
cmp rdx, 8
jb 0x140006811
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000680c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000680c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14002866c
mov qword [rbp + 0x1f], r12
mov qword [rbp + 0x27], 7
mov word [rbp + 0xf], r12w
mov rbx, qword [0x14003e0b8]
cmp qword [rbx], 0
jne 0x140006884
mov ecx, 0x18
call fcn.140028630
mov qword [rbp - 0x41], rax
mov qword [rax], r12
mov qword [rax + 8], r12
mov dword [rax + 0x10], r12d
mov rdi, qword [rbx]
mov qword [rbx], rax
test rdi, rdi
je 0x140006884
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140006866
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rdi + 8], r12
mov rcx, qword [rdi]
test rcx, rcx
je 0x140006877
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], r12
mov edx, 0x18
mov rcx, rdi
call fcn.14002866c
lea r8, [rbx + 0x18]
cmp qword [r8 + 0x18], 8
jb 0x140006892
mov r8, qword [r8]
mov rbx, qword [rbx]
xor edx, edx
mov ecx, 0xf001f
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x10], eax
test rdi, rdi
je 0x1400068f5
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400068df
mov rdx, qword [rbx + 8]
test rdx, rdx
je 0x1400068d4
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rbx + 8], r12
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400068df
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], rdi
mov rdx, r15
mov rcx, qword [0x14003e0b8]
call fcn.14000b980
xor al, al
jmp 0x140006904
mov edx, r14d
mov rcx, qword [0x14003e0b8]
call fcn.14000b830
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140028370
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret