Function at 0x405ce1
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x608
lea ebp, [esp - 4]
mov eax, dword [0x41001c]
xor eax, ebp
mov dword [ebp + 0x608], eax
push 0x20
mov eax, 0x409d88
call fcn.004091e6
mov eax, dword [0x410e34]
mov edx, dword [eax - 0xc]
mov esi, ecx
mov eax, dword [esi]
cmp dword [eax - 0xc], edx
mov dword [ebp - 0x2c], esi
jle 0x405f1c
mov ecx, dword [eax - 0xc]
lea eax, [ebp - 0x20]
push eax
sub ecx, edx
push esi
call fcn.004062d9
xor ebx, ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00403220
mov byte [ebp - 4], 1
xor eax, eax
mov esi, 0x1fe
lea edi, [ebp + 0x602]
push esi
mov word [ebp + 0x600], bx
stosd dword es:[edi], eax
lea eax, [ebp + 0x402]
push ebx
push eax
mov word [ebp + 0x400], bx
call sub.MSVCR80.dll_memset
push esi
lea eax, [ebp + 2]
push ebx
push eax
mov word [ebp], bx
call sub.MSVCR80.dll_memset
push esi
lea eax, [ebp + 0x202]
push ebx
push eax
mov word [ebp + 0x200], bx
call sub.MSVCR80.dll_memset
mov esi, pe_nt_image_headers32
push esi
lea eax, [ebp + 0x200]
push eax
push esi
lea eax, [ebp]
push eax
push esi
lea eax, [ebp + 0x400]
push eax
push 3
lea eax, [ebp + 0x600]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.MSVCR80.dll__wsplitpath_s]
add esp, 0x48
lea eax, [ebp - 0x28]
push eax
lea edi, [ebp]
call fcn.004025fb
mov byte [ebp - 4], 2
lea eax, [ebp - 0x14]
push eax
lea edi, [ebp + 0x200]
call fcn.004025fb
mov byte [ebp - 4], 3
push 0x28
push dword [ebp - 0x14]
call dword [sym.imp.MSVCR80.dll_wcsrchr]
cmp eax, ebx
pop ecx
pop ecx
je 0x405e25
sub eax, dword [ebp - 0x14]
sar eax, 1
cmp eax, 0xffffffff
je 0x405e25
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x14]
push ecx
mov ecx, eax
call fcn.004062d9
mov byte [ebp - 4], 4
lea edi, [ebp - 0x14]
call fcn.0040267e
mov byte [ebp - 4], 3
lea eax, [ebp - 0x18]
push eax
call fcn.00402659
push dword [ebp - 0x14]
lea eax, [ebp + 0x400]
push dword [ebp - 0x28]
push eax
lea eax, [ebp + 0x600]
push eax
push str._s_s_s_s
lea eax, [ebp - 0x1c]
call fcn.00406407
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x14
push dword [ebp - 0x1c]
call edi
test eax, eax
je 0x405ebe
lea eax, [ebp - 0x18]
push eax
call fcn.004025cc
mov byte [ebp - 4], 5
mov dword [ebp - 0x24], 1
push dword [ebp - 0x14]
lea eax, [ebp + 0x400]
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push eax
lea eax, [ebp + 0x600]
push eax
push str._s_s_s__d__s
lea eax, [ebp - 0x18]
call fcn.00406407
add esp, 0x18
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x405ea6
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], esi
jl 0x405e6c
jmp 0x405eb1
lea eax, [ebp - 0x18]
lea edi, [ebp - 0x1c]
call fcn.0040267e
mov byte [ebp - 4], 3
lea eax, [ebp - 0x18]
push eax
call fcn.00402659
mov edi, dword [ebp - 0x2c]
mov eax, dword [edi]
push 8
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x405f17
lea eax, [ebp - 0x20]
call fcn.0040267e
mov byte [ebp - 0xd], 1
mov byte [ebp - 4], 2
lea eax, [ebp - 0x14]
push eax
call fcn.00402659
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
push eax
call fcn.00402659
mov byte [ebp - 4], bl
lea eax, [ebp - 0x1c]
push eax
call fcn.00402659
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x20]
push eax
call fcn.00402659
mov al, byte [ebp - 0xd]
jmp 0x405f1e
mov byte [ebp - 0xd], bl
jmp 0x405edf
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x608]
xor ecx, ebp
call fcn.00408981
add ebp, 0x60c
leave
ret