Function at 0x140016720
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x18], r8d
push rdi
push r14
push r15
sub rsp, 0x50
xor r9d, r9d
mov rsi, rdx
mov rbp, rcx
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi + 8], rax
mov rbx, rax
movabs r15, 0x4d54ee85da812030
test rax, rax
jne 0x1400167de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
lea edx, [rbx + 1]
mov rcx, rsi
mov edi, eax
call qword [r8]
call fcn.140013d50
mov r14, rax
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov rcx, qword [r14 + 8]
add rcx, r15
cmp rcx, 1
jbe 0x1400167ae
mov r8, qword [r14]
mov edx, edi
mov rcx, r14
call qword [r8 + 0x30]
jmp 0x1400167b3
test edi, edi
setne al
movzx eax, al
add rax, 2
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
test al, 1
je 0x1400167de
cmp rax, 1
jne 0x14001696c
test edi, edi
jne 0x14001696c
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], 0
jne 0x140016874
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
mov edi, eax
call qword [r8]
call fcn.140013d50
mov r14, rax
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov rcx, qword [r14 + 8]
add rcx, r15
cmp rcx, 1
jbe 0x140016844
mov r8, qword [r14]
mov edx, edi
mov rcx, r14
call qword [r8 + 0x30]
jmp 0x140016849
test edi, edi
setne al
movzx eax, al
add rax, 2
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
test al, 1
je 0x140016874
cmp rax, 1
jne 0x14001697e
test edi, edi
jne 0x14001697e
xor ecx, ecx
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
lea r8, [0x1400169b0]
mov r9, rsi
mov dword [rsp + 0x20], ecx
xor edx, edx
mov dword [rsp + 0x80], ecx
call fcn.1400798a4
mov qword [rbp + 8], rax
test rax, rax
jne 0x140016936
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
mov edi, eax
call qword [r8]
test rbx, rbx
je 0x1400168d0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x1400168df
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.140013d50
mov rsi, rax
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov rcx, qword [rsi + 8]
add rcx, r15
cmp rcx, 1
jbe 0x14001690e
mov r8, qword [rsi]
mov edx, edi
mov rcx, rsi
call qword [r8 + 0x30]
jmp 0x140016913
test edi, edi
setne al
movzx eax, al
add rax, 2
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rsi
test al, 1
je 0x140016936
cmp rax, 1
jne 0x140016990
test edi, edi
jne 0x140016990
test rbx, rbx
je 0x140016950
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x88]
add rsp, 0x50
pop r15
pop r14
pop rdi
ret
lea rdx, str.thread.entry_event
lea rcx, [rsp + 0x30]
call fcn.140015b30
int3
lea rdx, str.thread.exit_event
lea rcx, [rsp + 0x30]
call fcn.140015b30
int3
lea rdx, str.thread
lea rcx, [rsp + 0x30]
call fcn.140015b30
int3