Function at 0x405390
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44315f
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x10344
call fcn.00424ef0
mov eax, dword [0x459054]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x228], 0xf
mov dword [ebp - 0x22c], 0
mov byte [ebp - 0x23c], 0
cmp dword [edi + 0x260], 8
lea esi, [edi + 0x24c]
mov dword [ebp - 4], 0
jb 0x4053fd
mov eax, dword [esi]
jmp 0x4053ff
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40586b
lea eax, [ebp - 0x23c]
push eax
push esi
call fcn.0040c210
add esp, 8
test eax, eax
je 0x40586b
cmp dword [ebp - 0x22c], 0
je 0x40586b
push 0x10044
lea eax, [ebp - 0x1033c]
push 0
push eax
call fcn.00427f80
add esp, 0xc
lea ecx, [ebp - 0x1033c]
call fcn.00404610
cmp dword [ebp - 0x228], 0x10
lea eax, [ebp - 0x23c]
lea ecx, [ebp - 0x1033c]
mov byte [ebp - 4], 2
cmovae eax, dword [ebp - 0x23c]
push eax
call fcn.00402810
push 1
push 0
push str.list
lea ecx, [ebp - 0x1033c]
mov dword [ebp - 4], 1
call fcn.00408850
mov esi, eax
test esi, esi
jne 0x4054b8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1030c]
call fcn.00408690
lea ecx, [ebp - 0x23c]
call fcn.00404a40
jmp 0x405889
mov dword [ebp - 0x240], 0xf
mov dword [ebp - 0x244], 0
mov byte [ebp - 0x254], 0
lea eax, [ebp - 0x254]
mov byte [ebp - 4], 6
push eax
push 0x445490
push esi
call fcn.0040c430
add esp, 0xc
lea eax, [ebp - 0x254]
push eax
call fcn.00401570
mov ecx, eax
call fcn.00409e00
push 0x105
lea eax, [ebp - 0x224]
push 0
push eax
call fcn.00427f80
add esp, 0xc
lea eax, [ebp - 0x224]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push 1
push 0
push str.Item
mov ecx, esi
call fcn.00408850
mov esi, eax
test esi, esi
je 0x4057ec
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov dword [ebp - 0x2d0], 0xf
mov dword [ebp - 0x2d4], 0
mov byte [ebp - 0x2e4], 0
mov dword [ebp - 0x2b8], 0xf
mov dword [ebp - 0x2bc], 0
mov byte [ebp - 0x2cc], 0
mov dword [ebp - 0x2a0], 0xf
mov dword [ebp - 0x2a4], 0
mov byte [ebp - 0x2b4], 0
mov dword [ebp - 0x288], 0xf
mov dword [ebp - 0x28c], 0
mov byte [ebp - 0x29c], 0
mov dword [ebp - 0x2ec], 0xff
mov dword [ebp - 0x2f8], 0
mov dword [ebp - 0x2e8], 1
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x2f0], 0
lea eax, [ebp - 0x2f8]
mov byte [ebp - 4], 7
push eax
push 0x44549c
push esi
call fcn.0040c3f0
add esp, 0xc
cmp dword [ebp - 0x2f8], 0
je 0x4057c7
lea eax, [ebp - 0x2b4]
push eax
push str.name
push esi
call fcn.0040c430
lea eax, [ebp - 0x2e4]
push eax
push 0x445440
push esi
call fcn.0040c430
lea eax, [ebp - 0x2cc]
push eax
push 0x445444
push esi
call fcn.0040c430
cmp dword [ebp - 0x2a0], 0x10
lea eax, [ebp - 0x2b4]
cmovae eax, dword [ebp - 0x2b4]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0040ccc0
push 0x105
lea eax, [ebp - 0x11c]
push 0
push eax
call fcn.00427f80
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x11c]
push 0x105
push eax
call fcn.0042b761
add esp, 0x44
lea eax, [ebp - 0x11c]
push eax
call ebx
cmp dword [ebp - 0x258], 0x10
lea eax, [ebp - 0x26c]
cmovae eax, dword [ebp - 0x26c]
push eax
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40578e
mov dword [ebp - 0x270], 0xf
mov dword [ebp - 0x274], 0
mov byte [ebp - 0x284], 0
lea eax, [ebp - 0x11c]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x10354]
call fcn.004044c0
push 0
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x10354]
push eax
call fcn.0040bb60
add esp, 0xc
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x10354]
call fcn.00404a40
cmp dword [ebp - 0x2d0], 0x10
lea ecx, [ebp - 0x2e4]
lea eax, [ebp - 0x284]
cmovae ecx, dword [ebp - 0x2e4]
cmp dword [ebp - 0x270], 0x10
push ecx
cmovae eax, dword [ebp - 0x284]
push eax
call fcn.0042b879
add esp, 8
test eax, eax
jne 0x405783
lea eax, [ebp - 0x2f8]
push eax
lea ecx, [edi + 0x264]
call fcn.004089c0
lea ecx, [ebp - 0x284]
call fcn.00404a40
mov eax, dword [ebp - 0x258]
cmp eax, 0x10
jb 0x4057ac
inc eax
lea ecx, [ebp - 0x26c]
push eax
push dword [ebp - 0x26c]
call fcn.00410c60
mov dword [ebp - 0x258], 0xf
mov dword [ebp - 0x25c], 0
mov byte [ebp - 0x26c], 0
lea ecx, [ebp - 0x2f8]
call fcn.00404c50
push 1
push 0
push str.Item
mov ecx, esi
call fcn.004088d0
mov esi, eax
test esi, esi
jne 0x405556
mov eax, dword [ebp - 0x240]
cmp eax, 0x10
jb 0x40580a
inc eax
lea ecx, [ebp - 0x254]
push eax
push dword [ebp - 0x254]
call fcn.00410c60
mov dword [ebp - 0x240], 0xf
mov dword [ebp - 0x244], 0
mov byte [ebp - 0x254], 0
lea ecx, [ebp - 0x1030c]
mov byte [ebp - 4], 0xb
call fcn.00408690
mov eax, dword [ebp - 0x228]
cmp eax, 0x10
jb 0x405852
inc eax
lea ecx, [ebp - 0x23c]
push eax
push dword [ebp - 0x23c]
call fcn.00410c60
mov eax, 1
jmp 0x40588b
mov eax, dword [ebp - 0x228]
cmp eax, 0x10
jb 0x405889
inc eax
lea ecx, [ebp - 0x23c]
push eax
push dword [ebp - 0x23c]
call fcn.00410c60
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00424ea2
mov esp, ebp
pop ebp
ret