Function at 0x140036980
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x2f0
mov rax, qword [0x1400ec008]
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.14007a110
cmp r13d, 0x400
ja 0x140036a17
test r13d, r13d
jne 0x140036a1e
test ebx, ebx
je 0x140036a24
lea edx, [r13 + 1]
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SleepEx]
test eax, eax
jne 0x140036a0a
mov eax, 0x20000000
jmp 0x140036c1e
cmp eax, 0xc0
mov edi, 0x30000000
cmove esi, edi
mov eax, esi
jmp 0x140036c1e
cmp r13d, 0x40
ja 0x140036a75
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 0x140036a4d
mov eax, 0x30000000
jmp 0x140036c1e
cmp ecx, 0x102
je 0x140036a00
add eax, 0xffffff80
cmp eax, 0x3f
ja 0x140036a68
lea eax, [rcx + 0xfffff80]
jmp 0x140036c1e
cmp ecx, 0x40
cmovb esi, ecx
mov eax, esi
jmp 0x140036c1e
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 0x140036bc1
xor ebx, ebx
mov qword [rsp + 0x2e8], r12
mov r14d, ebx
test ebp, ebp
je 0x140036b2f
mov r12d, ebx
lea r15, [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x50]
mov qword [r15], rax
lea r8, [0x140036930]
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.14008ca3c
mov qword [r15 - 8], rax
test rax, rax
je 0x140036bb9
mov rax, qword [rsp + 0x38]
inc r14d
add r12d, 0x40
add r15, 0x28
cmp r14d, ebp
jb 0x140036ab2
mov r8d, dword [rsp + 0x30]
mov rcx, rax
mov edx, dword [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0xc0
jne 0x140036b4f
mov edi, 0x30000000
jmp 0x140036bb9
cmp eax, 0x102
jne 0x140036b5d
mov edi, 0x20000000
jmp 0x140036bb9
test eax, eax
jne 0x140036bb9
test ebp, ebp
je 0x140036bb9
lea rdx, [rsp + 0x60]
nop word [rax + rax]
mov eax, dword [rdx + 0x10]
cmp eax, 0xfffffffe
je 0x140036b9e
cmp eax, esi
je 0x140036bb9
cmp eax, 0xc0
je 0x140036bb9
cmp eax, 0x102
je 0x140036bb9
cmp eax, 0x80
jb 0x140036b9a
mov ecx, dword [rdx]
sub ecx, 0xffffff80
cmp eax, ecx
jb 0x140036baa
cmp eax, dword [rdx]
jb 0x140036bb2
inc ebx
add rdx, 0x28
cmp ebx, ebp
jb 0x140036b70
jmp 0x140036bb9
lea edi, [rbx + 0x3ffffe]
jmp 0x140036bb4
mov edi, ebx
shl edi, 6
add edi, eax
mov r12, qword [rsp + 0x2e8]
test ebp, ebp
je 0x140036c0c
lea rbx, [rsp + 0x50]
nop word [rax + rax]
mov rdx, qword [rbx]
test rdx, rdx
je 0x140036c02
cmp dword [rbx + 0x20], 0xfffffffe
jne 0x140036bee
xor r8d, r8d
lea rcx, [0x140036970]
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 0x140036bd0
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140036c1c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.140078840
add rsp, 0x2f0
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret