Function at 0x14002e120
Capabilities:
Check mutex on windows
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x30
mov rax, qword [0x140091a88]
xor edi, edi
mov ebp, edx
mov r14, rcx
test rax, rax
jne 0x14002e15c
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov qword [0x140091a88], rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov ecx, dword [0x140091a6c]
test ecx, ecx
jne 0x14002e33b
cmp qword [0x140091a60], rdi
mov qword [rsp + 0x40], rsi
jne 0x14002e19a
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov qword [0x140091a60], rax
mov rax, qword [0x140092aa0]
test rax, rax
jne 0x14002e1ba
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov qword [0x140092aa0], rax
cmp qword [0x140091a70], rdi
jne 0x14002e1e1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateEventW]
mov qword [0x140091a70], rax
mov rax, qword [0x140092aa0]
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov rsi, qword [0x140091890]
mov rbx, qword [rsi + 8]
cmp byte [rbx + 0x19], dil
jne 0x14002e22d
mov r8, qword [rbx + 0x10]
lea rdx, [0x140091890]
lea rcx, [0x140091890]
call fcn.14002f5a0
mov rcx, rbx
mov edx, 0x30
mov rbx, qword [rbx]
call fcn.140038b74
cmp byte [rbx + 0x19], dil
je 0x14002e200
mov rcx, qword [0x140092aa0]
mov qword [rsi + 8], rsi
mov qword [rsi], rsi
mov qword [rsi + 0x10], rsi
mov qword [0x140091898], rdi
call qword [sym.imp.KERNEL32.DLL_ReleaseMutex]
cmp qword [0x140091a78], rdi
mov rax, qword [r14]
mov rsi, qword [rsp + 0x40]
mov qword [0x140091a80], rax
mov rax, qword [r14 + 8]
mov qword [0x140092a98], rax
mov rax, qword [r14 + 0x10]
mov qword [0x140092aa8], rax
mov eax, dword [r14 + 0x18]
mov dword [0x140091a68], eax
mov dword [0x140092a90], eax
jne 0x14002e2b0
mov qword [rsp + 0x28], rdi
lea r8, [0x14002df80]
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateThread]
mov qword [0x140091a78], rax
jmp 0x14002e2bd
mov rcx, qword [0x140091a70]
call qword [sym.imp.KERNEL32.DLL_SetEvent]
mov rcx, qword [0x140091a88]
mov ebx, edi
call qword [sym.imp.KERNEL32.DLL_ReleaseMutex]
test ebp, ebp
je 0x14002e2d7
call fcn.14002e380
mov ebx, eax
mov rax, qword [0x140091a88]
test rax, rax
jne 0x14002e2f7
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_CreateMutexW]
mov qword [0x140091a88], rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test ebx, ebx
jne 0x14002e316
mov edi, 1
mov dword [0x140091a6c], edi
jmp 0x14002e354
mov rcx, qword [0x140091a70]
call qword [sym.imp.KERNEL32.DLL_ResetEvent]
mov ecx, 0xf0001001
mov dword [0x140091a68], edi
call fcn.14002ddc0
mov dword [0x140091a6c], edi
jmp 0x14002e354
cmp ecx, 1
jne 0x14002e347
mov ebx, 0xf000100b
jmp 0x14002e354
cmp ecx, 2
mov ebx, edi
mov eax, 0xf0001001
cmove ebx, eax
mov rcx, qword [0x140091a88]
call qword [sym.imp.KERNEL32.DLL_ReleaseMutex]
mov rbp, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret