Function at 0x140005cc0
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x2f0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
lea ebp, [rcx - 1]
mov dword [rsp + 0x34], r8d
mov ebx, r9d
mov qword [rsp + 0x40], rdx
mov r14d, r8d
shr ebp, 6
mov r15, rdx
mov dword [rsp + 0x30], ebx
mov r13d, ecx
or esi, 0xffffffff
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x280
inc ebp
mov edi, esi
call fcn.14001a770
cmp r13d, 0x400
ja 0x140005d57
test r13d, r13d
jne 0x140005d5e
test ebx, ebx
je 0x140005d64
lea edx, [r13 + 1]
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SleepEx]
test eax, eax
jne 0x140005d4a
mov eax, 0x20000000
jmp 0x140005f5e
cmp eax, 0xc0
mov edi, 0x30000000
cmove esi, edi
mov eax, esi
jmp 0x140005f5e
cmp r13d, 0x40
ja 0x140005db5
mov r9d, r14d
mov dword [rsp + 0x20], ebx
xor r8d, r8d
mov rdx, r15
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
mov ecx, eax
cmp eax, 0xc0
jne 0x140005d8d
mov eax, 0x30000000
jmp 0x140005f5e
cmp ecx, 0x102
je 0x140005d40
add eax, 0xffffff80
cmp eax, 0x3f
ja 0x140005da8
lea eax, [rcx + 0xfffff80]
jmp 0x140005f5e
cmp ecx, 0x40
cmovb esi, ecx
mov eax, esi
jmp 0x140005f5e
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140005f01
xor ebx, ebx
mov qword [rsp + 0x2e8], r12
mov r14d, ebx
test ebp, ebp
je 0x140005e6f
mov r12d, ebx
lea r15, [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x50]
mov qword [r15], rax
lea r8, [0x140005c70]
movsxd rax, r12d
mov edx, 0x800
mov qword [rsp + 0x28], rbx
mov dword [r15 + 0x18], 0xfffffffe
mov dword [rsp + 0x20], ebx
lea rcx, [rcx + rax*8]
mov eax, 0x40
mov qword [r15 + 0x10], rcx
mov ecx, r13d
sub ecx, r12d
cmp ecx, eax
cmovb eax, ecx
mov dword [r15 + 8], eax
mov eax, r14d
lea rcx, [rax + rax*4]
lea r9, [r9 + rcx*8]
xor ecx, ecx
call fcn.140022a8c
mov qword [r15 - 8], rax
test rax, rax
je 0x140005ef9
mov rax, qword [rsp + 0x38]
inc r14d
add r12d, 0x40
add r15, 0x28
cmp r14d, ebp
jb 0x140005df2
mov r8d, dword [rsp + 0x30]
mov rcx, rax
mov edx, dword [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0xc0
jne 0x140005e8f
mov edi, 0x30000000
jmp 0x140005ef9
cmp eax, 0x102
jne 0x140005e9d
mov edi, 0x20000000
jmp 0x140005ef9
test eax, eax
jne 0x140005ef9
test ebp, ebp
je 0x140005ef9
lea rdx, [rsp + 0x60]
nop word [rax + rax]
mov eax, dword [rdx + 0x10]
cmp eax, 0xfffffffe
je 0x140005ede
cmp eax, esi
je 0x140005ef9
cmp eax, 0xc0
je 0x140005ef9
cmp eax, 0x102
je 0x140005ef9
cmp eax, 0x80
jb 0x140005eda
mov ecx, dword [rdx]
sub ecx, 0xffffff80
cmp eax, ecx
jb 0x140005eea
cmp eax, dword [rdx]
jb 0x140005ef2
inc ebx
add rdx, 0x28
cmp ebx, ebp
jb 0x140005eb0
jmp 0x140005ef9
lea edi, [rbx + 0x3ffffe]
jmp 0x140005ef4
mov edi, ebx
shl edi, 6
add edi, eax
mov r12, qword [rsp + 0x2e8]
test ebp, ebp
je 0x140005f4c
lea rbx, [rsp + 0x50]
nop word [rax + rax]
mov rdx, qword [rbx]
test rdx, rdx
je 0x140005f42
cmp dword [rbx + 0x20], 0xfffffffe
jne 0x140005f2e
xor r8d, r8d
lea rcx, [0x140005cb0]
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, qword [rbx]
mov edx, esi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 0x28
sub rbp, 1
jne 0x140005f10
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140005f5c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.140018df0
add rsp, 0x2f0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret