Function at 0x100164d10
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x2f8], rbx
mov rax, qword [0x10022f440]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov dword [rsp + 0x50], r8d
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x40], 1
xor r13d, r13d
mov dword [rsp + 0x48], r13d
mov r9d, 0x104
mov r8, rdx
lea edx, [r9 + 1]
lea rbx, [0x1002a47c0]
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll_wcsncpy_s]
mov word [0x1002a49c8], r13w
call fcn.1001267c0
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.MSVCR100.dll__wcsupr_l]
xor edx, edx
mov r8d, 0x7080
mov rcx, qword [0x1002422e0]
call sub.MSVCR100.dll_memset
mov r14d, r13d
mov r15d, r13d
lea r12, [0x1000458d8]
lea rsi, [0x1000457c8]
nop word [rax + rax]
mov rdi, qword [0x1002422e0]
add rdi, r15
mov dword [rdi], r14d
mov r8d, 0xa
lea rdx, [rsp + 0x68]
mov ecx, r14d
call qword [sym.imp.MSVCR100.dll__itow]
mov rbx, rax
call fcn.1001267c0
mov r9, rax
lea rcx, [rdi + 4]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], r12
lea rax, [0x1002a47c0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r8, [0x1000458e0]
mov edx, 0x80
call fcn.100060cc0
mov word [rdi + 0x102], r13w
mov qword [rdi + 0x108], r13
mov qword [rdi + 0x110], r13
mov qword [rdi + 0x118], r13
inc r14d
add r15, 0x120
cmp r14d, 0x64
jb 0x100164dd0
mov rbx, qword [0x1002422e0]
lea rdi, [rbx + 4]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0x30000
xor r9d, r9d
lea r8d, [r9 + 4]
mov rdx, qword [0x1002a45a0]
or rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rbx + 0x108], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbx + 0x108], 0
mov esi, dword [rsp + 0x40]
mov r12, qword [rsp + 0x58]
mov r13d, dword [rsp + 0x50]
jne 0x100164ecb
mov rdx, rdi
mov ecx, 0x2076
call fcn.100122690
lea r8, [0x100045900]
jmp 0x100164fa0
cmp eax, 0xb7
jne 0x100164f0f
mov edx, 1
lea r8, [0x100045960]
mov ecx, 0x3e9
call fcn.100165b00
mov edx, 6
mov rcx, qword [rbx + 0x108]
call fcn.100166520
test eax, eax
je 0x100164f0f
mov rdx, rdi
mov ecx, 0x207f
call fcn.100122690
jmp 0x100164fb0
mov qword [rsp + 0x20], 0x30000
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov rcx, qword [rbx + 0x108]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbx + 0x110], rax
test rax, rax
jne 0x100164f51
mov rdx, rdi
mov ecx, 0x2077
call fcn.100122690
lea r8, [0x1000459b0]
jmp 0x100164fa0
mov edx, dword [rbx]
test edx, edx
je 0x100164fb8
mov rax, qword [0x1002422e0]
cmp qword [rax + 0x110], 0
je 0x100164f8e
cmp dword [rax], 0
jne 0x100164f8e
mov rcx, qword [rax + 0x110]
test rcx, rcx
je 0x100164f8e
mov dword [rsp + 0x50], edx
xor edi, edi
mov dword [rsp + 0x54], edi
mov rax, qword [rsp + 0x50]
mov qword [rcx + 8], rax
jmp 0x100164fba
mov qword [rbx + 0x118], 0
lea r8, [0x100045a30]
mov edx, 1
mov ecx, 0x3e9
call fcn.100165b00
nop
or eax, 0xffffffff
jmp 0x10016533c
xor edi, edi
mov rbx, qword [0x1002422e0]
call fcn.1001267c0
mov r9, rax
lea rax, [0x1002a47c0]
mov qword [rsp + 0x30], rax
lea rax, [0x100045ad4]
mov qword [rsp + 0x28], rax
lea rax, [0x100045a98]
mov qword [rsp + 0x20], rax
lea r8, [0x100045ad8]
mov edx, 0x105
lea rcx, [rbp - 0x80]
call fcn.100060cc0
mov word [rbp + 0x188], di
lea r8, [rbp - 0x80]
xor edx, edx
mov rcx, qword [0x1002a45a0]
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rbx + 0x118], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10016506b
mov edx, 1
lea r8, [0x100045af0]
mov ecx, 0x3e9
call fcn.100165b00
mov edx, 6
mov rcx, qword [rbx + 0x118]
call fcn.100166520
test eax, eax
je 0x10016506b
lea rdx, [rbp - 0x80]
mov ecx, 0x207f
call fcn.100122690
jmp 0x10016509a
cmp qword [rbx + 0x118], 0
jne 0x1001650a2
lea rdx, [rbp - 0x80]
mov ecx, 0x2078
call fcn.100122690
mov edx, 1
lea r8, [0x100045b30]
mov ecx, 0x3e9
call fcn.100165b00
nop
or eax, 0xffffffff
jmp 0x10016533c
mov rax, qword [0x1002422e0]
cmp qword [rax + 0x118], 0
je 0x1001650f7
lea rcx, [rsp + 0x40]
call fcn.100164b00
mov edx, 0x3e8
mov rcx, qword [0x1002422e0]
mov rcx, qword [rcx + 0x118]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1001650f1
cmp eax, 0x80
je 0x1001650f1
lea rcx, [rsp + 0x40]
call fcn.100164bd0
mov esi, dword [rsp + 0x40]
jmp 0x1001650f7
mov esi, edi
mov dword [rsp + 0x40], edi
mov rax, qword [0x1002422e0]
mov rcx, qword [rax + 0x110]
test rcx, rcx
jne 0x10016517f
lea edx, [rcx + 1]
lea r8, [0x100045ce0]
mov ecx, 0x3e9
call fcn.100165b00
mov edx, 1
lea r8, [0x100045ba0]
mov ecx, 0x3e9
call fcn.100165b00
nop
test esi, esi
jne 0x100165177
mov rcx, qword [0x1002422e0]
mov rcx, qword [rcx + 0x118]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x100165165
lea edx, [rsi + 1]
lea r8, [0x100045850]
mov ecx, 0x3e9
call fcn.100165b00
lea rcx, [rsp + 0x40]
call fcn.100164bd0
mov dword [rsp + 0x40], 1
or eax, 0xffffffff
jmp 0x10016533c
mov dword [rcx], edi
mov dword [rcx + 8], edi
mov dword [rcx + 0xc], 0x128
mov rax, qword [0x1002422e0]
mov rcx, qword [rax + 0x110]
test rcx, rcx
jne 0x1001651ce
lea edx, [rcx + 1]
lea r8, [0x100045ce0]
mov ecx, 0x3e9
call fcn.100165b00
mov edx, 1
lea r8, [0x100045c00]
mov ecx, 0x3e9
call fcn.100165b00
nop
jmp 0x100165135
mov dword [rcx + 0x10], edi
xor edx, edx
mov r8d, 0x800
lea rbx, [0x1002a35a0]
mov rcx, rbx
call sub.MSVCR100.dll_memset
mov qword [0x10029b510], rbx
lea rax, [0x1002a3da4]
mov ecx, 0x100
nop dword [rax + rax]
mov qword [rax - 4], 0xffffffffffffffff
add rax, 8
dec rcx
jne 0x100165200
lea rax, [0x1002a3da0]
mov qword [0x10029bd10], rax
lea rax, [0x10029bd18]
mov ecx, 0x1f
mov edx, ecx
nop dword [rax]
mov qword [rax], rdi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
add rax, 0x40
mov qword [rax - 0x28], rdi
mov qword [rax - 0x20], rdi
mov qword [rax - 0x18], rdi
mov qword [rax - 0x10], rdi
mov qword [rax - 8], rdi
dec rdx
jne 0x100165230
mov qword [rax], rdi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], rdi
mov qword [rax + 0x28], rdi
mov qword [rax + 0x30], rdi
lea rax, [0x10029b518]
nop word [rax + rax]
mov qword [rax], rdi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
add rax, 0x40
mov qword [rax - 0x28], rdi
mov qword [rax - 0x20], rdi
mov qword [rax - 0x18], rdi
mov qword [rax - 0x10], rdi
mov qword [rax - 8], rdi
dec rcx
jne 0x100165280
mov qword [rax], rdi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], rdi
mov qword [rax + 0x28], rdi
mov qword [rax + 0x30], rdi
mov edx, r13d
mov rcx, qword [0x1002422e0]
call fcn.100165d60
test eax, eax
jne 0x1001652f0
lea edx, [rax + 1]
lea r8, [0x100045c50]
mov ecx, 0x3e9
call fcn.100165b00
nop
jmp 0x100165135
mov dword [r12], 1
test esi, esi
jne 0x10016533a
mov rcx, qword [0x1002422e0]
mov rcx, qword [rcx + 0x118]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x100165328
lea edx, [rsi + 1]
lea r8, [0x100045850]
mov ecx, 0x3e9
call fcn.100165b00
lea rcx, [rsp + 0x40]
call fcn.100164bd0
mov dword [rsp + 0x40], 1
xor eax, eax
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.10005f420
mov rbx, qword [rsp + 0x2f8]
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret