Function at 0x42d5d0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set current directory

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x668
mov rbp, rsp
mov rbx, rcx
mov esi, edx
cmp word [rbx], 0x5c
jne 0x42d5fc
cmp word [rbx + 2], 0x5c
jne 0x42d5fc
mov eax, 0x23bd
jmp 0x42d8eb
mov ecx, 0x104
lea rdx, [rbp + 0x3c]
call sub.kernel32.dll_GetCurrentDirectoryW
movzx rax, word [rbp + 0x3c]
movzx rcx, word [rbp + 0x3c]
sub cx, 0x61
cmp cx, 0x1a
jae 0x42d628
movzx rax, word [rbp + 0x3c]
and ax, 0xffdf
mov word [rbp + 0x658], 0x3d
lea rcx, [0x0042d900]
mov qword [rbp + 0x28], rcx
movzx rcx, word [rbx]
cmp cx, 0xff
ja 0x42d658
mov rdx, qword [rbp + 0x28]
movzx rcx, cx
bt qword [rdx], rcx
setb cl
jmp 0x42d65b
xor rcx, rcx
test cl, cl
je 0x42d669
cmp word [rbx + 2], 0x3a
sete cl
jmp 0x42d66c
xor rcx, rcx
test cl, cl
je 0x42d697
movzx rax, word [rbx]
movzx rcx, word [rbx]
sub cx, 0x61
cmp cx, 0x1a
jae 0x42d68a
movzx rax, word [rbx]
and ax, 0xffdf
mov word [rbp + 0x65a], ax
add rbx, 4
jmp 0x42d69e
mov word [rbp + 0x65a], ax
mov word [rbp + 0x65c], 0x3a
mov word [rbp + 0x65e], 0
mov rax, rbx
mov rcx, rax
call fcn.00409fc0
mov edi, eax
cmp word [rbx], 0x5c
jne 0x42d714
add edi, 2
mov edi, edi
cvtsi2sd xmm0, rdi
comisd xmm0, xmmword [0x0042d8f8]
jbe 0x42d6e2
mov eax, 0xce
jmp 0x42d8eb
movzx rax, word [rbp + 0x65a]
mov word [rbp + 0x246], ax
movzx rax, word [rbp + 0x65c]
mov word [rbp + 0x248], ax
lea rcx, [rbp + 0x24a]
mov rdx, rbx
call fcn.00422b70
jmp 0x42d7d8
lea rcx, [rbp + 0x658]
call fcn.0042ae80
mov qword [rbp + 0x30], rax
cmp qword [rbp + 0x30], 0
je 0x42d73d
lea rcx, [rbp + 0x246]
mov rdx, qword [rbp + 0x30]
call fcn.00422b70
jmp 0x42d764
movzx rax, word [rbp + 0x65a]
mov word [rbp + 0x246], ax
movzx rax, word [rbp + 0x65c]
mov word [rbp + 0x248], ax
mov word [rbp + 0x24a], 0
lea rax, [rbp + 0x246]
mov rcx, rax
call fcn.00409fc0
mov eax, eax
lea rax, [rbp + rax*2 + 0x246]
mov qword [rbp + 0x30], rax
mov rax, qword [rbp + 0x30]
mov word [rax], 0x5c
add qword [rbp + 0x30], 2
mov edi, edi
mov rax, qword [rbp + 0x30]
lea rcx, [rbp + 0x246]
neg rcx
lea rax, [rax + rcx]
mov ecx, 2
cqo
idiv rcx
lea rax, [rdi + rax]
cvtsi2sd xmm0, rax
comisd xmm0, xmmword [0x0042d8f8]
jbe 0x42d7cc
mov eax, 0xce
jmp 0x42d8eb
mov rcx, qword [rbp + 0x30]
mov rdx, rbx
call fcn.00422b70
mov word [rbp + 0x244], 0
lea rcx, [rbp + 0x246]
mov edx, 0x104
lea r8, [rbp + 0x3c]
lea r9, [rbp + 0x30]
call sub.kernel32.dll_GetFullPathNameW
test eax, eax
jne 0x42d80a
mov eax, 5
jmp 0x42d8eb
cmp qword [rbp + 0x30], 0
jne 0x42d828
lea rax, [rbp + 0x3c]
mov rcx, rax
call fcn.00409fc0
mov eax, eax
lea rax, [rbp + rax*2 + 0x3c]
mov qword [rbp + 0x30], rax
mov rax, qword [rbp + 0x30]
cmp word [rax], 0
jne 0x42d855
lea rax, [rbp + 0x42]
cmp qword [rbp + 0x30], rax
jbe 0x42d855
mov rax, qword [rbp + 0x30]
cmp word [rax - 2], 0x5c
jne 0x42d855
sub qword [rbp + 0x30], 2
mov rax, qword [rbp + 0x30]
mov word [rax], 0
mov rax, qword [0x00449328]
cmp byte [rax], 0
je 0x42d86d
lea rcx, [rbp + 0x3c]
xor rdx, rdx
call fcn.0042d430
test sil, sil
je 0x42d8bd
lea rcx, [rbp + 0x3c]
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x42d88a
mov ecx, eax
test ecx, 0x410
jne 0x42d8a9
cmp eax, 0xffffffff
jne 0x42d8a1
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
jne 0x42d8eb
mov eax, 3
jmp 0x42d8eb
mov eax, 0x10b
jmp 0x42d8eb
lea rcx, [rbp + 0x3c]
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x42d8bd
call sub.kernel32.dll_GetLastError_2
jmp 0x42d8eb
lea rcx, [rbp + 0x658]
lea rdx, [rbp + 0x3c]
call fcn.0042b1f0
test eax, eax
je 0x42d8d9
mov eax, 8
jmp 0x42d8eb
mov rcx, qword [0x00449940]
xor rdx, rdx
call fcn.0042d370
xor rax, rax
lea rsp, [rbp + 0x668]
pop rbx
pop rsi
pop rdi
pop rbp
ret