Function at 0x42d920
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
cmp word [rbx], 0x5c
jne 0x42d949
cmp word [rbx + 2], 0x5c
jne 0x42d949
mov eax, 0x23bd
jmp 0x42dcb5
cmp word [rbx], 0x2e
jne 0x42d9a6
cmp word [rbx + 2], 0x2e
jne 0x42d9a6
xor rsi, rsi
test rbx, rbx
je 0x42d96d
mov rax, rbx
mov rcx, rax
call fcn.00409fc0
mov edi, eax
jmp 0x42d970
xor rdi, rdi
mov eax, 2
mov ecx, edi
sub ecx, 1
cmp eax, ecx
jg 0x42d99b
add ecx, 1
movsxd rdx, eax
cmp word [rbx + rdx*2], 0x20
je 0x42d994
mov esi, 1
jmp 0x42d99b
add eax, 1
cmp eax, ecx
jne 0x42d982
nop
test esi, esi
jne 0x42d9a6
mov word [rbx + 4], 0
mov ecx, 0x104
lea rdx, [rbp + 0x3c]
call sub.kernel32.dll_GetCurrentDirectoryW
movzx rsi, word [rbp + 0x3c]
movzx rax, word [rbp + 0x3c]
sub ax, 0x61
cmp ax, 0x1a
jae 0x42d9d2
movzx rsi, word [rbp + 0x3c]
and si, 0xffdf
mov word [rbp + 0x658], 0x3d
lea rax, [0x0042dcc4]
mov qword [rbp + 0x28], rax
movzx rax, word [rbx]
cmp ax, 0xff
ja 0x42da02
mov rcx, qword [rbp + 0x28]
movzx rax, ax
bt qword [rcx], rax
setb al
jmp 0x42da05
xor rax, rax
test al, al
je 0x42da13
cmp word [rbx + 2], 0x3a
sete al
jmp 0x42da16
xor rax, rax
test al, al
je 0x42da41
movzx rax, word [rbx]
movzx rcx, word [rbx]
sub cx, 0x61
cmp cx, 0x1a
jae 0x42da34
movzx rax, word [rbx]
and ax, 0xffdf
mov word [rbp + 0x65a], ax
add rbx, 4
jmp 0x42da48
mov word [rbp + 0x65a], si
mov word [rbp + 0x65c], 0x3a
mov word [rbp + 0x65e], 0
test rbx, rbx
je 0x42da6e
mov rax, rbx
mov rcx, rax
call fcn.00409fc0
mov edi, eax
jmp 0x42da71
xor rdi, rdi
cmp word [rbx], 0x5c
jne 0x42dabf
add edi, 2
cmp edi, 0x208
jbe 0x42da8d
mov eax, 0xce
jmp 0x42dcb5
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 0x42db8f
lea rcx, [rbp + 0x658]
call fcn.0042ae80
mov qword [rbp + 0x30], rax
cmp qword [rbp + 0x30], 0
je 0x42dae8
lea rcx, [rbp + 0x246]
mov rdx, qword [rbp + 0x30]
call fcn.00422b70
jmp 0x42db0f
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]
test rax, rax
je 0x42db2c
lea rax, [rbp + 0x246]
mov rcx, rax
call fcn.00409fc0
jmp 0x42db2f
xor rax, rax
movsxd rax, 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]
cmp rax, 0x208
jle 0x42db83
mov eax, 0xce
jmp 0x42dcb5
mov rcx, qword [rbp + 0x30]
mov rdx, rbx
call fcn.00422b70
mov word [rbp + 0x242], 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 0x42dbc1
mov eax, 5
jmp 0x42dcb5
cmp qword [rbp + 0x30], 0
jne 0x42dbee
lea rax, [rbp + 0x3c]
test rax, rax
je 0x42dbdf
lea rax, [rbp + 0x3c]
mov rcx, rax
call fcn.00409fc0
jmp 0x42dbe2
xor rax, rax
movsxd rax, eax
lea rax, [rbp + rax*2 + 0x3c]
mov qword [rbp + 0x30], rax
mov rax, qword [rbp + 0x30]
cmp word [rax], 0
jne 0x42dc1b
lea rax, [rbp + 0x42]
cmp qword [rbp + 0x30], rax
jbe 0x42dc1b
mov rax, qword [rbp + 0x30]
cmp word [rax - 2], 0x5c
jne 0x42dc1b
sub qword [rbp + 0x30], 2
mov rax, qword [rbp + 0x30]
mov word [rax], 0
mov rax, qword [0x00449328]
cmp byte [rax], 0
je 0x42dc33
lea rcx, [rbp + 0x3c]
xor rdx, rdx
call fcn.0042d430
lea rcx, [rbp + 0x3c]
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x42dc4b
mov ecx, eax
test ecx, 0x410
jne 0x42dc6a
cmp eax, 0xffffffff
jne 0x42dc62
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
jne 0x42dcb5
mov eax, 3
jmp 0x42dcb5
mov eax, 0x10b
jmp 0x42dcb5
cmp si, word [rbp + 0x65a]
jne 0x42dc87
lea rcx, [rbp + 0x3c]
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x42dc87
call sub.kernel32.dll_GetLastError_2
jmp 0x42dcb5
lea rcx, [rbp + 0x658]
lea rdx, [rbp + 0x3c]
call fcn.0042b1f0
test eax, eax
je 0x42dca3
mov eax, 8
jmp 0x42dcb5
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