Function at 0x180018660
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rcx, qword [0x1800d8a30]
lea r8, [0x1800d89f8]
lea rdx, [0x180017490]
call fcn.180045a08
test eax, eax
je 0x18001869b
cmp eax, 3
jne 0x180018b99
mov rdi, qword [0x1800d8a30]
xor r14d, r14d
mov ebx, r14d
xor eax, eax
mov r13d, 1
lock cmpxchg dword [0x1800d9ac0], r13d
je 0x1800186e3
nop dword [rax + rax]
cmp rbx, 0x20
jae 0x1800186ca
xor ecx, ecx
jmp 0x1800186cd
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x1800d9ac0], r13d
jne 0x1800186c0
cmp qword [0x1800d9ac8], r14
je 0x180018b92
mov r12d, 5
test rdi, rdi
jne 0x180018707
mov ecx, r13d
call fcn.180045904
mov ebp, eax
jmp 0x180018734
mov ecx, dword [0x1800dae7c]
mov ebx, r14d
test ecx, ecx
je 0x18001872f
mov r8, qword [0x1800dae70]
mov rax, r8
nop
cmp rdi, qword [rax]
je 0x180018778
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x180018720
mov ebp, 4
mov eax, r14d
xchg dword [0x1800d9ac0], eax
test ebp, ebp
jne 0x180018b99
mov rdx, qword [0x1800da818]
cmp rdx, qword [0x1800da820]
mov rax, qword [0x1800d8a30]
mov qword [rsp + 0x90], rax
je 0x180018820
mov qword [rdx], rax
add qword [0x1800da818], 8
jmp 0x180018834
cmp ebx, 0xffffffff
je 0x18001872f
mov eax, ebx
imul rdx, rax, 0x38
test byte [rdx + r8 + 0x20], 2
jne 0x180018818
mov r8d, r13d
lea rcx, [rsp + 0x20]
mov edx, ebx
call fcn.18004544c
mov ebp, eax
test eax, eax
jne 0x180018734
mov edx, r13d
mov ecx, ebx
call fcn.1800457f8
mov r15, qword [rsp + 0x20]
mov ebp, eax
test r15, r15
je 0x180018734
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x180018801
mov rbx, r15
mov esi, eax
nop dword [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x1800187f8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rsi, r13
jne 0x1800187d0
mov rcx, qword [0x1800d9ac8]
mov r8, r15
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180018734
mov ebp, r12d
jmp 0x180018734
lea r8, [rsp + 0x90]
lea rcx, [0x1800da810]
call fcn.18001b4b0
mov rcx, qword [0x1800d8a28]
lea r8, [0x1800d89f0]
lea rdx, [0x180017530]
call fcn.180045a08
test eax, eax
jne 0x180018b99
mov rdi, qword [0x1800d8a28]
mov rbx, r14
lock cmpxchg dword [0x1800d9ac0], r13d
je 0x180018893
nop dword [rax + rax]
cmp rbx, 0x20
jae 0x18001887a
xor ecx, ecx
jmp 0x18001887d
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x1800d9ac0], r13d
jne 0x180018870
cmp qword [0x1800d9ac8], r14
je 0x180018b92
test rdi, rdi
jne 0x1800188b1
mov ecx, r13d
call fcn.180045904
mov ebp, eax
jmp 0x1800188dc
mov ecx, dword [0x1800dae7c]
mov ebx, r14d
test ecx, ecx
je 0x1800188d7
mov r8, qword [0x1800dae70]
mov rax, r8
cmp rdi, qword [rax]
je 0x180018920
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x1800188c8
mov ebp, 4
mov eax, r14d
xchg dword [0x1800d9ac0], eax
test ebp, ebp
jne 0x180018b99
mov rdx, qword [0x1800da818]
cmp rdx, qword [0x1800da820]
mov rax, qword [0x1800d8a28]
mov qword [rsp + 0x98], rax
je 0x1800189d0
mov qword [rdx], rax
add qword [0x1800da818], 8
jmp 0x1800189e4
cmp ebx, 0xffffffff
je 0x1800188d7
mov eax, ebx
imul rdx, rax, 0x38
test byte [rdx + r8 + 0x20], 2
jne 0x1800189c8
mov r8d, r13d
lea rcx, [rsp + 0x30]
mov edx, ebx
call fcn.18004544c
mov ebp, eax
test eax, eax
jne 0x1800188dc
mov edx, r13d
mov ecx, ebx
call fcn.1800457f8
mov r15, qword [rsp + 0x30]
mov ebp, eax
test r15, r15
je 0x1800188dc
mov eax, dword [rsp + 0x3c]
test eax, eax
je 0x1800189b1
mov rbx, r15
mov esi, eax
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [rbx]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x1800189a8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rbx, 4
sub rsi, r13
jne 0x180018980
mov rcx, qword [0x1800d9ac8]
mov r8, r15
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1800188dc
mov ebp, r12d
jmp 0x1800188dc
lea r8, [rsp + 0x98]
lea rcx, [0x1800da810]
call fcn.18001b4b0
mov rcx, qword [0x1800d8a20]
lea r8, [0x1800d89e8]
lea rdx, [0x1800177e0]
call fcn.180045a08
test eax, eax
jne 0x180018b99
mov rdi, qword [0x1800d8a20]
mov rbx, r14
lock cmpxchg dword [0x1800d9ac0], r13d
je 0x180018a43
nop dword [rax + rax]
cmp rbx, 0x20
jae 0x180018a2a
xor ecx, ecx
jmp 0x180018a2d
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x1800d9ac0], r13d
jne 0x180018a20
cmp qword [0x1800d9ac8], r14
je 0x180018b92
test rdi, rdi
jne 0x180018a62
mov ecx, r13d
call fcn.180045904
mov r12d, eax
jmp 0x180018a95
mov ecx, dword [0x1800dae7c]
mov ebx, r14d
test ecx, ecx
je 0x180018a8f
mov r8, qword [0x1800dae70]
mov rax, r8
nop dword [rax]
cmp rdi, qword [rax]
je 0x180018adc
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x180018a80
mov r12d, 4
xchg dword [0x1800d9ac0], r14d
test r12d, r12d
jne 0x180018b99
mov rdx, qword [0x1800da818]
cmp rdx, qword [0x1800da820]
mov rax, qword [0x1800d8a20]
mov qword [rsp + 0xa0], rax
je 0x180018b78
mov qword [rdx], rax
movzx eax, r13b
add qword [0x1800da818], 8
jmp 0x180018b9b
cmp ebx, 0xffffffff
je 0x180018a8f
mov eax, ebx
imul rdx, rax, 0x38
test byte [rdx + r8 + 0x20], 2
jne 0x180018a95
mov r8d, r13d
lea rcx, [rsp + 0x40]
mov edx, ebx
call fcn.18004544c
mov r12d, eax
test eax, eax
jne 0x180018a95
mov edx, r13d
mov ecx, ebx
call fcn.1800457f8
mov rbp, qword [rsp + 0x40]
mov r12d, eax
test rbp, rbp
je 0x180018a95
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x180018b61
mov rdi, rbp
mov esi, eax
nop dword [rax]
mov r8d, dword [rdi]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rbx, rax
test rax, rax
je 0x180018b58
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rdi, 4
sub rsi, r13
jne 0x180018b30
mov rcx, qword [0x1800d9ac8]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x180018a95
lea r8, [rsp + 0xa0]
lea rcx, [0x1800da810]
call fcn.18001b4b0
movzx eax, r13b
jmp 0x180018b9b
xchg dword [0x1800d9ac0], r14d
xor al, al
mov rbx, qword [rsp + 0xa8]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret