Function at 0x46b9d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x644a10]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x1c]
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ecx
cmp esi, ebx
je 0x46bb23
cmp word [esi], bx
je 0x46bb23
push esi
mov dword [ebp - 8], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x46ba19
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x46bc9c
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x46ba3a
push esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x46ba65
xor eax, eax
jmp 0x46ba7b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x46ba61
lea edi, [eax + eax]
mov eax, edi
call fcn.005b2670
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.0046b8d0
mov ebx, eax
xor eax, eax
jmp 0x46ba7b
lea edi, [eax + eax]
mov eax, edi
call fcn.005b2670
mov eax, esp
push 3
push edi
push esi
push eax
call fcn.0046b8d0
mov edi, dword [ebp + 8]
push ebx
push eax
push edi
call fcn.0047b8b0
add esp, 0xc
test eax, eax
jne 0x46ba9c
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x46bc9c
push edi
call fcn.0047b820
add esp, 4
test eax, eax
jne 0x46babb
push 0x65b
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x46bc9c
mov eax, dword [ebp - 0xc]
cmp dword [eax + 8], 1
jne 0x46bb23
test byte [ebp + 0xc], 1
je 0x46bb23
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x46bb23
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x46bae4
xor eax, eax
jmp 0x46bafa
lea esi, [eax + eax]
mov eax, esi
call fcn.005b2670
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.0046b8d0
push eax
call fcn.00481a30
add esp, 4
test eax, eax
jne 0x46bb19
push 0x10d2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x46bc9c
push eax
push edi
call fcn.00481610
add esp, 8
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x46bc97
cmp word [esi], 0
je 0x46bc97
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46ba0a
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x46ba0a
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x46ba0a
cmp word [ebx], ax
je 0x46ba0a
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46ba0a
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x46ba0a
mov edi, dword [ebp + 0x18]
push edi
call fcn.0044bc60
add esp, 4
test eax, eax
je 0x46bbf5
test edi, edi
jne 0x46bbad
mov edi, dword [ebp + 8]
xor eax, eax
push eax
push edi
call fcn.004e26f0
add esp, 8
jmp 0x46bbf8
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x46bbcd
mov edi, dword [ebp + 8]
xor eax, eax
push eax
push edi
call fcn.004e26f0
add esp, 8
jmp 0x46bbf8
lea esi, [eax + eax]
mov eax, esi
call fcn.005b2670
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.0046b8d0
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
push eax
push edi
call fcn.004e26f0
add esp, 8
jmp 0x46bbf8
mov edi, dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x46bc0b
xor eax, eax
jmp 0x46bc24
lea esi, [eax + eax]
mov eax, esi
call fcn.005b2670
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.0046b8d0
mov esi, dword [ebp + 0x10]
push 1
push eax
push edi
call fcn.0047fad0
add esp, 0xc
test eax, eax
jne 0x46bc40
push 0x56
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x46bc9c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x46bc53
xor eax, eax
jmp 0x46bc6c
lea esi, [eax + eax]
mov eax, esi
call fcn.005b2670
mov ecx, dword [ebp + 0x10]
mov eax, esp
push 3
push esi
push ecx
push eax
call fcn.0046b8d0
push eax
push edi
call fcn.00481020
add esp, 8
test eax, eax
je 0x46ba8d
push edi
call fcn.00479280
add esp, 4
test eax, eax
jne 0x46bc97
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x46bc9c
mov eax, 1
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2129
mov esp, ebp
pop ebp
ret 0x18