Function at 0x417935
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x677300], 0
mov eax, dword [ebp + 8]
je 0x417954
push eax
call fcn.004b244c
pop edx
mov dword [ebp + 8], eax
leave
jmp 0x4b7820
push eax
call fcn.004b2432
pop ecx
mov dword [ebp + 8], eax
leave
jmp 0x4b72c0
push edi
push esi
push ebx
sub esp, 0x120
mov ebx, dword [esp + 0x130]
call sub.msvcrt.dll__errno
mov dword [eax], 0
test ebx, ebx
je 0x4b74e9
cmp byte [ebx], 0
je 0x4b74b4
mov dword [esp], ebx
call sub.KERNEL32.DLL_GetFileAttributesA
sub esp, 4
cmp eax, 0xffffffff
je 0x4b74da
test al, 0x10
je 0x4b74b4
mov dword [esp + 4], ebx
mov eax, 0x104
lea esi, [esp + 0x10]
mov dword [esp + 8], eax
mov dword [esp], esi
call sub.msvcrt.dll__fullpath
mov ecx, esi
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [ecx]
add ecx, 4
lea edx, [ebx - 0x1010101]
not ebx
and edx, ebx
mov eax, edx
and eax, 0x80808080
je 0x4b7330
and edx, 0x8080
jne 0x4b7356
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + 0x233]
mov dword [esp], edx
call sub.msvcrt.dll_malloc
test eax, eax
mov ebx, eax
je 0x4b74cb
mov dword [esp + 4], esi
lea esi, [eax + 0x22c]
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
cmp byte [ebx + 0x22c], 0
je 0x4b7450
mov dword [esp], esi
mov ecx, 0x2f
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strrchr
mov edi, eax
mov ecx, esi
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
mov eax, edx
and eax, 0x80808080
je 0x4b73b0
and edx, 0x8080
jne 0x4b73d6
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + ebx + 0x22b]
cmp edi, edx
je 0x4b7450
mov dword [esp], esi
mov edi, 0x5c
mov dword [esp + 4], edi
call sub.msvcrt.dll_strrchr
mov edi, eax
mov ecx, esi
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
mov eax, edx
and eax, 0x80808080
je 0x4b7400
and edx, 0x8080
jne 0x4b7426
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + ebx + 0x22b]
cmp edi, edx
je 0x4b7450
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov word [eax + esi], 0x5c
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
mov edi, 0xffffffff
call sub.msvcrt.dll_strlen
mov word [eax + esi], 0x2a
xor ecx, ecx
xor esi, esi
mov dword [ebx + 0x224], edi
xor edx, edx
xor eax, eax
mov dword [ebx + 0x228], ecx
mov edi, 0x104
xor ecx, ecx
mov dword [ebx + 0x118], esi
lea esi, [ebx + 0x120]
mov word [ebx + 0x11c], dx
mov word [ebx + 0x11e], ax
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memset
add esp, 0x120
mov eax, ebx
pop ebx
pop esi
pop edi
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0x14
xor eax, eax
add esp, 0x120
pop ebx
pop esi
pop edi
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x4b74c1
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x4b74c1
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x4b74c1
push edi
push esi
push ebx
sub esp, 0x340
mov esi, dword [esp + 0x350]
call sub.msvcrt.dll__errno
mov dword [eax], 0
test esi, esi
je 0x4b7a55
cmp word [esi], 0
je 0x4b7a20
mov edx, dword [sym.imp.msvcrt.dll__osver]
mov eax, dword [edx]
and eax, 0x8000
test ax, ax
jne 0x4b7962
mov dword [esp], esi
call sub.KERNEL32.DLL_GetFileAttributesW
sub esp, 4
cmp eax, 0xffffffff
je 0x4b7a46
test al, 0x10
je 0x4b7a20
mov dword [esp + 4], esi
mov edi, 0x104
mov dword [esp + 8], edi
lea edi, [esp + 0x130]
mov dword [esp], edi
call sub.msvcrt.dll__wfullpath
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x6659a0
mov ebx, eax
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x6659a4
add ebx, eax
call sub.msvcrt.dll_wcslen
lea ecx, [ebx + eax]
lea esi, [ecx + ecx + 0x43a]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x4b7a37
mov dword [esp + 4], edi
lea edi, [eax + 0x434]
mov dword [esp], edi
call sub.msvcrt.dll_wcscpy
cmp word [esi + 0x434], 0
jne 0x4b79b0
mov dword [esp], edi
mov eax, 0x6659a4
mov ebx, 0xffffffff
mov dword [esp + 4], eax
xor edi, edi
call sub.msvcrt.dll_wcscat
mov dword [esi + 0x42c], ebx
xor ecx, ecx
xor edx, edx
mov dword [esi + 0x430], ecx
xor eax, eax
mov ebx, 0x104
mov dword [esi + 0x21c], edi
xor ecx, ecx
lea edi, [esi + 0x224]
mov word [esi + 0x220], dx
mov word [esi + 0x222], ax
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memset
add esp, 0x340
mov eax, esi
pop ebx
pop esi
pop edi
ret
mov dword [esp + 8], esi
xor ebx, ebx
xor edx, edx
mov dword [esp + 0x1c], ebx
mov ecx, 0xffffffff
lea ebx, [esp + 0x20]
mov dword [esp + 0x18], edx
mov eax, 0x104
xor edi, edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edi
mov dword [esp + 0x14], eax
mov dword [esp], 0
call sub.KERNEL32.DLL_WideCharToMultiByte
sub esp, 0x20
mov dword [esp], ebx
call sub.KERNEL32.DLL_GetFileAttributesA
jmp 0x4b786b
mov dword [esp], edi
mov edx, 0x2f
mov dword [esp + 4], edx
call sub.msvcrt.dll_wcsrchr
mov dword [esp], edi
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax*2 + 0x432]
cmp ebx, eax
je 0x4b78fb
mov dword [esp], edi
mov eax, 0x5c
mov dword [esp + 4], eax
call sub.msvcrt.dll_wcsrchr
mov dword [esp], edi
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea ecx, [esi + eax*2 + 0x432]
cmp ebx, ecx
je 0x4b78fb
mov dword [esp], edi
mov edx, 0x6659a0
mov dword [esp + 4], edx
call sub.msvcrt.dll_wcscat
jmp 0x4b78fb
call sub.msvcrt.dll__errno
mov dword [eax], 0x14
xor eax, eax
add esp, 0x340
pop ebx
pop esi
pop edi
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x4b7a2d
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x4b7a2d
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x4b7a2d