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

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffde0
mov esi, edx
cmp word [eax], 0x5c
jne 0x4249ea
cmp word [eax + 2], 0x5c
jne 0x4249ea
mov eax, 0x23bd
jmp 0x424c2d
call fcn.00424998
mov ebx, eax
mov dword [esp], eax
test eax, eax
jne 0x424a02
mov eax, 8
jmp 0x424c2d
test ebx, ebx
je 0x424a0f
mov eax, ebx
call fcn.00406ea8
jmp 0x424a11
xor eax, eax
mov edx, eax
mov eax, edx
cmp eax, 1
jl 0x424a2f
cmp word [ebx + eax*2 - 2], 0x20
je 0x424a2a
mov word [ebx + eax*2], 0
jmp 0x424a2f
dec eax
test eax, eax
jne 0x424a1a
lea eax, [esp + 0x14]
push eax
push 0x104
call sub.kernel32.dll_GetCurrentDirectoryW
movzx edx, word [esp + 0x14]
mov eax, edx
add edx, 0xffffff9f
sub dx, 0x1a
jae 0x424a57
movzx eax, word [esp + 0x14]
and ax, 0xffdf
mov edi, eax
mov word [esp + 8], 0x3d
mov eax, 0x424c38
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
movzx eax, word [ebx]
mov ecx, eax
cmp cx, 0xff
ja 0x424a7f
movzx ecx, cx
bt dword [edx], ecx
setb dl
test dl, dl
je 0x424a90
cmp word [ebx + 2], 0x3a
sete dl
jmp 0x424a92
xor edx, edx
test dl, dl
je 0x424ab1
mov edx, eax
mov ecx, eax
add ecx, 0xffffff9f
sub cx, 0x1a
jae 0x424aaa
mov edx, eax
and dx, 0xffdf
mov word [esp + 0xa], dx
jmp 0x424ab6
mov word [esp + 0xa], di
mov word [esp + 0xc], 0x3a
mov word [esp + 0xe], 0
mov word [esp + 0x21a], 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x18]
push eax
push 0x104
push ebx
call sub.kernel32.dll_GetFullPathNameW
test eax, eax
jne 0x424af1
call sub.kernel32.dll_GetLastError_2
jmp 0x424c2d
cmp eax, 0x104
jbe 0x424b02
mov eax, 0xce
jmp 0x424c2d
cmp word [esp + 0x14], 0
je 0x424b12
cmp word [esp + 0x16], 0x3a
je 0x424b1c
mov eax, 3
jmp 0x424c2d
cmp dword [esp + 4], 0
jne 0x424b40
lea eax, [esp + 0x14]
test eax, eax
je 0x424b32
call fcn.00406ea8
jmp 0x424b34
xor eax, eax
lea edx, [esp + 0x14]
add eax, eax
add edx, eax
mov dword [esp + 4], edx
mov eax, dword [esp + 4]
cmp word [eax], 0
jne 0x424b6d
lea eax, [esp + 0x1a]
cmp eax, dword [esp + 4]
jae 0x424b6d
mov eax, dword [esp + 4]
cmp word [eax - 2], 0x5c
jne 0x424b6d
sub dword [esp + 4], 2
mov eax, dword [esp + 4]
mov word [eax], 0
lea eax, [esp + 0x14]
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x424b94
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
je 0x424b94
cmp eax, 3
je 0x424b94
cmp eax, 0x7b
jne 0x424c2d
mov eax, dword [0x4586c0]
cmp byte [eax], 0
je 0x424ba9
lea eax, [esp + 0x14]
xor edx, edx
call fcn.00424878
cmp esi, 2
je 0x424bd5
lea eax, [esp + 0x14]
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x424bce
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
jne 0x424c2d
mov eax, 3
jmp 0x424c2d
test eax, 0x410
je 0x424c28
test esi, esi
je 0x424be3
dec esi
jne 0x424bf1
cmp di, word [esp + 0xa]
jne 0x424bf1
lea eax, [esp + 0x14]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
je 0x424c21
lea edx, [esp + 0x14]
lea eax, [esp + 8]
call fcn.00422cd4
test eax, eax
jne 0x424c1a
mov eax, dword [0x458a38]
xor edx, edx
call fcn.004247dc
mov eax, dword [esp]
call fcn.0041ca7c
xor eax, eax
jmp 0x424c2d
mov eax, 8
jmp 0x424c2d
call sub.kernel32.dll_GetLastError_2
jmp 0x424c2d
mov eax, 0x10b
add esp, 0x220
pop edi
pop esi
pop ebx
ret