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

Disassembly:
push 0x240
push 0x42c7c0
call fcn.00417c38
mov dword [ebp - 0x24c], edx
mov esi, ecx
push 0x5c
pop eax
cmp word [esi], ax
je 0x41b470
lea ecx, [ebp - 0x244]
call fcn.004159ae
xor eax, eax
cmp byte [ebp - 0x38], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
lea ecx, [ebp - 0x244]
call fcn.0040e330
test eax, eax
js 0x41b484
mov ecx, esi
call fcn.0040abd0
mov edi, eax
mov dword [ebp - 0x250], edi
test edi, edi
je 0x41b484
xor ebx, ebx
mov dword [ebp - 4], ebx
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x408b8a
sub ecx, edx
sar ecx, 1
lea eax, [edi + ecx*2]
mov ecx, eax
mov dword [ebp - 0x248], eax
cmp ecx, edi
jbe 0x408bb3
cmp word [eax - 2], 0x20
je 0x41b4d9
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41b4e1
push eax
push dword [ebp - 0x34]
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCurrentDirectoryW]
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41b4ec
movzx eax, word [eax]
push eax
call dword [sym.imp.msvcrt.dll_towupper]
pop ecx
mov bx, ax
push 0x3d
pop eax
mov word [ebp - 0x28], ax
movzx ecx, word [edi]
push ecx
call dword [sym.imp.msvcrt.dll_iswalpha]
pop ecx
push 0x3a
pop esi
test eax, eax
je 0x41b4f7
cmp word [edi + 2], si
jne 0x41b4f7
movzx eax, word [edi]
push eax
call dword [sym.imp.msvcrt.dll_towupper]
pop ecx
mov word [ebp - 0x26], ax
mov word [ebp - 0x24], si
xor eax, eax
mov word [ebp - 0x22], ax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41b500
lea ecx, [ebp - 0x248]
push ecx
push eax
push dword [ebp - 0x34]
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFullPathNameW]
test eax, eax
je 0x41b50b
cmp eax, dword [ebp - 0x34]
ja 0x41b53d
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
mov eax, ecx
je 0x41b565
xor edx, edx
cmp word [eax], dx
je 0x41b4b3
test ecx, ecx
mov eax, ecx
je 0x41b570
cmp word [eax + 2], si
jne 0x41b4b3
test ecx, ecx
mov edx, ecx
je 0x41b57b
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 4]
jne 0x408c8d
sub edx, esi
sar edx, 1
test ecx, ecx
je 0x41b586
lea edx, [ecx + edx*2]
mov esi, edx
mov dword [ebp - 0x248], edx
lea ecx, [ebp - 0x244]
call fcn.00417c2a
add eax, 6
cmp esi, eax
jbe 0x408ccf
push 0x5c
pop eax
cmp word [edx - 2], ax
je 0x408dc4
xor eax, eax
mov word [edx], ax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41b591
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41b59c
cmp byte [0x435745], 0
je 0x408d16
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x41b5c4
xor eax, eax
push eax
mov edx, dword [ebp - 0x34]
call fcn.00410157
test eax, eax
je 0x41b53d
mov esi, dword [ebp - 0x24c]
cmp esi, 2
je 0x408d47
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41b5cf
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41b5da
test eax, 0x410
je 0x41b5f0
test esi, esi
je 0x408d56
cmp esi, 1
jne 0x408d6c
cmp bx, word [ebp - 0x26]
jne 0x408d6c
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x408dd4
push eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
test eax, eax
je 0x41b50b
mov edx, dword [ebp - 0x3c]
test edx, edx
je 0x408ddc
lea ecx, [ebp - 0x28]
call fcn.0040a891
test eax, eax
jne 0x41b491
mov ecx, dword [0x447de8]
test ecx, ecx
je 0x408de4
xor eax, eax
push eax
mov edx, dword [0x447df0]
call fcn.00408deb
mov dword [ebp - 4], 0xfffffffe
call fcn.00408dcc
lea ecx, [ebp - 0x244]
call fcn.00416164
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
lea edx, [esi - 2]
jmp 0x408ca8
lea eax, [ebp - 0x244]
jmp 0x408d5d
lea edx, [ebp - 0x244]
jmp 0x408d73
mov ecx, 0x447be0
jmp 0x408d8d
cmp word [esi + 2], ax
jne 0x408b37
mov eax, 0x400023c9
jmp 0x408db4
lea ecx, [ebp - 0x244]
call fcn.00416164
jmp 0x41b4af
lea ecx, [ebp - 0x244]
call fcn.00416164
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 8
jmp 0x41b4d3
lea ecx, [ebp - 0x244]
call fcn.00416164
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 3
pop eax
jmp 0x408db4
lea eax, [ecx - 2]
jmp 0x408b9c
lea eax, [ebp - 0x244]
jmp 0x408bc3
lea eax, [ebp - 0x244]
jmp 0x408bd8
mov word [ebp - 0x26], bx
jmp 0x408c1c
lea eax, [ebp - 0x244]
jmp 0x408c31
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
jmp 0x41b518
push 3
pop esi
lea ecx, [ebp - 0x244]
call fcn.00416164
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, esi
jmp 0x408db4
lea ecx, [ebp - 0x244]
call fcn.00416164
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0xce
jmp 0x408db4
lea eax, [ebp - 0x244]
jmp 0x408c61
lea eax, [ebp - 0x244]
jmp 0x408c76
lea edx, [ebp - 0x244]
jmp 0x408c8a
lea ecx, [ebp - 0x244]
jmp 0x408ca5
lea eax, [ebp - 0x244]
jmp 0x408cdf
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x408cef
cmp esi, 3
je 0x408cef
cmp esi, 0x7b
jne 0x41b518
jmp 0x408cef
lea ecx, [ebp - 0x244]
jmp 0x408d03
lea eax, [ebp - 0x244]
jmp 0x408d2c
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x41b518
jmp 0x41b515
lea ecx, [ebp - 0x244]
call fcn.00416164
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0x10b
jmp 0x408db4