Function at 0x140158004
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov rdi, rcx
mov rax, qword [0x1402e0038]
xor rax, rsp
mov qword [rsp + 0x80], rax
call fcn.140158aa0
test al, al
jne 0x1401582af
xorps xmm0, xmm0
lea rsi, [rsp + 0x50]
movaps xmmword [rsi], xmm0
mov qword [rsi + 0x10], 0
mov rcx, rdi
mov rdx, rsi
call fcn.140158b1a
mov edi, eax
mov rcx, rsi
call fcn.140158336
mov ebx, eax
mov rcx, rsi
mov rdx, rsi
call fcn.140158399
test bl, bl
jne 0x14015807f
test dil, dil
jne 0x14015807f
test al, al
je 0x140158328
test bl, bl
jne 0x140158142
lea rcx, [rsp + 0x38]
mov byte [rcx + 0x17], 4
lea rax, [0x1402c6e80]
cmp rcx, rax
ja 0x1401580aa
lea rcx, [rsp + 0x40]
cmp rcx, rax
ja 0x140158332
lea rdi, [rsp + 0x58]
movabs rax, 0x5c002e005c005c
lea rcx, [rsp + 0x38]
mov qword [rcx], rax
movzx eax, byte [rdi + 0xf]
mov r8d, eax
and r8d, 0x7f
test al, al
cmovs r8, qword [rdi]
mov word [rcx + 8], 0
mov rdx, qword [rdi - 8]
cmovns rdx, rsi
call fcn.1400edda0
mov r14, qword [rax]
mov rcx, qword [rax + 8]
mov rdx, qword [rax + 0xf]
mov qword [rsp + 0x77], rdx
mov qword [rsp + 0x70], rcx
mov bpl, byte [rax + 0x17]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
cmp byte [rdi + 0xf], 0
jns 0x14015811c
mov rcx, qword [rsp + 0x50]
call fcn.14010cc0c
mov qword [rsp + 0x50], r14
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x77]
mov qword [rdi + 7], rcx
mov qword [rdi], rax
mov byte [rsp + 0x67], bpl
cmp byte [rsp + 0x4f], 0
js 0x140158319
mov byte [rsp + 0x37], bl
mov r15, 0xffffffffffffffff
xor ebp, ebp
lea r12, [rsp + 0x70]
lea r14, [rsp + 0x38]
mov r13, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov qword [rsp + 0x20], r12
mov rcx, r14
mov rdx, rsi
xor r8d, r8d
mov r9, r15
call fcn.1400a0996
cmp byte [rsp + 0x67], 0
jns 0x140158187
mov rcx, qword [rsp + 0x50]
call fcn.14010cc0c
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x60], rax
movups xmm0, xmmword [rsp + 0x38]
movaps xmmword [rsp + 0x50], xmm0
cmp byte [rsp + 0x67], 0
mov rcx, rsi
jns 0x1401581aa
mov rcx, qword [rsp + 0x50]
call r13
cmp eax, 0xffffffff
je 0x140158251
bt eax, 0xa
jb 0x1401582a8
movzx ecx, byte [rsp + 0x67]
mov eax, ecx
and eax, 0x7f
test cl, cl
cmovs rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
cmovns rcx, rsi
mov r15, 0xffffffffffffffff
mov bpl, 1
test rax, rax
je 0x140158207
add rax, rax
test rax, rax
je 0x140158207
lea rdx, [rax - 2]
cmp word [rcx + rax - 2], 0x5c
mov rax, rdx
jne 0x1401581ed
sar rdx, 1
mov r15, rdx
mov eax, 0x1126
cmp r15, 2
ja 0x140158160
mov edi, eax
cmp byte [rsp + 0x67], 0
js 0x140158245
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14010fba0
mov eax, edi
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x50]
call fcn.14010cc0c
jmp 0x14015821f
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
ja 0x14015827d
mov ecx, 0x2e
bt ecx, eax
jae 0x14015827d
cmp eax, 5
ja 0x140158284
mov ecx, 0x2e
bt ecx, eax
jb 0x1401581c0
jmp 0x140158284
cmp eax, 0x7b
je 0x140158268
jmp 0x1401582b9
cmp eax, 0x7b
je 0x1401581c0
test ebx, ebx
je 0x140158207
mov eax, 0x1126
cmp ebx, 2
je 0x140158216
jmp 0x140158218
xor eax, eax
jmp 0x140158216
mov edi, 0x1126
jmp 0x14015821f
test bpl, 1
sete cl
or cl, byte [rsp + 0x37]
jne 0x14015830d
lea rcx, [rsp + 0x50]
movzx r8d, byte [rcx + 0x17]
mov edx, r8d
and edx, 0x7f
test r8b, r8b
cmovs rdx, qword [rcx + 8]
cmovs rcx, qword [rcx]
test rdx, rdx
je 0x14015830d
add rdx, rdx
test rdx, rdx
je 0x14015830d
lea r8, [rdx - 2]
cmp word [rcx + rdx - 2], 0x5c
mov rdx, r8
jne 0x1401582ea
mov ebx, 2
cmp r8, 6
je 0x140158268
mov ebx, 1
mov edi, eax
jmp 0x140158268
mov rcx, qword [rsp + 0x38]
call fcn.14010cc0c
jmp 0x140158142
mov edi, 0x7b
jmp 0x140158218
int3