Function at 0x140018970
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
xor r9d, r9d
mov r14d, r8d
mov rsi, rdx
mov rbp, rcx
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r12d, r12d
mov qword [rsi + 8], rax
lea r15, [0x14024a328]
mov rdi, rax
movabs r13, 0x4d54ee85da812030
test rax, rax
jne 0x140018a35
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
lea edx, [rdi + 1]
mov rcx, rsi
mov ebx, eax
call qword [r8]
mov rdx, qword [0x14024a330]
add rdx, r13
mov dword [rsp + 0x34], r12d
cmp rdx, 1
jbe 0x140018a05
mov rcx, qword [0x14024a328]
mov edx, ebx
mov r8, qword [rcx + 0x30]
mov rcx, r15
call r8
jmp 0x140018a0a
test ebx, ebx
setne al
movzx eax, al
add rax, 2
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
test al, 1
je 0x140018a35
cmp rax, 1
jne 0x140018bcd
test ebx, ebx
jne 0x140018bcd
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp + 0x10], rax
mov qword [rsi + 0x10], rax
cmp qword [rbp + 0x10], r12
jne 0x140018ac5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
mov ebx, eax
call qword [r8]
mov rdx, qword [0x14024a330]
add rdx, r13
mov dword [rsp + 0x34], r12d
cmp rdx, 1
jbe 0x140018a95
mov rcx, qword [0x14024a328]
mov edx, ebx
mov r8, qword [rcx + 0x30]
mov rcx, r15
call r8
jmp 0x140018a9a
test ebx, ebx
setne al
movzx eax, al
add rax, 2
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
test al, 1
je 0x140018ac5
cmp rax, 1
jne 0x140018bdf
test ebx, ebx
jne 0x140018bdf
lea rax, [rsp + 0x88]
mov dword [rsp + 0x88], r12d
mov qword [rsp + 0x28], rax
lea r8, [0x140018c00]
mov r9, rsi
mov dword [rsp + 0x20], r12d
mov edx, r14d
xor ecx, ecx
call fcn.1401657f4
mov qword [rbp + 8], rax
test rax, rax
jne 0x140018b81
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
mov ebx, eax
call qword [r8]
test rdi, rdi
je 0x140018b24
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x140018b33
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14024a330]
add rcx, r13
mov dword [rsp + 0x34], r12d
cmp rcx, 1
jbe 0x140018b59
mov rax, qword [0x14024a328]
mov edx, ebx
mov rcx, r15
call qword [rax + 0x30]
jmp 0x140018b5e
test ebx, ebx
setne al
movzx eax, al
add rax, 2
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
test al, 1
je 0x140018b81
cmp rax, 1
jne 0x140018bbb
test ebx, ebx
jne 0x140018bbb
test rdi, rdi
je 0x140018b9d
mov edx, 0xffffffff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
lea rdx, str.thread
lea rcx, [rsp + 0x30]
call fcn.1400182d0
int3
lea rdx, str.thread.entry_event
lea rcx, [rsp + 0x30]
call fcn.1400182d0
int3
lea rdx, str.thread.exit_event
lea rcx, [rsp + 0x30]
call fcn.1400182d0
int3