Function at 0x140020f50
Capabilities:
Create thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov r12d, r8d
mov rsi, rdx
mov r14, rcx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rdi, rax
mov qword [rsi + 8], rax
test rax, rax
jne 0x140021036
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rsi]
lea edx, [rdi + 1]
mov rcx, rsi
call qword [r8]
call fcn.140070830
mov r15, rax
mov dword [rsp + 0x40], ebx
test ebx, ebx
je 0x140021036
lea rax, str.thread.entry_event
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x60]
call fcn.1400887d0
lea rcx, vtable.boost::system::system_error.0
mov qword [rsp + 0x60], rcx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x60], shutdown
xor r15d, r15d
mov qword [rbp - 0x68], r15
mov byte [rbp - 0x78], r15b
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x40]
call fcn.140004530
nop
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.140004580
lea rdx, [0x140107820]
lea rcx, [rbp - 0x50]
call fcn.1400905b8
nop
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [r14 + 0x10], rax
mov qword [rsi + 0x10], rax
cmp qword [r14 + 0x10], 0
jne 0x1400210f5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
call qword [r8]
call fcn.140070830
mov r15, rax
mov dword [rsp + 0x40], ebx
test ebx, ebx
je 0x1400210f5
lea rax, str.thread.exit_event
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x60]
call fcn.1400887d0
lea rcx, vtable.boost::system::system_error.0
mov qword [rsp + 0x60], rcx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x60], shutdown
xor r15d, r15d
mov qword [rbp - 0x68], r15
mov byte [rbp - 0x78], r15b
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x40]
call fcn.140004530
nop
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.140004580
lea rdx, [0x140107820]
lea rcx, [rbp - 0x50]
call fcn.1400905b8
nop
xor r15d, r15d
mov dword [rsp + 0x38], r15d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
mov r9, rsi
lea r8, [0x140021210]
mov edx, r12d
xor ecx, ecx
call fcn.14008d6dc
mov qword [r14 + 8], rax
test rax, rax
jne 0x1400211e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rsi]
lea edx, [r15 + 1]
mov rcx, rsi
call qword [r8]
test rdi, rdi
je 0x140021150
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x14002115f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.140070830
mov rsi, rax
mov dword [rsp + 0x40], ebx
test ebx, ebx
je 0x1400211e0
lea rax, str.thread
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x60]
call fcn.1400887d0
lea rcx, vtable.boost::system::system_error.0
mov qword [rsp + 0x60], rcx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x60], shutdown
mov qword [rbp - 0x68], r15
mov byte [rbp - 0x78], r15b
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x40]
call fcn.140004530
nop
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.140004580
lea rdx, [0x140107820]
lea rcx, [rbp - 0x50]
call fcn.1400905b8
nop
test rdi, rdi
je 0x1400211fa
or edx, 0xffffffff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x1b0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret