Function at 0x406390
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 0x3d
push 0x445dc8
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 0x406408
mov eax, dword [ebp - 0x48]
push eax
call fcn.00438d27
add esp, 4
cmp byte [ebp - 0x2d], 0
je 0x406420
cmp dword [ebp + 0x20], esi
jb 0x406591
mov ecx, dword [ebp + 0xc]
push ecx
jmp 0x406589
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 0x40646a
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 0x40648f
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 0x4064a8
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4064c3
push 0xffffffffffffffff
push edi
lea edx, [ebp - 0x2c]
push edx
mov ecx, ebx
call fcn.00402610
jmp 0x406529
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 0x406502
mov eax, dword [ebp - 0x80]
push eax
call fcn.00438d27
add esp, 4
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jae 0x40650d
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40655d
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 0x40653a
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 0x406559
mov eax, dword [ebp + 0xc]
push eax
call fcn.00438d27
add esp, 4
mov al, 1
jmp 0x406593
cmp dword [ebp - 0x14], esi
jb 0x40656e
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 0x406591
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