Function at 0x405f50
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x441783
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x452284]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 4], eax
push 0x3a
push 0x445d4c
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x48], al
call fcn.00402850
push ebx
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.00406d20
test eax, eax
mov esi, 0x10
sete byte [ebp - 0x2d]
mov byte [ebp - 4], 0
cmp dword [ebp - 0x34], esi
jb 0x405fc8
mov eax, dword [ebp - 0x48]
push eax
call fcn.00438d27
add esp, 4
cmp byte [ebp - 0x2d], 0
je 0x405fe0
cmp dword [ebp + 0x20], esi
jb 0x406151
mov ecx, dword [ebp + 0xc]
push ecx
jmp 0x406149
push ebx
mov edi, 0x445a48
lea esi, [ebp - 0x68]
call fcn.0040fcc0
lea edx, [ebp + 8]
push edx
push eax
lea edi, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.0040fd60
push eax
mov edi, str._resources.pak
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.0040fcc0
add esp, 0x10
mov esi, 0x10
cmp dword [ebp - 0x34], esi
jb 0x40602a
mov eax, dword [ebp - 0x48]
push eax
call fcn.00438d27
add esp, 4
xor edi, edi
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], edi
mov byte [ebp - 0x48], 0
mov byte [ebp - 4], 6
cmp dword [ebp - 0x50], esi
jb 0x40604f
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00438d27
add esp, 4
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], edi
mov byte [ebp - 0x64], 0
cmp dword [ebp - 0x14], esi
jae 0x406068
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x406083
push 0xffffffffffffffff
push edi
lea edx, [ebp - 0x2c]
push edx
mov ecx, ebx
call fcn.00402610
jmp 0x4060e9
push ebx
mov edi, str._resources.pak
lea esi, [ebp - 0x84]
call fcn.0040fcc0
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call fcn.00402610
mov esi, 0x10
mov byte [ebp - 4], 6
cmp dword [ebp - 0x6c], esi
jb 0x4060c2
mov eax, dword [ebp - 0x80]
push eax
call fcn.00438d27
add esp, 4
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jae 0x4060cd
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40611d
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, ebx
call fcn.00402610
xor edi, edi
cmp dword [ebp - 0x14], esi
jb 0x4060fa
mov edx, dword [ebp - 0x28]
push edx
call fcn.00438d27
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], edi
mov byte [ebp - 0x28], 0
cmp dword [ebp + 0x20], esi
jb 0x406119
mov eax, dword [ebp + 0xc]
push eax
call fcn.00438d27
add esp, 4
mov al, 1
jmp 0x406153
cmp dword [ebp - 0x14], esi
jb 0x40612e
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00438d27
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp dword [ebp + 0x20], esi
jb 0x406151
mov edx, dword [ebp + 0xc]
push edx
call fcn.00438d27
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00425608
mov esp, ebp
pop ebp
ret 0x1c