Function at 0x40f050
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x2008
call fcn.0049d320
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x201c]
mov esi, ecx
test edi, edi
mov dword [esp + 0x14], esi
je 0x40f3cc
push edi
call fcn.0040f020
test eax, eax
je 0x40f0d8
push edi
call dword [0x4ab204]
mov ebx, dword [esp + 0x2020]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.00403e20
test eax, eax
je 0x40f0c6
lea eax, [ebp + ebp]
lea ecx, [ebp + ebp + 2]
cmp ecx, eax
jb 0x40f0b9
mov ecx, eax
mov esi, edi
mov edi, dword [ebx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov word [eax + edx], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1018]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1018]
push eax
push 0x800
call dword [0x4ab1dc]
lea ecx, [esp + 0x1018]
push ecx
mov ecx, esi
call fcn.0040f020
mov ebx, dword [esp + 0x2020]
mov ebp, dword [0x4ab1e4]
test eax, eax
je 0x40f1cf
lea edx, [esp + 0x18]
lea eax, [esp + 0x1018]
push edx
push 0
push 0x4bc9ac
push eax
call ebp
lea ecx, [esp + 0x18]
push str..exe
push ecx
call dword [0x4ab368]
add esp, 8
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f11f
lea eax, [esp + 0x18]
test eax, eax
jne 0x40f163
xor esi, esi
jmp 0x40f170
lea ecx, [esp + 0x18]
push ecx
call dword [0x4ab204]
mov esi, eax
push esi
mov ecx, ebx
call fcn.00403e20
test eax, eax
je 0x40f1a2
mov ecx, dword [ebx]
lea edi, [esi + esi]
lea edx, [esp + 0x18]
push edi
lea eax, [esi + esi + 2]
push edx
push eax
push ecx
call fcn.00403330
mov edx, dword [ebx]
add esp, 0x10
mov dword [edx - 8], esi
mov eax, dword [ebx]
mov word [edi + eax], 0
mov eax, dword [ebx]
mov ecx, dword [esp + 0x201c]
push 1
push eax
push ecx
call dword [0x4ab130]
test eax, eax
je 0x40f1cb
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x1018]
push 0x800
push edx
push 0x23
call fcn.0040f3e0
add esp, 0xc
lea eax, [esp + 0x1018]
mov ecx, esi
push eax
call fcn.0040f020
test eax, eax
je 0x40f2c1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1018]
push ecx
push 0
push 0x4bc9ac
push edx
call ebp
lea eax, [esp + 0x18]
push str..exe
push eax
call dword [0x4ab368]
add esp, 8
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f1fd
lea edx, [esp + 0x18]
test edx, edx
jne 0x40f245
xor edi, edi
mov dword [esp + 0x10], edi
jmp 0x40f256
lea eax, [esp + 0x18]
push eax
call dword [0x4ab204]
mov dword [esp + 0x10], eax
mov edi, eax
push edi
mov ecx, ebx
call fcn.00403e20
test eax, eax
je 0x40f298
lea eax, [edi + edi]
lea ecx, [edi + edi + 2]
cmp ecx, eax
jb 0x40f28b
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov ecx, dword [ebx]
mov dword [ecx - 8], edi
mov edx, dword [ebx]
mov word [eax + edx], 0
mov eax, dword [ebx]
push 1
push eax
mov eax, dword [esp + 0x2024]
push eax
call dword [0x4ab130]
test eax, eax
je 0x40f2c1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
lea ecx, [esp + 0x18]
push 0x800
push ecx
call dword [0x4ab12c]
lea edx, [esp + 0x1018]
mov ecx, esi
push edx
call fcn.0040f020
test eax, eax
je 0x40f3cc
lea eax, [esp + 0x1018]
push str.TEMP
lea ecx, [esp + 0x101c]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea edx, [esp + 0x18]
lea eax, [esp + 0x1018]
push edx
push 0
push 0x4bc9ac
push eax
call ebp
lea ecx, [esp + 0x18]
push str..exe
push ecx
call dword [0x4ab368]
add esp, 8
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f303
lea eax, [esp + 0x18]
test eax, eax
jne 0x40f347
xor ebp, ebp
jmp 0x40f354
lea ecx, [esp + 0x18]
push ecx
call dword [0x4ab204]
mov ebp, eax
mov eax, dword [ebx]
cmp dword [eax - 0xc], 1
jg 0x40f361
cmp ebp, dword [eax - 4]
jle 0x40f374
mov ecx, ebx
call fcn.00403ec0
push ebp
mov ecx, ebx
call fcn.00403bd0
test eax, eax
je 0x40f3a3
lea eax, [ebp + ebp]
lea edx, [ebp + ebp + 2]
cmp edx, eax
jb 0x40f396
mov edi, dword [ebx]
mov ecx, eax
mov edx, ecx
lea esi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov word [eax + edx], 0
mov ebx, dword [ebx]
mov eax, dword [esp + 0x201c]
push 1
push ebx
push eax
call dword [0x4ab130]
test eax, eax
je 0x40f3cc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2008
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2008
ret 8