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

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffff9c8
mov byte [esp], dl
mov ebx, eax
cmp word [ebx], 0x5c
jne 0x424991
cmp word [ebx + 2], 0x5c
jne 0x424991
mov eax, 0x23bd
jmp 0x424c68
lea eax, [esp + 0x426]
push eax
push 0x104
call sub.kernel32.dll_GetCurrentDirectoryW
movzx edx, word [esp + 0x426]
mov eax, edx
add edx, 0xffffff9f
sub dx, 0x1a
jae 0x4249c2
movzx eax, word [esp + 0x426]
and ax, 0xffdf
mov edi, eax
mov word [esp + 2], 0x3d
mov eax, 0x424c74
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
movzx esi, word [ebx]
mov edx, esi
cmp dx, 0xff
ja 0x4249ea
movzx edx, dx
bt dword [eax], edx
setb al
test al, al
je 0x4249fb
cmp word [ebx + 2], 0x3a
sete al
jmp 0x4249fd
xor eax, eax
test al, al
je 0x424a1e
mov eax, esi
mov edx, esi
add edx, 0xffffff9f
sub dx, 0x1a
jae 0x424a14
mov eax, esi
and ax, 0xffdf
mov word [esp + 4], ax
add ebx, 4
jmp 0x424a23
mov word [esp + 4], di
mov word [esp + 6], 0x3a
mov word [esp + 8], 0
mov eax, ebx
call fcn.00406ea8
mov esi, eax
cmp word [ebx], 0x5c
jne 0x424a94
add esi, 2
mov dword [esp + 0x630], esi
xor eax, eax
mov dword [esp + 0x634], eax
fild qword [esp + 0x630]
fcomp dword [0x424c94]
wait
fnstsw ax
sahf
jbe 0x424a70
mov eax, 0xce
jmp 0x424c68
movzx eax, word [esp + 4]
mov word [esp + 0x14], ax
movzx eax, word [esp + 6]
mov word [esp + 0x16], ax
lea eax, [esp + 0x18]
mov edx, ebx
call fcn.0041c328
jmp 0x424b4f
lea eax, [esp + 2]
call fcn.00422a20
mov dword [esp + 0xc], eax
cmp dword [esp + 0xc], 0
je 0x424ab7
lea eax, [esp + 0x14]
mov edx, dword [esp + 0xc]
call fcn.0041c328
jmp 0x424ad2
movzx eax, word [esp + 4]
mov word [esp + 0x14], ax
movzx eax, word [esp + 6]
mov word [esp + 0x16], ax
mov word [esp + 0x18], 0
lea eax, [esp + 0x14]
call fcn.00406ea8
lea edx, [esp + 0x14]
add eax, eax
add edx, eax
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0xc]
mov word [eax], 0x5c
add dword [esp + 0xc], 2
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x10]
pop edx
sub eax, edx
sar eax, 1
jns 0x424b08
adc eax, 0
cdq
push edx
push eax
mov eax, esi
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov dword [esp + 0x630], eax
mov dword [esp + 0x634], edx
fild qword [esp + 0x630]
fcomp dword [0x424c94]
wait
fnstsw ax
sahf
jbe 0x424b44
mov eax, 0xce
jmp 0x424c68
mov edx, ebx
mov eax, dword [esp + 0xc]
call fcn.0041c328
mov word [esp + 0x62e], 0
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x42a]
push eax
push 0x104
lea eax, [esp + 0x20]
push eax
call sub.kernel32.dll_GetFullPathNameW
test eax, eax
jne 0x424b83
mov eax, 5
jmp 0x424c68
cmp dword [esp + 0xc], 0
jne 0x424ba5
lea eax, [esp + 0x426]
call fcn.00406ea8
lea edx, [esp + 0x426]
add eax, eax
add edx, eax
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0xc]
cmp word [eax], 0
jne 0x424bd5
lea eax, [esp + 0x42c]
cmp eax, dword [esp + 0xc]
jae 0x424bd5
mov eax, dword [esp + 0xc]
cmp word [eax - 2], 0x5c
jne 0x424bd5
sub dword [esp + 0xc], 2
mov eax, dword [esp + 0xc]
mov word [eax], 0
mov eax, dword [0x4596c0]
cmp byte [eax], 0
je 0x424bed
lea eax, [esp + 0x426]
xor edx, edx
call fcn.0042484c
cmp byte [esp], 0
je 0x424c3f
lea eax, [esp + 0x426]
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x424c0c
test eax, 0x410
jne 0x424c27
inc eax
jne 0x424c20
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
jne 0x424c68
mov eax, 3
jmp 0x424c68
mov eax, 0x10b
jmp 0x424c68
lea eax, [esp + 0x426]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x424c3f
call sub.kernel32.dll_GetLastError_2
jmp 0x424c68
lea edx, [esp + 0x426]
lea eax, [esp + 2]
call fcn.00422ca8
test eax, eax
je 0x424c5a
mov eax, 8
jmp 0x424c68
mov eax, dword [0x459a38]
xor edx, edx
call fcn.004247b0
xor eax, eax
add esp, 0x638
pop edi
pop esi
pop ebx
ret