Function at 0x1800129a0
Capabilities:
Resume thread
Suspend thread

Disassembly:
mov r11, rsp
push r14
sub rsp, 0x540
mov rax, qword [0x180054010]
xor rax, rsp
mov qword [rsp + 0x510], rax
mov qword [r11 + 0x18], rsi
xor r14d, r14d
mov qword [r11 - 0x18], r12
mov rsi, rcx
mov qword [r11 - 0x20], r13
mov qword [r11 - 0x28], r15
mov r15d, edx
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea edx, [r14 + 0xf]
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea ecx, [r14 + 4]
call qword [0x18007fe20]
mov r13, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x180012c1c
mov qword [rsp + 0x550], rbx
lea rdx, [rsp + 0x20]
mov rcx, r13
mov ebx, r14d
mov dword [rsp + 0x20], 0x1c
call qword [0x18007fe18]
test eax, eax
je 0x180012c0b
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x180012a61
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x180012a61
inc ebx
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, r13
call qword [0x18007fe28]
test eax, eax
jne 0x180012a47
test ebx, ebx
je 0x180012c0b
shl rbx, 3
mov rcx, rbx
call fcn.18002e120
mov qword [0x18007fe78], rax
test rax, rax
je 0x180012c0b
mov r8, rbx
mov qword [rsp + 0x558], rbp
xor edx, edx
mov rcx, rax
call fcn.180025090
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, r13
mov ebp, r14d
call qword [0x18007fe18]
test eax, eax
je 0x180012bf7
mov qword [rsp + 0x538], rdi
nop dword [rax]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x180012bd1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r8d, dword [rsp + 0x28]
cmp r8d, eax
je 0x180012bd1
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x180012bb7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov rcx, rbx
cmp eax, 0xffffffff
je 0x180012c75
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x70], 0x100001
mov edi, r14d
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x180012bb7
mov rcx, qword [rsp + 0x138]
cmp rcx, rsi
jb 0x180012bb7
lea rax, [rsi + r15]
cmp rcx, rax
jae 0x180012bb7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp edi, 3
jge 0x180012bab
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rdx, [rsp + 0x40]
mov rcx, rbx
inc edi
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x180012b50
mov rax, qword [0x18007fe78]
mov ecx, ebp
mov qword [rax + rcx*8], rbx
jmp 0x180012bcf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, r14
mov rax, qword [0x18007fe78]
mov ecx, ebp
mov qword [rax + rcx*8], rbx
cmp rbx, 0xffffffffffffffff
je 0x180012bd1
test rbx, rbx
je 0x180012bd1
inc ebp
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, r13
call qword [0x18007fe28]
test eax, eax
jne 0x180012ae0
mov rdi, qword [rsp + 0x538]
mov dword [0x18007fe40], ebp
mov r14d, 1
mov rbp, qword [rsp + 0x558]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x550]
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov r15, qword [rsp + 0x520]
mov r13, qword [rsp + 0x528]
mov r12, qword [rsp + 0x530]
mov rsi, qword [rsp + 0x560]
test r14d, r14d
jne 0x180012c58
call int.1800128e0
mov eax, r14d
mov rcx, qword [rsp + 0x510]
xor rcx, rsp
call fcn.1800231a0
add rsp, 0x540
pop r14
ret
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x18007fe78]
mov ecx, ebp
mov qword [rax + rcx*8], r14
jmp 0x180012bd1