Function at 0x140005190
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.140017e30
cmp r13d, 0x400
ja 0x140005227
test r13d, r13d
jne 0x14000522e
test ebx, ebx
je 0x140005234
lea edx, [r13 + 1]
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SleepEx]
test eax, eax
jne 0x14000521a
mov eax, 0x20000000
jmp 0x14000542e
cmp eax, 0xc0
mov edi, 0x30000000
cmove esi, edi
mov eax, esi
jmp 0x14000542e
cmp r13d, 0x40
ja 0x140005285
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 0x14000525d
mov eax, 0x30000000
jmp 0x14000542e
cmp ecx, 0x102
je 0x140005210
add eax, 0xffffff80
cmp eax, 0x3f
ja 0x140005278
lea eax, [rcx + 0xfffff80]
jmp 0x14000542e
cmp ecx, 0x40
cmovb esi, ecx
mov eax, esi
jmp 0x14000542e
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 0x1400053d1
xor ebx, ebx
mov qword [rsp + 0x2e8], r12
mov r14d, ebx
test ebp, ebp
je 0x14000533f
mov r12d, ebx
lea r15, [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x50]
mov qword [r15], rax
lea r8, [0x140005140]
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.14002040c
mov qword [r15 - 8], rax
test rax, rax
je 0x1400053c9
mov rax, qword [rsp + 0x38]
inc r14d
add r12d, 0x40
add r15, 0x28
cmp r14d, ebp
jb 0x1400052c2
mov r8d, dword [rsp + 0x30]
mov rcx, rax
mov edx, dword [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0xc0
jne 0x14000535f
mov edi, 0x30000000
jmp 0x1400053c9
cmp eax, 0x102
jne 0x14000536d
mov edi, 0x20000000
jmp 0x1400053c9
test eax, eax
jne 0x1400053c9
test ebp, ebp
je 0x1400053c9
lea rdx, [rsp + 0x60]
nop word [rax + rax]
mov eax, dword [rdx + 0x10]
cmp eax, 0xfffffffe
je 0x1400053ae
cmp eax, esi
je 0x1400053c9
cmp eax, 0xc0
je 0x1400053c9
cmp eax, 0x102
je 0x1400053c9
cmp eax, 0x80
jb 0x1400053aa
mov ecx, dword [rdx]
sub ecx, 0xffffff80
cmp eax, ecx
jb 0x1400053ba
cmp eax, dword [rdx]
jb 0x1400053c2
inc ebx
add rdx, 0x28
cmp ebx, ebp
jb 0x140005380
jmp 0x1400053c9
lea edi, [rbx + 0x3ffffe]
jmp 0x1400053c4
mov edi, ebx
shl edi, 6
add edi, eax
mov r12, qword [rsp + 0x2e8]
test ebp, ebp
je 0x14000541c
lea rbx, [rsp + 0x50]
nop word [rax + rax]
mov rdx, qword [rbx]
test rdx, rdx
je 0x140005412
cmp dword [rbx + 0x20], 0xfffffffe
jne 0x1400053fe
xor r8d, r8d
lea rcx, [0x140005180]
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 0x1400053e0
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14000542c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.1400164b0
add rsp, 0x2f0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret