Function at 0x180023380
Capabilities:
Resume thread
Suspend thread

Disassembly:
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x510
mov rax, qword [0x1800a8040]
xor rax, rsp
mov qword [rsp + 0x500], rax
mov r13, r8
mov r15, rcx
xor esi, esi
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov edi, eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea edx, [rsi + 0xf]
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r12d, eax
mov eax, dword [r13 + 4]
test eax, eax
lea ecx, [rax - 1]
cmove ecx, esi
test ecx, ecx
je 0x1800235ca
mov qword [rsp + 0x540], rbx
mov eax, 8
mov ebx, ecx
mov rcx, 0xffffffffffffffff
mul rbx
cmovo rax, rcx
mov rcx, rax
call fcn.180064330
mov qword [0x1800d7de8], rax
test rax, rax
je 0x1800235bd
mov qword [rsp + 0x548], rbp
lea r8, [rbx*8]
xor edx, edx
mov qword [rsp + 0x558], r14
mov rcx, rax
call fcn.18007afa0
mov ebp, esi
mov r14d, esi
cmp dword [r13 + 4], esi
jbe 0x18002358b
nop word [rax + rax]
mov eax, r14d
lea rcx, [rax + rax*4]
add rcx, rcx
mov r8d, dword [r13 + rcx*8 + 0x130]
cmp r8d, r12d
je 0x18002357a
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x180023560
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov rcx, rbx
cmp eax, 0xffffffff
je 0x1800235a8
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x60], 0x100001
mov edi, esi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x180023560
nop word [rax + rax]
mov r9, qword [rsp + 0x128]
mov r8, rsi
mov rax, r15
nop
mov rdx, qword [rax]
cmp r9, rdx
jb 0x1800234f3
mov ecx, dword [rax + 0x10]
add rcx, rdx
cmp r9, rcx
jb 0x18002350f
inc r8
sub rax, 0xffffffffffffff80
cmp r8, 1
jl 0x1800234e0
mov rax, qword [0x1800d7de8]
mov ecx, ebp
mov qword [rax + rcx*8], rbx
jmp 0x180023578
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 3
jge 0x180023554
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rdx, [rsp + 0x30]
mov rcx, rbx
inc edi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x1800234d0
mov rax, qword [0x1800d7de8]
mov ecx, ebp
mov qword [rax + rcx*8], rbx
jmp 0x180023578
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, rsi
mov rax, qword [0x1800d7de8]
mov ecx, ebp
mov qword [rax + rcx*8], rbx
cmp rbx, 0xffffffffffffffff
je 0x18002357a
test rbx, rbx
je 0x18002357a
inc ebp
inc r14d
cmp r14d, dword [r13 + 4]
jb 0x180023460
mov edi, dword [rsp + 0x20]
mov r14, qword [rsp + 0x558]
mov esi, 1
mov dword [0x1800d7db4], ebp
mov rbp, qword [rsp + 0x548]
jmp 0x1800235c2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x1800d7de8]
mov ecx, ebp
mov qword [rax + rcx*8], rsi
jmp 0x18002357a
call fcn.1800232c0
mov rbx, qword [rsp + 0x540]
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, esi
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.18002b710
add rsp, 0x510
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret