Function at 0x140059170
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xa0
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov r13, rcx
call fcn.14013d07c
mov rcx, rax
xor edx, edx
test rax, rax
setne dl
test edx, edx
jne 0x1400591ad
mov ecx, 0x80004005
call fcn.140001c00
int3
mov rax, qword [rax]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0xe8], rdi
lea r14, [0x14019cf88]
or rbp, 0xffffffffffffffff
test r14, 0xffffffffffff0000
jne 0x140059200
movzx esi, r14w
mov ecx, esi
call fcn.14013d654
test rax, rax
je 0x14005922a
mov r8d, esi
mov rdx, rax
lea rcx, [rsp + 0xe8]
call fcn.1400020e0
mov rdi, qword [rsp + 0xe8]
jmp 0x14005922a
xor eax, eax
mov rcx, rbp
mov rdi, r14
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
mov rdx, r14
lea rcx, [rsp + 0xe8]
call fcn.140002390
mov rdi, qword [rsp + 0xe8]
cmp qword [r13 + 0x98], 0
jne 0x140059256
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x14005949e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14005949e
mov rax, qword [r13 + 0x98]
mov rcx, qword [rax + 0x538]
mov rax, qword [rcx]
lea rdx, [rsp + 0xf0]
call qword [rax + 0x100]
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x1400592d6
cmp dword [rdi + 0x10], 0
jl 0x1400592c4
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400592c4
call fcn.140001d60
mov rsi, rax
mov ecx, ebp
lock xadd dword [rdi + 0x10], ecx
add ecx, 0xffffffff
test ecx, ecx
jg 0x1400592b6
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rsi + 0x18]
mov qword [rsp + 0xe8], rax
jmp 0x1400592d6
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0xe8]
call fcn.140002390
nop
mov rdx, qword [rsp + 0xf0]
add rdx, 0xffffffffffffffe8
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400592f9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r12, qword [rsp + 0xe8]
add r12, 0xffffffffffffffe8
mov rcx, qword [r12]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [r12 + 0x10], 0
jl 0x14005932c
cmp rax, qword [r12]
jne 0x14005932c
mov rbx, r12
lock add dword [r12 + 0x10], 1
jmp 0x140059372
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [r12 + 8]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x14005934a
call fcn.1400c5210
int3
mov eax, dword [r12 + 8]
mov dword [rbx + 8], eax
mov eax, dword [r12 + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [r12 + 0x18]
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.14015cd30
add rbx, 0x18
mov qword [rsp + 0xf8], rbx
xor eax, eax
mov rdi, r14
mov rsi, rbx
mov ecx, 1
repe cmpsw word [rsi], word [rdi]
je 0x140059395
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
jne 0x1400593bb
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400593e5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400593e5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140059409
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400593e5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lock xadd dword [r12 + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x14005949e
mov rcx, qword [r12]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14005949e
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140059424
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [r13 + 0x98]
cmp qword [rax + 0x538], 0
je 0x140059483
xor edx, edx
lea r8d, [rdx + 0x6c]
lea rcx, [rsp + 0x34]
call fcn.140160e90
mov dword [rsp + 0x30], 0x70
mov qword [rsp + 0x38], 0
lea rax, str.open
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x60], 1
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
nop
lock xadd dword [r12 + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x14005949e
mov rcx, qword [r12]
mov rax, qword [rcx]
mov rdx, r12
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add rsp, 0xa0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret