Function at 0x18000c318
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x10], rdx
mov word [rax + 8], cx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x148]
sub rsp, 0x210
xor r15d, r15d
movzx r14d, cx
mov rcx, r8
mov qword [rsp + 0x60], r15
mov r12d, r15d
mov qword [rsp + 0x30], r15
mov rdi, r8
mov rbx, rdx
call fcn.18001b908
mov r9, qword [rbp + 0x178]
mov r8, rbx
mov rdx, qword [rbp + 0x188]
movzx ecx, r14w
mov qword [rsp + 0x48], rax
call fcn.18000ca78
mov rdx, qword [rbp + 0x180]
mov r8, rax
mov rcx, rdi
mov qword [rsp + 0x38], rax
mov rbx, rax
call fcn.18000d208
mov rcx, rbx
call fcn.18000cb28
test eax, eax
jne 0x18000c3cd
movzx ecx, word [rbx + 8]
call fcn.18000bd74
test rax, rax
je 0x18000c3cd
mov r9, qword [rax + 8]
test r9, r9
je 0x18000c3cd
mov rcx, qword [rbx + 0x20]
lea rdx, [rsp + 0x30]
mov r8, rdi
call r9
lea rcx, [rsp + 0x38]
call fcn.18000cc18
mov rax, qword [rsp + 0x30]
mov edi, 1
mov rsi, qword [rbp + 0x170]
test rax, rax
je 0x18000c5e6
mov edx, edi
mov rcx, rax
call fcn.1800178f8
mov rdx, qword [rsp + 0x30]
movzx ecx, r14w
mov qword [rsi + 8], rax
call fcn.18000ca4c
mov r14, rax
xor ebx, ebx
movabs rax, 0xcccccccccccccccd
mov qword [rsp + 0x40], rbx
mul r14
mov r15, r14
xor r8d, r8d
mov r13, rdx
xor edx, edx
shr r13, 2
lea rcx, [r13*4]
add rcx, r13
sub r15, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rsp + 0x50], rax
cmp r14, 5
ja 0x18000c465
mov r13d, edi
mov r15d, edi
test r14, r14
je 0x18000c56d
jmp 0x18000c46e
mov r14d, 5
add r15, r13
movzx ecx, word [rbp + 0x150]
call fcn.18000ca30
mov rsi, qword [rsp + 0x48]
lea r12, [rbp - 0x46]
xor ecx, ecx
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x38], rcx
cmp rcx, 4
mov qword [r12 - 0x10], rsi
lea rcx, [rsp + 0x50]
mov rdx, r13
mov qword [r12 - 0x2a], rcx
cmove rdx, r15
mov rcx, qword [rbp + 0x158]
mov qword [r12 - 8], rcx
mov rcx, qword [rbp + 0x188]
mov qword [r12], rcx
lea rdi, [rdx + rbx]
mov rcx, qword [rbp + 0x178]
mov qword [r12 + 8], rcx
mov rcx, rax
imul rcx, rdx
mov edx, 1
call fcn.1800178f8
xor ecx, ecx
mov qword [r12 + 0x18], rax
mov rax, qword [rsp + 0x40]
lea r9, [r12 - 0x2a]
mov qword [r12 - 0x22], rax
lea r8, [0x18000c270]
movzx eax, word [rbp + 0x150]
xor edx, edx
mov qword [rsp + 0x28], rcx
mov word [r12 - 0x12], ax
mov dword [r12 + 0x10], ecx
mov dword [r12 + 0x14], 1
mov qword [r12 - 0x1a], rdi
mov dword [rsp + 0x20], ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, qword [rsp + 0x38]
lea r12, [r12 + 0x4a]
mov rbx, rdi
mov edi, 1
mov qword [rsp + 0x40], rbx
mov qword [rsp + rcx*8 + 0x68], rax
add rcx, rdi
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x38], rcx
cmp rcx, r14
jb 0x18000c48f
mov rsi, qword [rbp + 0x170]
mov r12, qword [rsp + 0x60]
or r9d, 0xffffffff
lea rdx, [rsp + 0x68]
mov r8d, edi
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor r15d, r15d
test r14, r14
je 0x18000c5e1
lea rbx, [rbp - 0x46]
cmp dword [rbx + 0x14], r15d
jne 0x18000c5b4
cmp dword [rbx + 0x10], r15d
jbe 0x18000c5b4
mov rcx, qword [rsi + 8]
mov r8d, dword [rbx + 0x10]
add rcx, r12
mov rdx, qword [rbx + 0x18]
call fcn.180015fd0
mov eax, dword [rbx + 0x10]
add r12, rax
mov rcx, qword [rbx + 0x18]
mov qword [rbx - 8], r15
mov qword [rbx], r15
mov qword [rbx - 0x10], r15
mov dword [rbx + 0x14], edi
test rcx, rcx
je 0x18000c5d4
call fcn.1800178e8
mov qword [rbx + 0x18], r15
mov dword [rbx + 0x10], r15d
add rbx, 0x4a
sub r14, rdi
jne 0x18000c58e
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x18000c5fa
call fcn.1800178e8
mov rax, qword [rsp + 0x30]
cmp rax, r12
jne 0x18000c61d
test rax, rax
jne 0x18000c60e
mov qword [rsi], r15
mov eax, 0x251d
jmp 0x18000c615
mov qword [rsi], rax
movzx eax, r15w
mov word [rsi + 0x10], ax
mov eax, edi
jmp 0x18000c63d
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x18000c62f
call fcn.1800178e8
mov qword [rsi + 8], r15
mov eax, 0x1e
mov qword [rsi], r15
mov word [rsi + 0x10], ax
xor eax, eax
mov rbx, qword [rsp + 0x260]
add rsp, 0x210
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret