Function at 0x140006d00
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x280
mov edi, 0x80004005
lea rcx, [rsp + 0x30]
call fcn.1400029e0
nop
xor esi, esi
mov ebx, esi
cmp qword [rsp + 0x30], rbx
je 0x140006d8e
mov ecx, 0xd0
call fcn.14001de90
mov qword [rsp + 0x290], rax
test rax, rax
je 0x140006d51
mov rcx, rax
call fcn.1400063c0
mov rbx, rax
jmp 0x140006d54
mov rbx, rsi
test rbx, rbx
je 0x140006d8e
mov rcx, rbx
call fcn.140006820
mov edi, eax
test eax, eax
js 0x140006d8e
lfence
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
mov r9, rbx
lea r8, [0x140006f80]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.kernel32.dll_CreateThread]
mov qword [rbx + 0xb8], rax
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x40], xmm0
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x140006da5
lock inc dword [rax + 8]
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x40], xmm0
lea rcx, [rsp + 0x40]
call fcn.140002b50
test edi, edi
jns 0x140006f16
test rbx, rbx
je 0x140006f16
mov dword [rbx], 1
cmp qword [rbx + 8], 0
je 0x140006de5
lfence
mov rcx, qword [rbx + 8]
call qword [sym.imp.kernel32.dll_SetEvent]
cmp qword [rbx + 0xb8], 0
je 0x140006e06
lfence
mov rcx, qword [rbx + 0xb8]
call qword [sym.imp.kernel32.dll_CloseHandle]
mov qword [rbx + 0xb8], rsi
cmp qword [rbx + 0x28], 0
je 0x140006eb0
lfence
xor eax, eax
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x6c], eax
xor edx, edx
mov r8d, 0x1fb
lea rcx, [rsp + 0x84]
call fcn.14003cd00
mov dword [rsp + 0x50], 7
mov dword [rsp + 0x5c], esi
mov rax, qword [rbx + 8]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x68], 0x3000
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x70], rax
mov rax, qword [rbx + 0x38]
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x80], 0x1000
mov dword [rsp + 0x28], reloc.OLEAUT32.dll_SafeArrayAccessData
mov dword [rsp + 0x20], esi
xor r9d, r9d
mov r8d, 0x22f
lea rdx, [rsp + 0x50]
mov rcx, qword [rbx + 0x28]
call fcn.140002f60
mov qword [rbx + 0x18], rsi
mov qword [rbx + 0x40], rsi
cmp qword [rbx + 0x20], 0
je 0x140006eb0
lfence
mov rcx, qword [rbx + 0x20]
call fcn.140041d9c
mov qword [rbx + 0x20], rsi
cmp qword [rbx + 0x10], 0
je 0x140006ec8
lfence
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.kernel32.dll_CloseHandle]
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 8], 0
je 0x140006ee0
lfence
mov rcx, qword [rbx + 8]
call qword [sym.imp.kernel32.dll_CloseHandle]
mov qword [rbx + 8], rsi
cmp qword [rbx + 0x38], 0
je 0x140006ef8
lfence
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.kernel32.dll_CloseHandle]
mov qword [rbx + 0x38], rsi
lfence
mov rcx, rbx
call fcn.1400065f0
lfence
mov edx, 0xd0
mov rcx, rbx
call fcn.14001decc
mov rbx, rsi
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x140006f5a
mov esi, 0xffffffff
mov eax, esi
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x140006f5a
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax]
call qword [case.0x140027396.0]
lock xadd dword [rdi + 0xc], esi
cmp esi, 1
jne 0x140006f5a
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x140027396.0]
mov rax, rbx
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret