Function at 0x14005dce4
Capabilities:
Check mutex on windows
Create thread
Resume thread

Disassembly:
mov rax, rsp
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rax - 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], r12
mov r15d, r8d
mov rbx, rdx
mov r14, rcx
cmp r9d, 0x80
jbe 0x14005dd21
mov eax, 0x80070057
jmp 0x14005e534
lea r13d, [r9 + 7]
and r13d, 0xfffffff8
mov rax, qword [0x140082a38]
movabs r10, 0xb1a8ae8f5a5da170
lea rcx, [0x140082a38]
mov rax, qword [rax + 0x18]
call qword [0x140067cc0]
add rax, 0x18
mov qword [rsp + 0x38], rax
mov rax, qword [0x140082a38]
movabs r10, 0xb1a8ae8f5a5da170
lea rcx, [0x140082a38]
mov rax, qword [rax + 0x18]
call qword [0x140067cc0]
add rax, 0x18
mov qword [rsp + 0x30], rax
mov rax, qword [0x140082a38]
movabs r10, 0xb1a8ae8f5a5da170
lea rcx, [0x140082a38]
mov rax, qword [rax + 0x18]
call qword [0x140067cc0]
add rax, 0x18
mov qword [rsp + 0x40], rax
mov r8, rbx
lea rdx, str.LocalETWViewerViewportSyncMutex__s
lea rcx, [rsp + 0x38]
call fcn.14005f5d4
mov r8, rbx
lea rdx, str.LocalETWViewerViewportSyncSection__s
lea rcx, [rsp + 0x30]
call fcn.14005f5d4
mov r8, rbx
lea rdx, str.LocalETWViewerViewportSyncSemaphore__s
lea rcx, [rsp + 0x40]
call fcn.14005f5d4
nop
and qword [rsp + 0x58], 0
and dword [rsp + 0x60], 0
and qword [rsp + 0x68], 0
mov r12b, 1
mov r8, qword [rsp + 0x38]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
jne 0x14005decd
call fcn.14005d7d4
mov esi, eax
lea rcx, [rsp + 0x58]
call fcn.14005d838
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or ebx, 0xffffffff
mov ecx, ebx
lock xadd dword [rdx + 0x10], ecx
add ecx, ebx
test ecx, ecx
jg 0x14005de65
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005de96
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005dec6
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
mov eax, esi
jmp 0x14005e534
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0xb7
jne 0x14005dfd5
mov edx, r15d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop dword [rax + rax]
mov rcx, rsi
test eax, eax
je 0x14005dfc6
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax + rax]
lea rcx, [rsp + 0x58]
call fcn.14005d838
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005df5b
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005df8c
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005dfbc
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
mov eax, 0x80004005
jmp 0x14005e534
xor r12b, r12b
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x40]
mov r9, rbx
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 0x10]
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
nop dword [rax + rax]
mov r15, rax
test rax, rax
jne 0x14005e0c6
call fcn.14005d7d4
mov r14d, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax + rax]
lea rcx, [rsp + 0x58]
call fcn.14005d838
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
mov ecx, ebx
lock xadd dword [rdx + 0x10], ecx
add ecx, ebx
test ecx, ecx
jg 0x14005e05d
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e08e
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e0be
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
mov eax, r14d
jmp 0x14005e534
mov r9b, r12b
mov rdx, qword [rsp + 0x30]
lea rcx, [rsp + 0x58]
call fcn.14005d878
mov r12d, eax
mov rcx, rsi
test eax, eax
jns 0x14005e1b3
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax + rax]
lea rcx, [rsp + 0x58]
call fcn.14005d838
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e14a
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e17b
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e1ab
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
mov eax, r12d
jmp 0x14005e534
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
nop dword [rax + rax]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
nop dword [rax + rax]
mov r12, rax
test rax, rax
jne 0x14005e245
call fcn.14005d7d4
mov r14d, eax
lea rcx, [rsp + 0x58]
call fcn.14005d838
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
mov ecx, ebx
lock xadd dword [rdx + 0x10], ecx
add ecx, ebx
test ecx, ecx
jg 0x14005e05d
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
jmp 0x14005e05d
and qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 4
mov r9, r14
lea r8, [0x14005ef10]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop dword [rax + rax]
mov rdx, rax
test rax, rax
jne 0x14005e291
call fcn.14005d7d4
mov r14d, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
jmp 0x14005e1e5
cmp qword [r14 + 0x18], 0
je 0x14005e2a0
mov r14d, 0x8000ffff
jmp 0x14005e2b4
mov rcx, qword [rsp + 0x58]
test rcx, rcx
jne 0x14005e38e
mov r14d, 0x80070057
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
lea rcx, [rsp + 0x58]
call fcn.14005d838
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e32a
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e35b
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov ecx, ebx
lock xadd dword [rdx + 0x10], ecx
add ecx, ebx
test ecx, ecx
jg 0x14005e0be
mov rcx, qword [rdx]
mov r8, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [r8 + 8]
jmp 0x14005e0b8
mov qword [r14 + 0x18], rcx
mov eax, dword [rsp + 0x60]
mov dword [r14 + 0x20], eax
mov rax, qword [rsp + 0x68]
mov qword [r14 + 0x28], rax
and qword [rsp + 0x58], 0
and dword [rsp + 0x60], 0
and qword [rsp + 0x68], 0
mov qword [r14 + 8], rsi
mov qword [r14 + 0x10], r15
mov qword [r14 + 0x50], r12
mov qword [r14 + 0x48], rdx
test r13d, r13d
je 0x14005e3d1
mov qword [r14 + 0x30], rcx
mov dword [r14 + 0x38], r13d
mov eax, r13d
add rax, rcx
mov qword [r14 + 0x40], rax
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_ResumeThread]
nop dword [rax + rax]
mov rax, qword [r14 + 0x40]
lock inc dword [rax]
lea rcx, [rsp + 0x58]
call fcn.14005d838
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e430
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e461
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x14005e491
mov rcx, qword [rdx]
mov rax, qword [rcx]
movabs r10, 0xee98078a7ad38370
mov rax, qword [rax + 8]
call qword [0x140067cc0]
xor eax, eax
jmp 0x14005e534
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov r12, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r13
ret