Function at 0x140086190
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov qword [rsp + 0x90], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rbx, r9
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call fcn.14013d07c
mov rcx, rax
xor r15d, r15d
mov eax, r15d
test rcx, rcx
setne al
test eax, eax
jne 0x1400861ee
mov ecx, 0x80004005
call fcn.140001c00
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp + 0x818], rax
mov qword [rbp + 0x808], rsi
mov dword [rbp + 0x800], edi
mov qword [rbp + 0x810], r15
mov dword [rbp + 0x820], r15d
mov eax, dword [rsp + 0x100]
mov dword [rbp + 0x824], eax
or r14, 0xffffffffffffffff
test rbx, rbx
je 0x14008645a
xor eax, eax
mov rcx, r14
lea rdi, [0x14019cf88]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [0x14019cf88]
lea rcx, [rbp + 0x818]
call fcn.140002390
xor eax, eax
mov rcx, r14
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r15, [rcx - 1]
mov rax, qword [rbp + 0x818]
mov rsi, rbx
sub rsi, rax
sar rsi, 1
mov r12d, dword [rax - 0x10]
lea edi, [r12 + rcx - 1]
mov edx, 1
sub edx, dword [rax - 8]
mov eax, dword [rax - 0xc]
sub eax, edi
or eax, edx
jge 0x1400862a7
mov edx, edi
lea rcx, [rbp + 0x818]
call fcn.140001df0
mov rax, qword [rbp + 0x818]
cmp rsi, r12
ja 0x1400862b7
lea rbx, [rax + rsi*2]
movsxd rdx, r15d
add rdx, rdx
lea rcx, [rax + r12*2]
mov r9, rdx
mov r8, rbx
call fcn.14015cd30
test edi, edi
js 0x14008644f
mov rax, qword [rbp + 0x818]
cmp edi, dword [rax - 0xc]
jg 0x14008644f
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbp + 0x818]
mov word [rax + rcx*2], 0
mov rbx, rbp
mov esi, 0x5c00
xor r15d, r15d
mov qword [rbx + 8], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx], rax
test rax, rax
je 0x1400863ed
lea rcx, [rsp + 0x80]
mov qword [rcx], rax
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
mov qword [rsp + 0x50], r15
xor eax, eax
mov qword [rsp + 0x58], rax
mov edi, esi
or edi, 0x220000
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rax + 3]
mov rcx, qword [rbp + 0x818]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x140086384
mov qword [rsp + 0x50], r15
jmp 0x1400863d9
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x10
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x10
lea r8, [rsp + 0x80]
mov edx, edi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, qword [rsp + 0x50]
test edi, edi
cmove rdx, r15
mov qword [rsp + 0x50], rdx
lea rcx, [rsp + 0x50]
mov rax, qword [rcx]
mov qword [rbx + 0x10], rax
mov rax, qword [rcx + 8]
mov qword [rbx + 0x18], rax
add esi, 0xc
add rbx, 0x20
cmp esi, 0x5ef4
jl 0x140086302
mov qword [rbp + 0x7e8], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp + 0x7e0], rax
test rax, rax
je 0x14008645a
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
mov r9, rbp
lea r8, [0x1400868c0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbp + 0x810], rax
jmp 0x14008645a
mov ecx, 0x80070057
call fcn.140001c00
int3
cmp dword [0x14022ea2c], 0
jne 0x140086563
mov rdi, qword [rbp + 0x818]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], 0
jl 0x140086492
cmp rax, qword [rdi - 0x18]
jne 0x140086492
lea rbx, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x1400864d0
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x1400864ae
call fcn.1400c5210
int3
mov eax, dword [rdi - 0x10]
mov dword [rbx + 8], eax
mov eax, dword [rdi - 0x10]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.14015cd30
lea rcx, [rbx + 0x18]
mov qword [rsp + 0x60], rcx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x48], r15d
lea rdx, [rsp + 0xa0]
mov rax, qword [0x1401ac380]
mov qword [rdx], rax
mov rax, qword [0x1401ac388]
mov qword [rdx + 8], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8d, [r9 + 0x38]
lea rdx, [rsp + 0xa0]
call fcn.14008b3c0
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
add r14d, 0xffffffff
test r14d, r14d
jg 0x140086563
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rax, rbp
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret