Function at 0x140040310
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0xc8]
sub rsp, 0x1b0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140184aa8]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov rsi, rcx
xor r15d, r15d
mov dword [rsp + 0x30], r15d
call fcn.140040f90
test rax, rax
jne 0x140040609
lea r14, [rsi + 2]
mov r8, r14
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateMutexA]
mov rbx, rax
mov qword [rsp + 0x30], rax
add rsi, 0x108
mov rdx, rsi
lea rcx, [0x14018d598]
call fcn.14003fdf0
mov rdi, rax
cmp rax, qword [0x14018d598]
je 0x1400403db
lea r8, [rax + 0x20]
mov rdx, rsi
lea rcx, [0x14018d598]
call fcn.140040290
test al, al
jne 0x1400403db
add rdi, 0x40
lea rax, [rsp + 0x30]
cmp rdi, rax
je 0x140040411
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400403d3
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi], rbx
mov rbx, r15
jmp 0x140040411
lea r8, [rsp + 0x30]
mov rdx, rsi
lea rcx, [0x14018d598]
call fcn.14003efc0
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
mov r8, rdi
lea rdx, [rsp + 0x38]
lea rcx, [0x14018d598]
call fcn.14003f620
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x14004041f
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rdx, rsi
lea rcx, [0x14018d598]
call fcn.1400401f0
mov rbx, rax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
cmp eax, 5
jne 0x14004046f
mov r8, r14
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.api_ms_win_core_synch_ansi_l1_1_0.dll_OpenMutexA]
mov rdi, rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004045f
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rbx], rdi
test rdi, rdi
jne 0x14004046f
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
cmp qword [rbx], 0
jne 0x140040609
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov edx, 0x20000001
lea rcx, [rsp + 0x70]
call sym.HfcDisableService.exe_public:_void___cdecl_CConsolidatedError::constructor_enum_CConsolidatedErrorGenerated::ISDI2_ERRORS____ptr64
nop
mov dword [rsp + 0x78], esi
xor edx, edx
mov r8d, 0xf8
lea rcx, [rbp - 0x60]
call fcn.1400d5b20
lea rcx, [0x140000000]
lea rax, [rcx + 0x145288]
mov qword [rbp - 0x60], rax
lea rax, [rcx + 0x145100]
mov qword [rbp - 0x50], rax
mov dword [rsp + 0x30], 1
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x38], rax
mov dword [rbp + 0x34], 0x80
mov qword [rbp - 0x58], r15
xor r8d, r8d
lea rdx, [rbp - 0x48]
lea rcx, [rbp + 0x38]
call fcn.14001cb10
nop
lea rax, [rbp - 0x50]
mov qword [rsp + 0x38], rax
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x50], rax
mov rax, qword [rbp - 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x54], edx
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rbp + rcx - 0x64], edx
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx - 0x64], edx
lea rax, [rbp - 0x48]
mov qword [rsp + 0x38], rax
lea rcx, [rbp - 0x48]
call fcn.14001c890
nop
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp - 0x48], rax
mov qword [rbp + 0x20], r15
mov dword [rbp + 0x28], r15d
lea rdx, str.Failed_to_create_or_open_mutex._ErrorCode:
lea rcx, [rbp - 0x50]
call fcn.14000d110
mov rcx, rax
mov edx, dword [rsp + 0x78]
call fcn.140016080
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x60]
call fcn.14001b5c0
nop
mov rcx, rax
call fcn.1400058c0
mov rdx, rax
lea rcx, [rsp + 0x70]
call sym.HfcDisableService.exe_public:_void___cdecl_CConsolidatedError::AddDebugInformation_char_const____ptr64____ptr64
nop
lea rcx, [rsp + 0x48]
call fcn.140006ad0
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call sym.HfcDisableService.exe_public:_void___cdecl_CConsolidatedError::constructor_class_CConsolidatedError_const____ptr64____ptr64
lea rdx, [0x14017bb80]
lea rcx, [rsp + 0x48]
call fcn.1400d5a30
nop
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.1400b48a0
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret