Function at 0x40e310
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x523f18
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x556358]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
mov ecx, edi
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x44], ebx
call fcn.0049cd4b
test al, al
jne 0x40e6d0
push str.r_add
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e3ba
cmp byte [esi + 0x534], 0
jne 0x40e6d0
push 0x2c
lea eax, [ebp - 0x3c]
mov byte [esi + 0x534], 1
push 0
push eax
call fcn.004e0850
add esp, 0xc
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
call fcn.0040e6f0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x38], 0
je 0x40e3ae
push 1
lea eax, [ebp - 0x3c]
mov ecx, esi
push eax
call fcn.0040ec00
mov byte [esi + 0x534], 0
jmp 0x40e48f
push str.r_menu_open
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e402
mov ecx, ebx
call fcn.0049cd4b
test al, al
jne 0x40e6d0
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0049cbf1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405730
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 1
push eax
mov ecx, esi
call fcn.0040ea70
jmp 0x40e48f
push str.r_menu_reload
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e4b3
mov ecx, ebx
call fcn.0049cd4b
test al, al
jne 0x40e6d0
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0049cbf1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405730
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 2
push eax
mov ecx, esi
call fcn.0040ee90
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40e469
lea ecx, [ebp - 0x30]
cmp eax, ecx
je 0x40e469
push eax
call fcn.004e4113
add esp, 4
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0049cbf1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405730
push 1
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 3
push eax
mov ecx, esi
call fcn.0040ec00
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40e6d0
lea ecx, [ebp - 0x30]
cmp eax, ecx
je 0x40e6d0
push eax
call fcn.004e4113
add esp, 4
jmp 0x40e6d0
push str.r_menu_unimage
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e4cf
mov ecx, ebx
call fcn.0049cd4b
jmp 0x40e6d0
push str.r_menu_uninstall_mount
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e521
mov ecx, ebx
call fcn.0049cd4b
test al, al
jne 0x40e6d0
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0049cbf1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405730
push 1
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 4
push eax
mov ecx, esi
call fcn.0040ee90
lea ecx, [ebp - 0x3c]
call fcn.00404130
jmp 0x40e6d0
push str.r_list_unmountall
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e53d
mov ecx, esi
call fcn.0040f100
jmp 0x40e6d0
push 0
push str.r_history_item_
mov ecx, edi
call fcn.0049c9b9
test eax, eax
js 0x40e5ec
mov ecx, ebx
call fcn.0049cd4b
test al, al
jne 0x40e6d0
mov ecx, ebx
call fcn.0049cbf1
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e6d0
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0049cbf1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405730
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 5
push eax
mov ecx, esi
call fcn.0040e960
test al, al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
sete bl
call fcn.00404130
test bl, bl
je 0x40e6d0
mov ecx, dword [ebp - 0x44]
push 0xffffffffffffffff
call fcn.0049cbf1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405730
push 1
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 6
push eax
mov ecx, esi
call fcn.0040ec00
lea ecx, [ebp - 0x3c]
call fcn.00404130
jmp 0x40e6d0
push str.r_list_clear_history
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e60c
lea ecx, [esi + 0x53c]
call fcn.00404ae0
jmp 0x40e6d0
push str.r_auto_image
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e66e
lea eax, [ebp - 0x44]
mov byte [ebp - 0x40], 0
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 0x44], 0
push eax
lea ecx, [esi + 0x53c]
call fcn.004050e0
cmp byte [ebp - 0x40], 0
lea ecx, [esi + 0x53c]
push dword [ebp - 0x44]
sete bl
mov byte [ebp - 0x40], bl
push dword [ebp - 0x40]
call fcn.004052b0
test bl, bl
je 0x40e65f
push 1
call fcn.0040f2d0
jmp 0x40e6d0
cmp byte [ebp - 0x44], 0
jne 0x40e6d0
push 0
call fcn.0040f2d0
jmp 0x40e6d0
push str.r_auto_start
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e6b9
lea eax, [ebp - 0x40]
mov byte [ebp - 0x44], 0
push eax
lea eax, [ebp - 0x44]
mov byte [ebp - 0x40], 0
lea edi, [esi + 0x53c]
push eax
mov ecx, edi
call fcn.004050e0
cmp byte [ebp - 0x40], 0
mov ecx, edi
sete byte [ebp - 0x40]
mov esi, dword [ebp - 0x40]
push esi
push dword [ebp - 0x44]
call fcn.004052b0
push esi
call fcn.0040f2d0
jmp 0x40e6d0
push str.r_exit
mov ecx, edi
call fcn.0049c727
test al, al
je 0x40e6d0
mov ecx, esi
call fcn.0040f490
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d7fbc
mov esp, ebp
pop ebp
ret 8