Function at 0x406220
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x475f31
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x490d68]
xor eax, esp
mov dword [esp + 0x824], eax
push ebx
push edi
mov eax, dword [0x490d68]
xor eax, esp
push eax
lea eax, [esp + 0x838]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x10], edi
test edi, edi
je 0x40633d
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call ebx
test eax, eax
je 0x40633d
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406283
sub eax, edx
sar eax, 1
cmp eax, 0x200
jae 0x40633d
push 0x800
lea eax, [esp + 0x30]
push 0
push eax
call fcn.00457170
add esp, 0xc
push 0x400
lea ecx, [esp + 0x30]
push edi
push ecx
call fcn.0045810b
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x14]
push eax
mov edi, str.version1.0_encodingutf_16
call fcn.00404230
lea ecx, [esp + 0x10]
mov dword [esp + 0x840], 0
mov edi, dword [esp + 0x10]
push ecx
call fcn.00404230
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
mov byte [esp + 0x84c], 1
call fcn.0040aff0
lea edi, [esp + 0x10]
call fcn.004042d0
lea edi, [esp + 0x14]
mov byte [esp + 0x840], 4
call fcn.004042d0
cmp dword [esp + 0x1c], 0
jne 0x406344
lea ecx, [esp + 0x18]
call fcn.0040acb0
xor eax, eax
jmp 0x406494
mov ecx, dword [esi + 0x154]
lea edx, [esp + 0x2c]
push edx
push esi
lea edx, [esp + 0x20]
call fcn.004064c0
mov eax, dword [esi + 0x120]
push eax
call ebx
test eax, eax
jne 0x406373
mov eax, dword [esi + 0x158]
push eax
call ebx
test eax, eax
je 0x406334
mov eax, dword [esi + 0x12c]
push eax
call ebx
test eax, eax
jne 0x40638d
mov eax, dword [esi + 0x164]
push eax
call ebx
test eax, eax
je 0x406334
mov eax, dword [esi + 0x124]
push eax
call ebx
test eax, eax
jne 0x4063a7
mov eax, dword [esi + 0x15c]
push eax
call ebx
test eax, eax
je 0x406334
mov eax, dword [esi + 0x128]
push eax
call ebx
test eax, eax
jne 0x4063c5
mov eax, dword [esi + 0x160]
push eax
call ebx
test eax, eax
je 0x406334
mov eax, dword [esi + 0x120]
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 4]
lea edi, [esi + 8]
push eax
push edi
call edx
test eax, eax
jne 0x4063eb
mov ecx, dword [esi + 0x158]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push edi
call edx
mov eax, dword [esi + 0x12c]
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
lea edi, [esi + 0x2c]
push eax
push edi
call edx
test eax, eax
jne 0x40640f
mov ecx, dword [esi + 0x164]
mov eax, dword [edi]
mov edx, dword [eax]
push ecx
push edi
call edx
mov eax, dword [esi + 0x124]
test eax, eax
je 0x406439
mov ecx, dword [esi + 0x7c]
mov edx, dword [ecx + 4]
lea edi, [esi + 0x7c]
push eax
push edi
call edx
test eax, eax
jne 0x406439
mov ecx, dword [esi + 0x15c]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push edi
call edx
mov ecx, dword [esi + 0x128]
push esi
call fcn.004084f0
test eax, eax
jne 0x406455
mov ecx, dword [esi + 0x160]
push esi
call fcn.004084f0
lea eax, [esp + 0x18]
push eax
push esi
call fcn.004071e0
lea ecx, [esp + 0x18]
push ecx
push esi
call fcn.00407490
mov ecx, esi
call fcn.00407b40
push esi
lea ecx, [esp + 0x1c]
call fcn.00407680
push esi
lea ecx, [esp + 0x1c]
call fcn.00407fa0
lea ecx, [esp + 0x18]
call fcn.0040acb0
mov eax, 1
mov ecx, dword [esp + 0x838]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x824]
xor ecx, esp
call fcn.0045715c
mov esp, ebp
pop ebp
ret