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

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x6cde70], 0
mov eax, dword [ebp + 8]
je 0x46e8b4
push eax
call fcn.0047191b
pop edx
mov dword [ebp + 8], eax
leave
jmp 0x476590
push eax
call fcn.00471901
pop ecx
mov dword [ebp + 8], eax
leave
jmp 0x476030
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 0x476259
cmp byte [ebx], 0
je 0x476224
mov dword [esp], ebx
call sub.KERNEL32.DLL_GetFileAttributesA
sub esp, 4
cmp eax, 0xffffffff
je 0x47624a
test al, 0x10
je 0x476224
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 0x4760a0
and edx, 0x8080
jne 0x4760c6
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 0x47623b
mov dword [esp + 4], esi
lea esi, [eax + 0x22c]
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
cmp byte [ebx + 0x22c], 0
je 0x4761c0
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 0x476120
and edx, 0x8080
jne 0x476146
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + ebx + 0x22b]
cmp edi, edx
je 0x4761c0
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 0x476170
and edx, 0x8080
jne 0x476196
shr eax, 0x10
add ecx, 2
add al, al
sbb ecx, 3
sub ecx, esi
lea edx, [ecx + ebx + 0x22b]
cmp edi, edx
je 0x4761c0
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 0x476231
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x476231
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x476231
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 0x4767c5
cmp word [esi], 0
je 0x476790
mov edx, dword [sym.imp.msvcrt.dll__osver]
mov eax, dword [edx]
and eax, 0x8000
test ax, ax
jne 0x4766d2
mov dword [esp], esi
call sub.KERNEL32.DLL_GetFileAttributesW
sub esp, 4
cmp eax, 0xffffffff
je 0x4767b6
test al, 0x10
je 0x476790
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], 0x6bdd60
mov ebx, eax
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x6bdd64
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 0x4767a7
mov dword [esp + 4], edi
lea edi, [eax + 0x434]
mov dword [esp], edi
call sub.msvcrt.dll_wcscpy
cmp word [esi + 0x434], 0
jne 0x476720
mov dword [esp], edi
mov eax, 0x6bdd64
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 0x4765db
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 0x47666b
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 0x47666b
mov dword [esp], edi
mov edx, 0x6bdd60
mov dword [esp + 4], edx
call sub.msvcrt.dll_wcscat
jmp 0x47666b
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 0x47679d
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x47679d
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x47679d