Function at 0x401e80
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ec82
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x4140b0]
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]
xor edi, edi
push 0x208
mov ebx, ecx
lea edx, [ebp - 0x21a]
xor ecx, ecx
push edi
push edx
mov dword [ebp - 0x290], eax
mov dword [ebp - 0x294], edi
mov word [ebp - 0x21c], cx
call fcn.00405de0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x21c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
xor edx, edx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x238], dx
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401f21
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x238]
call fcn.00402930
lea eax, [ebp - 0x28c]
add ebx, 0x10
push eax
mov dword [ebp - 4], edi
call fcn.00402310
add esp, 4
mov ecx, eax
lea eax, [ebp - 0x254]
mov byte [ebp - 4], 1
call fcn.004023c0
push 0
push eax
or eax, 0xffffffff
mov byte [ebp - 4], 2
call fcn.00402220
mov esi, 8
cmp dword [ebp - 0x240], esi
jb 0x401f93
mov ecx, dword [ebp - 0x254]
push ecx
call fcn.00404c39
add esp, 4
xor edx, edx
mov edi, 7
mov byte [ebp - 4], dl
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x244], 0
mov word [ebp - 0x254], dx
cmp dword [ebp - 0x278], esi
jb 0x401fcb
mov eax, dword [ebp - 0x28c]
push eax
call fcn.00404c39
add esp, 4
mov eax, dword [ebp - 0x238]
cmp dword [ebp - 0x224], esi
jae 0x401fdf
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402018
mov eax, dword [ebp - 0x290]
mov dword [eax + 0x14], edi
xor ecx, ecx
mov dword [eax + 0x10], 0
lea edi, [ebp - 0x238]
mov esi, eax
mov word [eax], cx
call fcn.004021b0
cmp dword [ebp - 0x224], 8
jmp 0x40213e
xor eax, eax
mov word [ebp - 0x270], ax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], 0
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402040
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x270]
call fcn.00402930
lea ecx, [ebp - 0x28c]
push ecx
mov byte [ebp - 4], 3
call fcn.00402310
add esp, 4
mov ecx, eax
lea eax, [ebp - 0x254]
mov byte [ebp - 4], 4
call fcn.004023c0
xor edi, edi
push edi
push eax
or eax, 0xffffffff
mov byte [ebp - 4], 5
call fcn.00402220
mov ebx, 8
cmp dword [ebp - 0x240], ebx
jb 0x4020b1
mov edx, dword [ebp - 0x254]
push edx
call fcn.00404c39
add esp, 4
xor eax, eax
mov esi, 7
mov byte [ebp - 4], 3
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x244], edi
mov word [ebp - 0x254], ax
cmp dword [ebp - 0x278], ebx
jb 0x4020e6
mov ecx, dword [ebp - 0x28c]
push ecx
call fcn.00404c39
add esp, 4
mov eax, dword [ebp - 0x290]
mov dword [eax + 0x14], esi
mov dword [eax + 0x10], edi
xor edx, edx
lea edi, [ebp - 0x270]
mov esi, eax
mov word [eax], dx
call fcn.004021b0
cmp dword [ebp - 0x25c], ebx
jb 0x40211b
mov eax, dword [ebp - 0x270]
push eax
call fcn.00404c39
add esp, 4
xor ecx, ecx
cmp dword [ebp - 0x224], ebx
mov dword [ebp - 0x25c], 7
mov dword [ebp - 0x260], 0
mov word [ebp - 0x270], cx
jb 0x40214f
mov edx, dword [ebp - 0x238]
push edx
call fcn.00404c39
add esp, 4
mov eax, esi
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.00404c44
mov esp, ebp
pop ebp
ret 4