Function at 0x408021
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43d6fe
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x12f8
call fcn.0042a910
mov eax, dword [0x452800]
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 eax, 0x458370
lea esi, [ebp - 0x1298]
call fcn.00407982
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [0x458350], bl
je 0x408134
push dword [0x458388]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
je 0x408134
lea eax, [ebp - 0x450]
push eax
mov byte [ebp - 4], 1
push dword [0x458388]
mov dword [ebp - 0x450], ebx
mov dword [ebp - 0x44c], ebx
mov dword [ebp - 0x448], ebx
mov dword [ebp - 0x444], ebx
mov dword [ebp - 0x440], ebx
mov dword [ebp - 0x43c], ebx
call fcn.00418ff8
cmp eax, ebx
je 0x408134
mov dword [ebp - 4], ebx
push dword [0x458388]
lea eax, [ebp - 0x1290]
push eax
call fcn.00407900
lea eax, [ebp - 0xc72]
push eax
lea ecx, [ebp - 0x12a0]
call fcn.00402152
push 0x208
lea eax, [ebp - 0x220]
push ebx
push eax
mov byte [ebp - 4], 3
call fcn.00429440
lea eax, [ebp - 0x220]
add esp, 0xc
push eax
call fcn.00407e31
pop ecx
lea eax, [ebp - 0x220]
push eax
call esi
test eax, eax
jne 0x40815a
mov ecx, dword [ebp - 0x12a0]
add ecx, 0xfffffff0
call fcn.004023f6
push dword [ebp - 0x1298]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
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.004285ca
leave
ret
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x1294]
call fcn.00402152
push ecx
mov byte [ebp - 4], 4
lea eax, [ebp - 0x12a0]
mov dword [ebp - 0x129c], esp
mov ecx, esp
push eax
call fcn.00401f43
lea ecx, [ebp - 0x1294]
call fcn.00401568
lea eax, [ebp - 0x1294]
mov dword [esp], str..dat
push eax
lea eax, [ebp - 0x129c]
push eax
call fcn.004084ed
add esp, 0xc
push eax
lea ecx, [ebp - 0x1294]
mov byte [ebp - 4], 5
call fcn.00402410
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x129c]
add ecx, 0xfffffff0
call fcn.004023f6
push dword [ebp - 0x1294]
call esi
test eax, eax
jne 0x4081ee
mov ecx, dword [ebp - 0x1294]
add ecx, 0xfffffff0
call fcn.004023f6
jmp 0x408126
lea ecx, [ebp - 0x12b8]
mov byte [ebp - 4], 6
call fcn.004197ab
push ebx
push 0x8000
mov byte [ebp - 4], 7
push dword [ebp - 0x1294]
lea ecx, [ebp - 0x12b8]
call fcn.00419c1f
cmp eax, ebx
je 0x4082f7
push ebx
push 0x1000
push 1
lea eax, [ebp - 0x12b8]
push eax
lea ecx, [ebp - 0x1308]
call fcn.00418283
mov byte [ebp - 4], 8
call fcn.00409507
push eax
lea ecx, [ebp - 0x129c]
call fcn.00401f73
push ebx
call fcn.00429c57
pop ecx
mov dword [ebp - 0x12a8], eax
lea eax, [ebp - 0x129c]
push eax
lea ecx, [ebp - 0x1308]
mov dword [ebp - 0x12a4], edx
mov dword [ebp - 0x12c0], ebx
mov dword [ebp - 0x12bc], ebx
mov byte [ebp - 4], 0xa
call fcn.0040857d
lea eax, [ebp - 0x12c0]
push eax
lea ecx, [ebp - 0x1308]
call fcn.0040882f
lea eax, [ebp - 0x12a8]
push eax
lea eax, [ebp - 0x1308]
push eax
call fcn.00419fc1
push dword [0x458388]
lea ecx, [ebp - 0x129c]
call fcn.004019ac
cmp eax, ebx
jne 0x4082da
mov eax, dword [ebp - 0x438]
cmp eax, dword [ebp - 0x12c0]
jne 0x4082da
mov eax, dword [ebp - 0x434]
cmp eax, dword [ebp - 0x12bc]
je 0x40830b
mov ecx, dword [ebp - 0x129c]
add ecx, 0xfffffff0
call fcn.004023f6
lea ecx, [ebp - 0x1308]
mov byte [ebp - 4], 7
call fcn.00418245
lea ecx, [ebp - 0x12b8]
mov byte [ebp - 4], 6
call fcn.004198b3
jmp 0x4081db
mov eax, dword [ebp - 0x448]
cmp eax, dword [ebp - 0x12a8]
jne 0x4082da
mov eax, dword [ebp - 0x444]
cmp eax, dword [ebp - 0x12a4]
jne 0x4082da
lea eax, [ebp - 0x1308]
push eax
mov eax, dword [0x458354]
mov ecx, 0x458354
call dword [eax + 8]
lea ecx, [ebp - 0x1308]
call fcn.004180cc
lea ecx, [ebp - 0x12b8]
call fcn.00419745
mov dword [ebp - 4], 9
jmp 0x4082da