Function at 0x405980
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x450aa0
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x461194]
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 eax, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [ebp + 0x50]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], ecx
push 0xffffffffffffffff
xor edi, edi
push edi
mov dword [ebp - 4], 1
xor edx, edx
push eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x4c], 7
mov dword [ebp - 0x50], edi
mov word [ebp - 0x60], dx
call fcn.004030b0
push edi
lea eax, [ebx + 4]
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.00404eb0
xor ecx, ecx
push 0x10
mov eax, 0x45b5f8
lea esi, [ebp - 0x48]
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], edi
mov word [ebp - 0x44], cx
call fcn.00402fb0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x44]
mov esi, 8
cmp dword [ebp - 0x30], esi
jae 0x405a25
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp + 0x10]
call fcn.00408490
xor edx, edx
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], edi
mov word [ebp - 0x28], dx
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push edi
cmp dword [ebx + 0x58], edi
jne 0x405c58
lea esi, [ebx + 0x20]
push esi
lea eax, [ebp - 0x2c]
call fcn.004030b0
mov eax, dword [ebp - 0x18]
push 0x45b0d0
xor edi, edi
lea ecx, [ebp - 0x2c]
call fcn.00402de0
mov edi, 8
test eax, eax
jne 0x405b32
cmp dword [ebp - 0x14], edi
jb 0x405a8a
mov eax, dword [ebp - 0x28]
push eax
call fcn.00431205
add esp, 4
xor ebx, ebx
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], ebx
mov word [ebp - 0x28], cx
cmp dword [ebp - 0x30], edi
jb 0x405aae
mov edx, dword [ebp - 0x44]
push edx
call fcn.00431205
add esp, 4
xor eax, eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], ebx
mov word [ebp - 0x44], ax
cmp dword [ebp - 0x4c], edi
jb 0x405acb
mov ecx, dword [ebp - 0x60]
push ecx
call fcn.00431205
add esp, 4
xor edx, edx
mov dword [ebp - 0x4c], esi
mov word [ebp - 0x60], dx
mov byte [ebp - 4], bl
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x50], ebx
cmp eax, ebx
je 0x405aff
test al, 1
jne 0x405afc
and eax, 0xfffffffe
mov eax, dword [eax]
cmp eax, ebx
je 0x405afc
lea ecx, [ebp + 0x18]
push 2
push ecx
mov edx, ecx
push edx
call eax
add esp, 0xc
mov dword [ebp + 0x10], ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x30]
cmp eax, ebx
je 0x405b28
test al, 1
jne 0x405b28
and eax, 0xfffffffe
mov eax, dword [eax]
cmp eax, ebx
je 0x405b28
lea ecx, [ebp + 0x38]
push 2
push ecx
mov edx, ecx
push edx
call eax
add esp, 0xc
mov eax, 2
jmp 0x405dd5
cmp dword [esi + 0x18], edi
jb 0x405b3c
mov eax, dword [esi + 4]
jmp 0x405b3f
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405b5c
cmp dword [esi + 0x18], edi
jb 0x405b54
mov ecx, dword [esi + 4]
jmp 0x405b57
lea ecx, [esi + 4]
call fcn.0040a000
push 1
push 0x45b61c
lea eax, [ebp - 0x2c]
call fcn.00406a20
mov esi, edi
xor edi, edi
cmp dword [ebx + 0x6c], edi
je 0x405cde
push 0x45b620
lea ecx, [ebp + 0x10]
call fcn.00408490
cmp dword [ebx + 0x58], edi
jne 0x405b98
push esi
push 0x45b644
lea eax, [ebp - 0x2c]
call fcn.00406a20
mov edx, dword [ebp - 0x6c]
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00406750
cmp dword [ebp - 0x14], esi
jb 0x405bb5
mov eax, dword [ebp - 0x28]
push eax
call fcn.00431205
add esp, 4
xor ecx, ecx
mov ebx, 7
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], edi
mov word [ebp - 0x28], cx
cmp dword [ebp - 0x30], esi
jb 0x405bd7
mov edx, dword [ebp - 0x44]
push edx
call fcn.00431205
add esp, 4
xor eax, eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], edi
mov word [ebp - 0x44], ax
cmp dword [ebp - 0x4c], esi
jb 0x405bf4
mov ecx, dword [ebp - 0x60]
push ecx
call fcn.00431205
add esp, 4
xor edx, edx
mov byte [ebp - 4], dl
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], edi
mov word [ebp - 0x60], dx
cmp eax, edi
je 0x405c28
test al, 1
jne 0x405c25
and eax, 0xfffffffe
mov eax, dword [eax]
cmp eax, edi
je 0x405c25
lea ecx, [ebp + 0x18]
push 2
push ecx
mov edx, ecx
push edx
call eax
add esp, 0xc
mov dword [ebp + 0x10], edi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x30]
cmp eax, edi
je 0x405c51
test al, 1
jne 0x405c51
and eax, 0xfffffffe
mov eax, dword [eax]
cmp eax, edi
je 0x405c51
lea ecx, [ebp + 0x38]
push 2
push ecx
mov edx, ecx
push edx
call eax
add esp, 0xc
xor eax, eax
jmp 0x405dd5
lea eax, [ebx + 0x3c]
push eax
lea eax, [ebp - 0x2c]
call fcn.004030b0
mov eax, dword [ebp - 0x18]
push 0x45b0d0
xor edi, edi
lea ecx, [ebp - 0x2c]
call fcn.00402de0
test eax, eax
jne 0x405b6d
cmp dword [ebp - 0x14], esi
jb 0x405c8f
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00431205
add esp, 4
xor ebx, ebx
xor edx, edx
mov edi, 7
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
mov word [ebp - 0x28], dx
cmp dword [ebp - 0x30], esi
jb 0x405cb3
mov eax, dword [ebp - 0x44]
push eax
call fcn.00431205
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], ebx
mov word [ebp - 0x44], cx
cmp dword [ebp - 0x4c], esi
jb 0x405cd0
mov edx, dword [ebp - 0x60]
push edx
call fcn.00431205
add esp, 4
xor eax, eax
mov dword [ebp - 0x4c], edi
mov word [ebp - 0x60], ax
jmp 0x405ad4
mov eax, dword [ebp - 0x68]
push eax
sub esp, 0x20
lea ecx, [ebp + 0x30]
mov esi, esp
mov dword [ebp - 0x68], esp
call fcn.00404df0
sub esp, 0x20
lea ecx, [ebp + 0x10]
mov esi, esp
mov byte [ebp - 4], 5
mov dword [ebp - 0x6c], esp
call fcn.00404df0
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x64]
push eax
mov ecx, ebx
mov byte [ebp - 4], 4
call fcn.00405e00
mov ebx, 8
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x14], ebx
jb 0x405d36
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00431205
add esp, 4
xor edx, edx
mov esi, 7
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], edi
mov word [ebp - 0x28], dx
cmp dword [ebp - 0x30], ebx
jb 0x405d58
mov eax, dword [ebp - 0x44]
push eax
call fcn.00431205
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], edi
mov word [ebp - 0x44], cx
cmp dword [ebp - 0x4c], ebx
jb 0x405d75
mov edx, dword [ebp - 0x60]
push edx
call fcn.00431205
add esp, 4
xor eax, eax
mov word [ebp - 0x60], ax
mov byte [ebp - 4], al
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x50], edi
cmp eax, edi
je 0x405da9
test al, 1
jne 0x405da6
and eax, 0xfffffffe
mov eax, dword [eax]
cmp eax, edi
je 0x405da6
lea ecx, [ebp + 0x18]
push 2
push ecx
mov edx, ecx
push edx
call eax
add esp, 0xc
mov dword [ebp + 0x10], edi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x30]
cmp eax, edi
je 0x405dd2
test al, 1
jne 0x405dd2
and eax, 0xfffffffe
mov eax, dword [eax]
cmp eax, edi
je 0x405dd2
lea ecx, [ebp + 0x38]
push 2
push ecx
mov edx, ecx
push edx
call eax
add esp, 0xc
mov eax, dword [ebp - 0x68]
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.00430e4c
mov esp, ebp
pop ebp
ret 0x4c