Function at 0x434d10
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 0x434d39
cmp word [rbx + 2], 0x5c
jne 0x434d39
mov eax, 0x23bd
jmp 0x4350a5
cmp word [rbx], 0x2e
jne 0x434d96
cmp word [rbx + 2], 0x2e
jne 0x434d96
xor rsi, rsi
test rbx, rbx
je 0x434d5d
mov rax, rbx
mov rcx, rax
call fcn.0040aa60
mov edi, eax
jmp 0x434d60
xor rdi, rdi
mov eax, 2
mov ecx, edi
sub ecx, 1
cmp eax, ecx
jg 0x434d8b
add ecx, 1
movsxd rdx, eax
cmp word [rbx + rdx*2], 0x20
je 0x434d84
mov esi, 1
jmp 0x434d8b
add eax, 1
cmp eax, ecx
jne 0x434d72
nop
test esi, esi
jne 0x434d96
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 0x434dc2
movzx rsi, word [rbp + 0x3c]
and si, 0xffdf
mov word [rbp + 0x658], 0x3d
lea rax, [0x004350b4]
mov qword [rbp + 0x28], rax
movzx rax, word [rbx]
cmp ax, 0xff
ja 0x434df2
mov rcx, qword [rbp + 0x28]
movzx rax, ax
bt qword [rcx], rax
setb al
jmp 0x434df5
xor rax, rax
test al, al
je 0x434e03
cmp word [rbx + 2], 0x3a
sete al
jmp 0x434e06
xor rax, rax
test al, al
je 0x434e31
movzx rax, word [rbx]
movzx rcx, word [rbx]
sub cx, 0x61
cmp cx, 0x1a
jae 0x434e24
movzx rax, word [rbx]
and ax, 0xffdf
mov word [rbp + 0x65a], ax
add rbx, 4
jmp 0x434e38
mov word [rbp + 0x65a], si
mov word [rbp + 0x65c], 0x3a
mov word [rbp + 0x65e], 0
test rbx, rbx
je 0x434e5e
mov rax, rbx
mov rcx, rax
call fcn.0040aa60
mov edi, eax
jmp 0x434e61
xor rdi, rdi
cmp word [rbx], 0x5c
jne 0x434eaf
add edi, 2
cmp edi, 0x208
jbe 0x434e7d
mov eax, 0xce
jmp 0x4350a5
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.00429d70
jmp 0x434f7f
lea rcx, [rbp + 0x658]
call fcn.00432270
mov qword [rbp + 0x30], rax
cmp qword [rbp + 0x30], 0
je 0x434ed8
lea rcx, [rbp + 0x246]
mov rdx, qword [rbp + 0x30]
call fcn.00429d70
jmp 0x434eff
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 0x434f1c
lea rax, [rbp + 0x246]
mov rcx, rax
call fcn.0040aa60
jmp 0x434f1f
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 0x434f73
mov eax, 0xce
jmp 0x4350a5
mov rcx, qword [rbp + 0x30]
mov rdx, rbx
call fcn.00429d70
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 0x434fb1
mov eax, 5
jmp 0x4350a5
cmp qword [rbp + 0x30], 0
jne 0x434fde
lea rax, [rbp + 0x3c]
test rax, rax
je 0x434fcf
lea rax, [rbp + 0x3c]
mov rcx, rax
call fcn.0040aa60
jmp 0x434fd2
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 0x43500b
lea rax, [rbp + 0x42]
cmp qword [rbp + 0x30], rax
jbe 0x43500b
mov rax, qword [rbp + 0x30]
cmp word [rax - 2], 0x5c
jne 0x43500b
sub qword [rbp + 0x30], 2
mov rax, qword [rbp + 0x30]
mov word [rax], 0
mov rax, qword [0x004895e8]
cmp byte [rax], 0
je 0x435023
lea rcx, [rbp + 0x3c]
xor rdx, rdx
call fcn.00434820
lea rcx, [rbp + 0x3c]
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x43503b
mov ecx, eax
test ecx, 0x410
jne 0x43505a
cmp eax, 0xffffffff
jne 0x435052
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
jne 0x4350a5
mov eax, 3
jmp 0x4350a5
mov eax, 0x10b
jmp 0x4350a5
cmp si, word [rbp + 0x65a]
jne 0x435077
lea rcx, [rbp + 0x3c]
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x435077
call sub.kernel32.dll_GetLastError_2
jmp 0x4350a5
lea rcx, [rbp + 0x658]
lea rdx, [rbp + 0x3c]
call fcn.004325e0
test eax, eax
je 0x435093
mov eax, 8
jmp 0x4350a5
mov rcx, qword [0x00489cd8]
xor rdx, rdx
call fcn.00434760
xor rax, rax
lea rsp, [rbp + 0x668]
pop rbx
pop rsi
pop rdi
pop rbp
ret