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

Disassembly:
push rsi
push rdi
push r13
push r14
sub rsp, 0x38
mov r14, rcx
xor r13d, r13d
xor ecx, ecx
mov esi, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14, r14
je 0x140013dfc
mov rdi, 0xffffffffffffffff
mov edx, r13d
mov rax, rdi
inc rax
cmp word [r14 + rax*2], dx
jne 0x1400137c2
test rax, rax
je 0x140013804
mov rcx, r13
nop dword [rax]
nop dword [rax + rax]
movzx r8d, word [r14 + rcx*2]
cmp r8w, 0x5c
je 0x140013dfc
cmp r8w, 0x2f
je 0x140013dfc
inc edx
mov ecx, edx
cmp rcx, rax
jb 0x1400137e0
mov qword [rsp + 0x60], rbx
mov rcx, r14
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x30], r15
call fcn.140013e20
mov r15, rax
test rax, rax
je 0x140013aef
call fcn.140014bc0
mov r12, rax
test rax, rax
je 0x140013de3
mov r8d, r13d
mov rcx, rdi
inc rcx
cmp word [r15 + rcx*2], si
jne 0x140013843
test rcx, rcx
je 0x140013884
mov rax, r13
nop word [rax + rax]
movzx edx, word [r15 + rax*2]
cmp dx, 0x5c
je 0x14001394d
cmp dx, 0x2f
je 0x14001394d
inc r8d
mov eax, r8d
cmp rax, rcx
jb 0x140013860
mov rcx, rdi
nop word [rax + rax]
inc rcx
cmp word [r12 + rcx*2], si
jne 0x140013890
nop word [rax + rax]
inc rdi
cmp word [r15 + rdi*2], si
jne 0x1400138a0
test rcx, rcx
je 0x1400138c9
cmp word [r12 + rcx*2 - 2], 0x5c
je 0x1400138c9
test rdi, rdi
je 0x1400138c9
cmp word [r15], 0x5c
mov ebx, 1
jne 0x1400138cc
mov ebx, r13d
mov eax, ebx
add rax, rdi
add rax, rcx
mov ecx, 0x40
lea rdi, [rax*2 + 2]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140013945
mov r8, r12
mov rdx, rdi
mov rcx, rax
call fcn.140012380
test eax, eax
js 0x140013936
test ebx, ebx
je 0x140013921
lfence
lea r8, [0x1400a6a1c]
mov rdx, rdi
mov rcx, rsi
call fcn.1400122c0
test eax, eax
js 0x140013936
lfence
mov r8, r15
mov rdx, rdi
mov rcx, rsi
call fcn.1400122c0
test eax, eax
jns 0x140013945
lfence
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, r13
mov rcx, r12
jmp 0x140013ddd
lea rax, str.system32_
mov qword [rsp + 0x20], rax
lea r14, [rsp + 0x20]
lea rax, str.SystemRoot_system32_
mov qword [rsp + 0x28], rax
nop word [rax + rax]
mov rdx, qword [r14]
mov rbx, rdi
inc rbx
cmp word [rdx + rbx*2], si
jne 0x140013976
mov r8, rbx
mov rcx, r15
call fcn.140072a48
test eax, eax
je 0x1400139a1
add r14, 8
lea rax, [rsp + 0x30]
cmp r14, rax
jb 0x140013970
jmp 0x140013a95
lea rbp, [r15 + rbx*2]
mov rcx, rdi
nop dword [rax + rax]
inc rcx
cmp word [r12 + rcx*2], si
jne 0x1400139b0
test rbp, rbp
jne 0x1400139f0
lea rbx, [rcx + 1]
lea rdx, [rbx + rbx]
lea ecx, [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140013a92
mov r8, r12
mov rdx, rbx
mov rcx, rax
call fcn.140012540
jmp 0x140013a82
inc rdi
cmp word [rbp + rdi*2], si
jne 0x1400139f0
test rcx, rcx
je 0x140013a19
cmp word [r12 + rcx*2 - 2], 0x5c
je 0x140013a19
test rdi, rdi
je 0x140013a19
cmp word [rbp], 0x5c
mov ebx, 1
jne 0x140013a1c
mov ebx, r13d
mov eax, ebx
add rax, rdi
add rax, rcx
mov ecx, 0x40
lea rdi, [rax*2 + 2]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140013a95
mov r8, r12
mov rdx, rdi
mov rcx, rax
call fcn.140012380
test eax, eax
js 0x140013a86
test ebx, ebx
je 0x140013a71
lfence
lea r8, [0x1400a6a1c]
mov rdx, rdi
mov rcx, rsi
call fcn.1400122c0
test eax, eax
js 0x140013a86
lfence
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
call fcn.1400122c0
test eax, eax
jns 0x140013a95
lfence
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, r13
lea rax, [rsp + 0x30]
cmp r14, rax
jne 0x140013945
movzx eax, word [r15]
cmp eax, 0x5c
je 0x140013ae1
cmp eax, 0x2f
je 0x140013ae1
mov ecx, eax
call fcn.140072020
test eax, eax
je 0x140013945
cmp word [r15 + 2], 0x3a
jne 0x140013945
movzx eax, word [r15 + 4]
cmp ax, 0x5c
je 0x140013ae1
cmp ax, 0x2f
jne 0x140013945
mov rsi, r15
mov rcx, r12
mov r15, r13
jmp 0x140013ddd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x140013ca6
mov r11, rdi
cmp word [r14 + r11*2 + 2], si
lea r11, [r11 + 1]
jne 0x140013b01
mov rcx, r14
call fcn.14000efb0
mov rcx, rdi
nop dword [rax + rax]
inc rcx
cmp word [rax + rcx*2], si
jne 0x140013b20
test rcx, rcx
je 0x140013c51
cmp rcx, 1
je 0x140013b83
mov rbx, rdi
nop dword [rax + rax]
inc rbx
cmp word [r14 + rbx*2], si
jne 0x140013b40
inc rbx
mov ecx, 0x40
lea rdx, [rbx + rbx]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x140013ca6
mov r8, r14
mov rdx, rbx
mov rcx, rax
call fcn.140012540
test eax, eax
jns 0x140013c2e
jmp 0x140013c1f
lea r12, [r11 - 1]
test r12, r12
js 0x140013ca6
lfence
mov rbx, rdi
inc rbx
cmp word [r14 + rbx*2], si
jne 0x140013b96
cmp r12, rbx
mov ecx, 0x40
cmovb rbx, r12
inc rbx
lea rdx, [rbx + rbx]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x140013ca6
lea rax, [rbx - 1]
cmp rax, 0x7ffffffe
ja 0x140013c16
cmp r12, 0x7ffffffe
ja 0x140013c1b
sub r12, rbx
mov rcx, r15
sub r14, r15
lea rax, [r12 + rbx]
test rax, rax
je 0x140013c03
movzx eax, word [r14 + rcx]
test ax, ax
je 0x140013c03
mov word [rcx], ax
add rcx, 2
sub rbx, 1
jne 0x140013be3
test rbx, rbx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
jne 0x140013c2e
jmp 0x140013c1f
test rbx, rbx
je 0x140013c1f
mov word [r15], r13w
lfence
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r15, r13
test r15, r15
je 0x140013ca6
mov ecx, 0x37e4
call fcn.1400111a0
test eax, eax
je 0x140013cdb
xor ecx, ecx
call fcn.140014720
jmp 0x140013ce0
lea rbx, [r11*2 + 0xa]
mov ecx, 0x40
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x140013ca6
mov r8, r14
mov rdx, rbx
mov rcx, rax
call fcn.140012380
lfence
mov rcx, r15
test eax, eax
js 0x140013ca0
lea r8, str..dll
mov rdx, rbx
call fcn.1400122c0
test eax, eax
jns 0x140013c33
lfence
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140013cb9
lea ecx, [rax + 0x7e]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15, qword [rsp + 0x30]
mov rax, rsi
mov r12, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
add rsp, 0x38
pop r14
pop r13
pop rdi
pop rsi
ret
call fcn.140014bc0
mov rbp, rax
test rax, rax
je 0x140013de3
mov rcx, rdi
nop
inc rcx
cmp word [rbp + rcx*2], si
jne 0x140013cf0
nop word [rax + rax]
inc rdi
cmp word [r15 + rdi*2], si
jne 0x140013d00
test rcx, rcx
je 0x140013d28
cmp word [rbp + rcx*2 - 2], 0x5c
je 0x140013d28
test rdi, rdi
je 0x140013d28
cmp word [r15], 0x5c
mov ebx, 1
jne 0x140013d2b
mov ebx, r13d
mov eax, ebx
add rax, rdi
add rax, rcx
mov ecx, 0x40
lea rdi, [rax*2 + 2]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140013da4
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call fcn.140012380
test eax, eax
jns 0x140013d68
lfence
jmp 0x140013dce
test ebx, ebx
je 0x140013d8a
lfence
lea r8, [0x1400a6a1c]
mov rdx, rdi
mov rcx, rsi
call fcn.1400122c0
test eax, eax
jns 0x140013d8a
lfence
jmp 0x140013dce
lfence
mov r8, r15
mov rdx, rdi
mov rcx, rsi
call fcn.1400122c0
test eax, eax
jns 0x140013da4
lfence
jmp 0x140013dce
test rsi, rsi
je 0x140013dda
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140013dbb
test al, 0x50
je 0x140013dda
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140013dce
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, r13
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rsi, rsi
je 0x140013ca6
xor ecx, ecx
jmp 0x140013cb3
mov ecx, 0xa0
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x38
pop r14
pop r13
pop rdi
pop rsi
ret