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

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffff9d4
mov ebx, eax
cmp word [ebx], 0x5c
jne 0x424cba
cmp word [ebx + 2], 0x5c
jne 0x424cba
mov eax, 0x23bd
jmp 0x424fc4
cmp word [ebx], 0x2e
jne 0x424d04
cmp word [ebx + 2], 0x2e
jne 0x424d04
xor esi, esi
test ebx, ebx
je 0x424cd6
mov eax, ebx
call fcn.00406ea8
jmp 0x424cd8
xor eax, eax
mov edi, eax
mov eax, edi
dec eax
sub eax, 2
jl 0x424cfa
inc eax
mov edx, 2
cmp word [ebx + edx*2], 0x20
je 0x424cf6
mov esi, 1
jmp 0x424cfa
inc edx
dec eax
jne 0x424ce8
test esi, esi
jne 0x424d04
mov word [ebx + 4], 0
lea eax, [esp + 0x422]
push eax
push 0x104
call sub.kernel32.dll_GetCurrentDirectoryW
movzx edx, word [esp + 0x422]
mov eax, edx
add edx, 0xffffff9f
sub dx, 0x1a
jae 0x424d35
movzx eax, word [esp + 0x422]
and ax, 0xffdf
mov esi, eax
mov word [esp], 0x3d
mov eax, 0x424fd0
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0xc]
movzx eax, word [ebx]
mov ecx, eax
cmp cx, 0xff
ja 0x424d5c
movzx ecx, cx
bt dword [edx], ecx
setb dl
test dl, dl
je 0x424d6d
cmp word [ebx + 2], 0x3a
sete dl
jmp 0x424d6f
xor edx, edx
test dl, dl
je 0x424d91
mov edx, eax
mov ecx, eax
add ecx, 0xffffff9f
sub cx, 0x1a
jae 0x424d87
mov edx, eax
and dx, 0xffdf
mov word [esp + 2], dx
add ebx, 4
jmp 0x424d96
mov word [esp + 2], si
mov word [esp + 4], 0x3a
mov word [esp + 6], 0
test ebx, ebx
je 0x424db1
mov eax, ebx
call fcn.00406ea8
jmp 0x424db3
xor eax, eax
mov edi, eax
cmp word [ebx], 0x5c
jne 0x424df4
add edi, 2
cmp edi, 0x208
jbe 0x424dd0
mov eax, 0xce
jmp 0x424fc4
movzx eax, word [esp + 2]
mov word [esp + 0x10], ax
movzx eax, word [esp + 4]
mov word [esp + 0x12], ax
lea eax, [esp + 0x14]
mov edx, ebx
call fcn.0041c328
jmp 0x424ea4
mov eax, esp
call fcn.00422a20
mov dword [esp + 8], eax
cmp dword [esp + 8], 0
je 0x424e15
lea eax, [esp + 0x10]
mov edx, dword [esp + 8]
call fcn.0041c328
jmp 0x424e30
movzx eax, word [esp + 2]
mov word [esp + 0x10], ax
movzx eax, word [esp + 4]
mov word [esp + 0x12], ax
mov word [esp + 0x14], 0
lea eax, [esp + 0x10]
test eax, eax
je 0x424e3f
call fcn.00406ea8
jmp 0x424e41
xor eax, eax
lea edx, [esp + 0x10]
add eax, eax
add edx, eax
mov dword [esp + 8], edx
mov eax, dword [esp + 8]
mov word [eax], 0x5c
add dword [esp + 8], 2
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0xc]
pop edx
sub eax, edx
sar eax, 1
jns 0x424e6e
adc eax, 0
cdq
push edx
push eax
mov eax, edi
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
cmp edx, 0
jne 0x424e8d
cmp eax, 0x208
jbe 0x424e99
jmp 0x424e8f
jle 0x424e99
mov eax, 0xce
jmp 0x424fc4
mov edx, ebx
mov eax, dword [esp + 8]
call fcn.0041c328
mov word [esp + 0x628], 0
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x426]
push eax
push 0x104
lea eax, [esp + 0x1c]
push eax
call sub.kernel32.dll_GetFullPathNameW
test eax, eax
jne 0x424ed8
mov eax, 5
jmp 0x424fc4
cmp dword [esp + 8], 0
jne 0x424f02
lea eax, [esp + 0x422]
test eax, eax
je 0x424ef1
call fcn.00406ea8
jmp 0x424ef3
xor eax, eax
lea edx, [esp + 0x422]
add eax, eax
add edx, eax
mov dword [esp + 8], edx
mov eax, dword [esp + 8]
cmp word [eax], 0
jne 0x424f32
lea eax, [esp + 0x428]
cmp eax, dword [esp + 8]
jae 0x424f32
mov eax, dword [esp + 8]
cmp word [eax - 2], 0x5c
jne 0x424f32
sub dword [esp + 8], 2
mov eax, dword [esp + 8]
mov word [eax], 0
mov eax, dword [0x4596c0]
cmp byte [eax], 0
je 0x424f4a
lea eax, [esp + 0x422]
xor edx, edx
call fcn.0042484c
lea eax, [esp + 0x422]
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x424f63
test eax, 0x410
jne 0x424f7e
inc eax
jne 0x424f77
call sub.kernel32.dll_GetLastError_2
cmp eax, 2
jne 0x424fc4
mov eax, 3
jmp 0x424fc4
mov eax, 0x10b
jmp 0x424fc4
cmp si, word [esp + 2]
jne 0x424f9d
lea eax, [esp + 0x422]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x424f9d
call sub.kernel32.dll_GetLastError_2
jmp 0x424fc4
lea edx, [esp + 0x422]
mov eax, esp
call fcn.00422ca8
test eax, eax
je 0x424fb6
mov eax, 8
jmp 0x424fc4
mov eax, dword [0x459a38]
xor edx, edx
call fcn.004247b0
xor eax, eax
add esp, 0x62c
pop edi
pop esi
pop ebx
ret