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

Disassembly:
push 0x240
push 0x42bdd8
call fcn.004175cc
mov dword [ebp - 0x24c], edx
mov esi, ecx
push 0x5c
pop eax
cmp word [esi], ax
je 0x41dc0d
lea ecx, [ebp - 0x244]
call fcn.00410d51
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.00410c70
test eax, eax
js 0x41dc21
mov ecx, esi
call fcn.0040df40
mov edi, eax
mov dword [ebp - 0x250], edi
test edi, edi
je 0x41dc21
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 0x413472
sub ecx, edx
sar ecx, 1
lea eax, [edi + ecx*2]
mov ecx, eax
mov dword [ebp - 0x248], eax
cmp ecx, edi
jbe 0x41349d
lea ecx, [eax - 2]
cmp word [ecx], 0x20
je 0x41dc76
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41dc7d
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 0x41dc88
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 0x41dc93
cmp word [edi + 2], si
jne 0x41dc93
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 0x41dc9c
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 0x41dca7
cmp eax, dword [ebp - 0x34]
ja 0x41dcd9
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
mov eax, ecx
je 0x41dd01
xor edx, edx
cmp word [eax], dx
je 0x41dc50
test ecx, ecx
mov eax, ecx
je 0x41dd0c
cmp word [eax + 2], si
jne 0x41dc50
test ecx, ecx
mov edx, ecx
je 0x41dd17
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 4]
jne 0x413577
sub edx, esi
sar edx, 1
test ecx, ecx
je 0x41dd22
lea edx, [ecx + edx*2]
mov esi, edx
mov dword [ebp - 0x248], edx
lea ecx, [ebp - 0x244]
call fcn.00416cf0
add eax, 6
cmp esi, eax
jbe 0x4135b9
push 0x5c
pop eax
cmp word [edx - 2], ax
je 0x4136a4
xor eax, eax
mov word [edx], ax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41dd2d
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41dd38
cmp byte [0x443cc9], 0
je 0x413600
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x41dd60
xor eax, eax
push eax
mov edx, dword [ebp - 0x34]
call fcn.0041245c
test eax, eax
je 0x41dcd9
mov esi, dword [ebp - 0x24c]
cmp esi, 2
je 0x413631
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41dd6b
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41dd76
test eax, 0x410
je 0x41dd8c
test esi, esi
je 0x413640
cmp esi, 1
jne 0x413656
cmp bx, word [ebp - 0x26]
jne 0x413656
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4136b4
push eax
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
test eax, eax
je 0x41dca7
mov edx, dword [ebp - 0x3c]
test edx, edx
je 0x4136bc
lea ecx, [ebp - 0x28]
call fcn.00413a50
test eax, eax
jne 0x41dc2e
mov ecx, dword [0x443cb8]
test ecx, ecx
je 0x4136c4
xor eax, eax
push eax
mov edx, dword [0x443cc0]
call fcn.004136cb
mov dword [ebp - 4], 0xfffffffe
call fcn.004136ac
lea ecx, [ebp - 0x244]
call fcn.00410de8
xor eax, eax
call fcn.00417614
ret
lea edx, [esi - 2]
jmp 0x413592
lea eax, [ebp - 0x244]
jmp 0x413647
lea edx, [ebp - 0x244]
jmp 0x41365d
mov ecx, 0x443ab0
jmp 0x413677
cmp word [esi + 2], ax
jne 0x41341f
mov eax, 0x400023c9
jmp 0x41369e
lea ecx, [ebp - 0x244]
call fcn.00410de8
jmp 0x41dc4c
lea ecx, [ebp - 0x244]
call fcn.00410de8
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 8
jmp 0x41dc70
lea ecx, [ebp - 0x244]
call fcn.00410de8
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
push 3
pop eax
jmp 0x41369e
mov eax, ecx
jmp 0x413486
lea eax, [ebp - 0x244]
jmp 0x4134ad
lea eax, [ebp - 0x244]
jmp 0x4134c2
mov word [ebp - 0x26], bx
jmp 0x413506
lea eax, [ebp - 0x244]
jmp 0x41351b
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
jmp 0x41dcb4
push 3
pop esi
lea ecx, [ebp - 0x244]
call fcn.00410de8
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, esi
jmp 0x41369e
lea ecx, [ebp - 0x244]
call fcn.00410de8
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0xce
jmp 0x41369e
lea eax, [ebp - 0x244]
jmp 0x41354b
lea eax, [ebp - 0x244]
jmp 0x413560
lea edx, [ebp - 0x244]
jmp 0x413574
lea ecx, [ebp - 0x244]
jmp 0x41358f
lea eax, [ebp - 0x244]
jmp 0x4135c9
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x4135d9
cmp esi, 3
je 0x4135d9
cmp esi, 0x7b
jne 0x41dcb4
jmp 0x4135d9
lea ecx, [ebp - 0x244]
jmp 0x4135ed
lea eax, [ebp - 0x244]
jmp 0x413616
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x41dcb4
jmp 0x41dcb1
lea ecx, [ebp - 0x244]
call fcn.00410de8
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x42d0b4
call sub.msvcrt.dll__local_unwind4
add esp, 0xc
mov eax, 0x10b
jmp 0x41369e