Function at 0x14001dc66
Capabilities:
Check mutex on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov ebx, edx
mov rax, qword [rcx]
mov rsi, qword [rcx + 8]
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x14001dca4
mov qword [rsp + 0x40], rax
add r12, rsi
mov cl, byte [rsi]
movzx r14d, cl
test r14b, r14b
js 0x14001dcc1
lea r13, [rsi + 1]
jmp 0x14001dd4d
xor r14d, r14d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x30], 2
mov qword [rsp + 0x38], r14
xor edi, edi
jmp 0x14001deec
mov eax, r14d
and eax, 0x1f
movzx edx, byte [rsi + 1]
and edx, 0x3f
cmp r14b, 0xdf
jbe 0x14001dd07
movzx r14d, byte [rsi + 2]
shl edx, 6
and r14d, 0x3f
or r14d, edx
cmp cl, 0xf0
jb 0x14001dd15
lea r13, [rsi + 4]
movzx ecx, byte [rsi + 3]
and eax, 7
shl eax, 0x12
shl r14d, 6
and ecx, 0x3f
or ecx, r14d
or ecx, eax
mov r14d, ecx
jmp 0x14001dd1f
lea r13, [rsi + 2]
shl eax, 6
or eax, edx
mov r14d, eax
jmp 0x14001dd4d
lea r13, [rsi + 3]
shl eax, 0xc
or r14d, eax
cmp r14d, 0xffff
jbe 0x14001dd4d
lea eax, [r14 + 0xff0000]
shr eax, 0xa
or eax, 0xd800
and r14d, 0x3ff
or r14d, 0xdc00
mov ebp, r14d
mov r14d, eax
jmp 0x14001dd4f
xor ebp, ebp
mov rax, r12
sub rax, r13
add rax, 3
mov rcx, 0xffffffffffffffff
cmovae rcx, rax
shr rcx, 2
cmp bp, 1
sbb rcx, 0xffffffffffffffff
cmp rcx, 4
mov r15d, 3
cmovae r15, rcx
lea rdi, [r15*2 + 2]
movabs rax, 0x3ffffffffffffffe
cmp rcx, rax
ja 0x14001df84
mov al, byte [0x1400cdcc0]
xor ecx, ecx
mov rdx, rdi
call fcn.14005b1d0
test rax, rax
je 0x14001df88
inc r15
mov word [rax], r14w
lea rdi, [rsp + 0x28]
mov qword [rdi], r15
mov qword [rdi + 8], rax
mov r14d, 1
mov qword [rsp + 0x38], r14
test bp, bp
jne 0x14001de7c
cmp r13, r12
je 0x14001dedd
mov dl, byte [r13]
movzx ebp, dl
test bpl, bpl
js 0x14001ddf6
inc r13
jmp 0x14001de7c
mov ecx, ebp
and ecx, 0x1f
movzx r8d, byte [r13 + 1]
and r8d, 0x3f
cmp bpl, 0xdf
jbe 0x14001de3b
movzx ebp, byte [r13 + 2]
shl r8d, 6
and ebp, 0x3f
or ebp, r8d
cmp dl, 0xf0
jb 0x14001de49
movzx edx, byte [r13 + 3]
add r13, 4
and ecx, 7
shl ecx, 0x12
shl ebp, 6
and edx, 0x3f
or edx, ebp
or edx, ecx
mov ebp, edx
jmp 0x14001de52
add r13, 2
shl ecx, 6
or ecx, r8d
mov ebp, ecx
jmp 0x14001de7c
add r13, 3
shl ecx, 0xc
or ebp, ecx
cmp ebp, 0xffff
jbe 0x14001de7c
lea ecx, [rbp + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and ebp, 0x3ff
or ebp, 0xdc00
mov r15d, ebp
mov ebp, ecx
jmp 0x14001de7f
xor r15d, r15d
cmp r14, qword [rsp + 0x28]
je 0x14001de96
mov word [rax + r14*2], bp
inc r14
mov ebp, r15d
jmp 0x14001ddcb
mov r8, r12
sub r8, r13
add r8, 3
mov rax, 0xffffffffffffffff
cmovb r8, rax
shr r8, 2
cmp r15w, 1
sbb r8, 0
add r8, 2
mov qword [rsp + 0x20], 2
mov r9d, 2
mov rcx, rdi
mov rdx, r14
call fcn.140084696
mov rax, qword [rsp + 0x30]
jmp 0x14001de86
mov r14, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x38]
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x14001df03
mov rcx, qword [0x1400cdc50]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp rdi, r14
jne 0x14001df12
lea rcx, [rsp + 0x28]
call fcn.1400644d5
mov rsi, qword [rsp + 0x30]
mov word [rsi + rdi*2], 0
inc rdi
mov qword [rsp + 0x38], rdi
xor ecx, ecx
xor edx, edx
mov r8, rsi
call sub.KERNEL32.dll_CreateMutexW
mov r14, rax
mov rcx, rax
xor edx, edx
call sub.KERNEL32.dll_WaitForSingleObject
mov edi, eax
test eax, eax
setne al
xor bl, 1
or bl, al
jne 0x14001df54
mov rcx, r14
call sub.KERNEL32.dll_ReleaseMutex
cmp qword [rsp + 0x28], 0
je 0x14001df6e
mov rcx, qword [0x1400cdc50]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
sete al
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ecx, ecx
jmp 0x14001df8d
mov ecx, 2
mov rdx, rdi
call fcn.140083a40
int3