Function at 0x1400153f0
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rbx, r9
mov rdi, rdx
mov rbp, rcx
call fcn.1400472fc
mov rcx, rax
xor r15d, r15d
mov eax, r15d
test rcx, rcx
setne al
test eax, eax
jne 0x140015445
mov ecx, 0x80004005
call fcn.140010c90
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp + 0x698], rax
mov qword [rbp + 0x688], rdi
mov dword [rbp + 0x680], 0x8002
mov qword [rbp + 0x690], r15
test rbx, rbx
je 0x1400156a8
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x1400a5bd0]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [0x1400a5bd0]
lea rcx, [rbp + 0x698]
call fcn.1400109b0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r14, [rcx - 1]
mov rax, qword [rbp + 0x698]
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 0x1400154ec
mov edx, edi
lea rcx, [rbp + 0x698]
call fcn.140010630
mov rax, qword [rbp + 0x698]
cmp rsi, r12
ja 0x1400154fc
lea rbx, [rax + rsi*2]
movsxd rdx, r14d
add rdx, rdx
lea rcx, [rax + r12*2]
mov r9, rdx
mov r8, rbx
call fcn.140071c20
test edi, edi
js 0x14001569d
mov rax, qword [rbp + 0x698]
cmp edi, dword [rax - 0xc]
jg 0x14001569d
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbp + 0x698]
mov word [rax + rcx*2], 0
mov rbx, rbp
mov esi, 0x5c00
nop
nop
nop
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 0x140015638
lea rcx, [rsp + 0x60]
mov qword [rcx], rax
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
mov qword [rsp + 0x48], r15
xor eax, eax
mov qword [rsp + 0x50], 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 + 0x698]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400155cf
mov qword [rsp + 0x48], r15
jmp 0x140015624
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], reloc.OLEAUT32.dll_SafeArrayGetDim
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea r8, [rsp + 0x60]
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 + 0x48]
test edi, edi
cmove rdx, r15
mov qword [rsp + 0x48], rdx
lea rcx, [rsp + 0x48]
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, 0x5e64
jl 0x140015550
mov qword [rbp + 0x668], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp + 0x660], rax
test rax, rax
je 0x1400156a8
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
mov r9, rbp
lea r8, [0x140015880]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbp + 0x690], rax
jmp 0x1400156a8
mov ecx, 0x80070057
call fcn.140010c90
nop
mov rax, rbp
lea r11, [rsp + 0x70]
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