Function at 0x140040ed0
Capabilities:
Create thread
Terminate thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov rdi, rcx
cmp qword [rcx + 0x48], 0
je 0x1400410db
test edx, edx
jne 0x140040f11
mov rcx, qword [rcx + 0x30]
call fcn.1400400a0
mov rcx, qword [rdi + 0x48]
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14003f540
mov rax, qword [rcx + 0x30]
mov rcx, qword [rax + 0x10]
xor r12d, r12d
mov eax, r12d
xchg dword [rcx + 0x34], eax
lea ecx, [r12 + 0x18]
call fcn.140229738
mov r14, rax
mov qword [rsp + 0xb0], rax
mov rbx, qword [rdi + 0x30]
mov qword [rax + 8], r12
mov qword [rax + 0x10], r12
lea ecx, [r12 + 0x20]
call fcn.140229738
mov rsi, rax
mov qword [rsp + 0xb8], rax
lea rax, vtable.boost::asio::detail::win_thread::func_class_boost::asio::detail::resolver_service_base::work_io_service_runner_.0
mov qword [rsi], rax
mov qword [rsi + 0x18], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [r12 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbp, rax
mov qword [rsi + 8], rax
lea r15, [fcn.140029a90]
test rax, rax
jne 0x140040fc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rsi]
lea edx, [rbp + 1]
mov rcx, rsi
call qword [r8]
call fcn.1400f7cd0
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x38], rax
mov rcx, r15
test ebx, ebx
cmove rcx, r12
test rcx, rcx
jne 0x1400410fc
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [r14 + 0x10], rax
mov qword [rsi + 0x10], rax
cmp qword [r14 + 0x10], 0
jne 0x140041017
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.1400f7cd0
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x48], rax
mov rcx, r15
test ebx, ebx
cmove rcx, r12
test rcx, rcx
jne 0x14004110e
mov dword [rsp + 0xa0], r12d
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r12d
mov r9, rsi
lea r8, [0x14003f5d0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [r14 + 8], rax
test rax, rax
jne 0x14004109a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rsi]
mov edx, 1
mov rcx, rsi
call qword [r8]
test rbp, rbp
je 0x140041072
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x140041081
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1400f7cd0
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x58], rax
test ebx, ebx
cmove r15, r12
test r15, r15
jne 0x1400410ea
test rbp, rbp
je 0x1400410b7
mov edx, 0xffffffff
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rbx, qword [rdi + 0x48]
test rbx, rbx
je 0x1400410d7
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x18
mov rcx, rbx
call fcn.140229774
mov qword [rdi + 0x48], r14
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rdx, str.thread
lea rcx, [rsp + 0x50]
call fcn.14002b060
int3
lea rdx, str.thread.entry_event
lea rcx, [rsp + 0x30]
call fcn.14002b060
int3
lea rdx, str.thread.exit_event
lea rcx, [rsp + 0x40]
call fcn.14002b060
int3
add rcx, 0x28
jmp 0x140040ed0