Function at 0x402e50
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x280]
sub esp, 0x280
push 0xffffffffffffffff
push 0x50ff50
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x5635bc]
xor eax, ebp
mov dword [ebp + 0x27c], 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, dword [ebp + 0x288]
xor ebx, ebx
push 0xffffffffffffffff
mov esi, ecx
push ebx
push esi
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], esi
mov dword [ebp + 0x34], 7
mov dword [ebp + 0x30], ebx
mov word [ebp + 0x20], bx
call fcn.00402390
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 4], ebx
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x3f
call fcn.00403dd0
cmp eax, 0xffffffff
je 0x402f08
push eax
push ebx
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00403bd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 1
call fcn.00402390
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x402f08
mov eax, dword [ebp - 0x38]
push eax
call fcn.004dfe66
add esp, 4
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x2f
call fcn.00403dd0
cmp eax, 0xffffffff
je 0x402f62
mov esi, dword [esi + 0x14]
add eax, 1
cmp eax, esi
jae 0x402f62
push 0xffffffffffffffff
push eax
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00403bd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call fcn.00402390
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x402f62
mov eax, dword [ebp - 0x38]
push eax
call fcn.004dfe66
add esp, 4
cmp dword [ebp + 0x30], 4
jae 0x402f70
lea edi, [ebp + 0x1c]
call fcn.00403ae0
or esi, 0xffffffff
cmp dword [ebp + 0x30], ebx
mov dword [ebp - 0x1c], esi
je 0x4030c9
mov edx, dword [ebp - 0x18]
lea ecx, [ebp + 0x1c]
push ecx
add edx, 0x24
push edx
lea eax, [ebp]
push eax
call fcn.00404200
push str..temp
push eax
lea ecx, [ebp + 0x38]
push ecx
mov byte [ebp - 4], 3
call fcn.004042c0
add esp, 0x18
mov edi, 8
mov byte [ebp - 4], 5
cmp dword [ebp + 0x18], edi
jb 0x402fc3
mov edx, dword [ebp + 4]
push edx
call fcn.004dfe66
add esp, 4
cmp dword [ebp + 0x50], edi
mov eax, dword [ebp + 0x3c]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
jae 0x402fdc
lea eax, [ebp + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40301f
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x402ff6
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403009
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x40301f
lea edi, [ebp + 0x38]
call fcn.00403ae0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebp + 0x4c], ebx
je 0x403063
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403030
lea eax, [ebp + 0x3c]
push ebx
push 0x80
push 1
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x1c], esi
je 0x403063
mov ecx, dword [ebp - 0x18]
push 0xffffffffffffffff
push ebx
lea eax, [ebp + 0x38]
push eax
add ecx, 0x40
call fcn.00402390
mov byte [ebp - 4], bl
cmp dword [ebp + 0x50], 8
jb 0x403078
mov ecx, dword [ebp + 0x3c]
push ecx
call fcn.004dfe66
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], ebx
mov word [ebp + 0x3c], bx
je 0x4030cf
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push esi
mov edx, edi
mov byte [ebp - 4], 0xb
call fcn.004034e0
push esi
mov byte [ebp - 0x11], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x11], bl
mov dword [ebp - 0x1c], 0xffffffff
jne 0x40339d
cmp dword [edi + 0x58], 8
jb 0x40336e
mov eax, dword [edi + 0x44]
jmp 0x403371
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 9
push str.Setup.exe
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
call fcn.004020d0
mov esi, dword [ebp - 0x18]
lea edx, [ebp]
push edx
add esi, 0x24
lea eax, [ebp - 0x3c]
push esi
push eax
mov byte [ebp - 4], 6
call fcn.00404200
push str..temp
push eax
lea ecx, [ebp + 0x54]
push ecx
mov byte [ebp - 4], 7
call fcn.004042c0
add esp, 0x18
mov byte [ebp - 4], 9
cmp dword [ebp - 0x24], 8
jb 0x403130
mov edx, dword [ebp - 0x38]
push edx
call fcn.004dfe66
add esp, 4
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], bx
jae 0x40314a
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x403181
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x40315e
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x403171
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x403181
lea edi, [ebp + 0x54]
call fcn.00403ae0
cmp dword [ebp + 0x68], ebx
jne 0x403278
push 0x20a
lea eax, [ebp + 0x72]
push ebx
push eax
mov word [ebp + 0x70], bx
call fcn.00462710
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x4031ab
mov esi, dword [esi + 4]
jmp 0x4031ae
add esi, 4
lea ecx, [ebp + 0x70]
push ecx
push 1
push 0x538d30
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, ebx
jbe 0x40322d
lea eax, [ebp + 0x70]
mov word [ebp + 0x27a], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4031d1
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp + 0x70]
push edx
lea ecx, [ebp + 0x54]
call fcn.004020d0
push 1
push 0xffffffffffffffff
push 0x538d38
lea ecx, [ebp + 0x54]
call fcn.00403ec0
cmp eax, 0xffffffff
je 0x40322d
push eax
push ebx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp + 0x54]
call fcn.00403bd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 0xa
call fcn.00402390
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00401cc0
cmp dword [ebp + 0x68], ebx
jne 0x403243
push 0xffffffffffffffff
push ebx
lea ecx, [ebp]
push ecx
lea ecx, [ebp + 0x54]
call fcn.00402390
jmp 0x403252
push 0xa
push 0x538d3c
lea ecx, [ebp + 0x54]
call fcn.00403f60
mov edi, dword [ebp - 0x18]
cmp dword [edi + 0x54], ebx
je 0x40327b
cmp dword [edi + 0x58], 8
jb 0x40326c
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40327b
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40327b
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp + 0x58]
mov esi, 8
cmp dword [ebp + 0x6c], esi
jae 0x40328b
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
jae 0x40329d
lea eax, [ebp + 0x58]
push ebx
push 0x80
push 1
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x1c], esi
je 0x4032cd
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0x54]
push edx
lea ecx, [edi + 0x40]
call fcn.00402390
mov byte [ebp - 4], 6
cmp dword [ebp + 0x6c], 8
jb 0x4032e3
mov eax, dword [ebp + 0x58]
push eax
call fcn.004dfe66
add esp, 4
mov byte [ebp - 4], bl
cmp dword [ebp + 0x18], 8
mov dword [ebp + 0x6c], 7
mov dword [ebp + 0x68], ebx
mov word [ebp + 0x58], bx
jb 0x403306
mov ecx, dword [ebp + 4]
push ecx
call fcn.004dfe66
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
jne 0x40308e
cmp dword [edi], ebx
je 0x40334c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x20], esp
push 8
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], ebx
push 0x538d54
mov word [ecx + 4], bx
call fcn.004020d0
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x34], 8
jb 0x4034af
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004dfe66
add esp, 4
jmp 0x4034af
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, 8
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x34], ebx
jb 0x403395
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004dfe66
add esp, 4
mov al, byte [ebp - 0x11]
jmp 0x4034b1
mov edi, dword [ebp - 0x18]
mov eax, dword [edi + 0x54]
add eax, 0xfffffffb
push eax
push ebx
lea edx, [ebp - 0x3c]
add edi, 0x40
push edx
mov ecx, edi
call fcn.00403bd0
mov esi, dword [ebp - 0x18]
push 0xffffffffffffffff
push ebx
add esi, 8
push eax
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.00402390
mov eax, 8
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x24], eax
jb 0x4033ea
mov eax, dword [ebp - 0x38]
push eax
call fcn.004dfe66
add esp, 4
mov eax, 8
cmp dword [esi + 0x18], eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], bx
jb 0x403402
mov ecx, dword [esi + 4]
jmp 0x403405
lea ecx, [esi + 4]
cmp dword [edi + 0x18], eax
jb 0x40340f
mov eax, dword [edi + 4]
jmp 0x403412
lea eax, [edi + 4]
push ecx
push eax
call fcn.004680b5
add esp, 8
test eax, eax
je 0x403378
mov ebx, 8
cmp dword [esi + 0x18], ebx
jb 0x403433
mov eax, dword [esi + 4]
jmp 0x403436
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esi + 0x18], ebx
jb 0x403447
mov esi, dword [esi + 4]
jmp 0x40344a
add esi, 4
cmp dword [edi + 0x18], ebx
jb 0x403461
mov edi, dword [edi + 4]
push esi
push edi
call fcn.004680b5
add esp, 8
jmp 0x40337d
add edi, 4
push esi
push edi
call fcn.004680b5
add esp, 8
jmp 0x40337d
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 + 0x27c]
xor ecx, ebp
call fcn.004626fa
add ebp, 0x280
mov esp, ebp
pop ebp
ret 4