Function at 0x140084050
Capabilities:
Create thread
Resume thread
Terminate process

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x48
mov r13d, 1
lea rdi, [rsp + 0x30]
mov ebx, r13d
lea r14, [rcx + 0x38]
mov esi, edx
mov rbp, rcx
xor eax, eax
lock cmpxchg byte [r14], r13b
je 0x1400840aa
nop dword [rax]
cmp ebx, 0x10
jg 0x14008409b
movsxd rax, ebx
test ebx, ebx
je 0x140084097
nop dword [rax]
pause
sub rax, r13
jne 0x140084090
add ebx, ebx
jmp 0x1400840a1
call qword [sym.imp.KERNEL32.dll_SwitchToThread]
xor eax, eax
lock cmpxchg byte [r14], r13b
jne 0x140084080
mov rax, qword [rbp + 0x30]
nop
test rax, rax
je 0x14008410f
lea rdx, [rbp + 0x20]
nop dword [rax + rax]
lea rax, [rsp + 0x40]
cmp rdi, rax
jae 0x14008410f
test esi, esi
jle 0x1400840e0
mov eax, dword [rdx]
nop
add eax, esi
test eax, eax
jle 0x140084113
dec esi
lea rdx, [rbp + 0x20]
jmp 0x1400840f0
mov eax, dword [rdx]
nop
test eax, eax
jle 0x140084117
lea ecx, [rax - 1]
lock cmpxchg dword [rdx], ecx
jne 0x1400840e0
mov rax, qword [rbp + 0x30]
nop
mov qword [rdi], rax
add rdi, 8
mov rax, qword [rax + 0x40]
nop
mov qword [rbp + 0x30], rax
mov rax, qword [rbp + 0x30]
nop
test rax, rax
jne 0x1400840c0
test esi, esi
je 0x140084117
lock add dword [rbp + 0x20], esi
test r14, r14
je 0x140084121
nop
mov byte [r14], 0
lea rax, [rsp + 0x30]
cmp rdi, rax
jbe 0x140084269
mov qword [rsp + 0x88], r12
mov qword [rsp + 0x40], r15
xor r15d, r15d
lea r12d, [r15 + 2]
nop dword [rax]
nop word [rax + rax]
mov rbx, qword [rdi - 8]
sub rdi, 8
mov qword [rbx + 0x40], r15
mov eax, dword [rbx]
nop
test eax, eax
jne 0x14008422d
lock cmpxchg dword [rbx], r13d
jne 0x14008422d
mov rax, qword [rbx + 8]
lea r14, [rbx + 0x18]
mov rbp, qword [rax + 0x18]
test r14, r14
je 0x14008418c
call fcn.1400826a0
mov esi, eax
jmp 0x14008418f
mov esi, r15d
mov eax, r15d
lea r8, [0x140083ff0]
mov ecx, 4
cmp esi, r13d
mov r9, rbx
mov edx, ebp
cmovg eax, ecx
lea rcx, [rsp + 0x90]
mov qword [rsp + 0x28], rcx
bts eax, 0x10
xor ecx, ecx
mov dword [rsp + 0x20], eax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov rbp, rax
test rax, rax
je 0x140084276
cmp esi, r13d
jle 0x1400841f2
mov ecx, dword [r14]
call fcn.140082570
mov edx, eax
mov rcx, rbp
call fcn.140082650
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov qword [rbx + 0x38], rbp
mov eax, r13d
lock cmpxchg dword [rbx], r12d
je 0x14008424e
mov rcx, qword [rbx + 0x10]
call fcn.140081260
mov rbx, qword [rbx + 0x38]
mov rcx, rbx
test al, al
je 0x140084225
xor r8d, r8d
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14008424e
mov rax, qword [rbx + 0x20]
nop
inc rax
nop
mov qword [rbx + 0x20], rax
mov eax, r15d
xchg byte [rbx + 0x28], al
test al, al
je 0x14008424e
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rax, [rsp + 0x30]
cmp rdi, rax
ja 0x140084150
mov r12, qword [rsp + 0x88]
mov r15, qword [rsp + 0x40]
add rsp, 0x48
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.thread_monitor::launch:__beginthreadex_failed_n
call fcn.14007b5b0
mov ecx, r13d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3