Function at 0x402e10
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 0x4c5040
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x50cb30]
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 edi, edi
push 0xffffffffffffffff
mov esi, ecx
push edi
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], edi
mov word [ebp + 0x20], di
call fcn.00402370
mov dword [ebp - 4], edi
lea edi, [ebp - 0x1c]
lea ebx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x3f
call fcn.00403cb0
cmp eax, 0xffffffff
je 0x402ec4
push eax
push 0
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, ebx
call fcn.00403a80
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.00402370
mov byte [ebp - 4], 0
cmp dword [ebp - 0x24], 8
jb 0x402ec4
mov edx, dword [ebp - 0x38]
push edx
call fcn.00498fe3
add esp, 4
lea edi, [ebp - 0x1c]
lea ebx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x2f
call fcn.00403cb0
cmp eax, 0xffffffff
je 0x402f19
mov ecx, dword [esi + 0x14]
add eax, 1
cmp eax, ecx
jae 0x402f19
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x3c]
push eax
mov ecx, ebx
call fcn.00403a80
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00402370
mov byte [ebp - 4], 0
cmp dword [ebp - 0x24], 8
jb 0x402f19
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00498fe3
add esp, 4
cmp dword [ebp + 0x30], 4
jae 0x402f27
lea edi, [ebp + 0x1c]
call fcn.004039e0
or ebx, 0xffffffff
xor esi, esi
cmp dword [ebp + 0x30], esi
mov dword [ebp - 0x1c], ebx
je 0x40308b
mov eax, dword [ebp - 0x18]
lea edx, [ebp + 0x1c]
push edx
add eax, 0x24
push eax
lea ecx, [ebp]
push ecx
call fcn.00404020
push str..temp
push eax
lea edx, [ebp + 0x38]
push edx
mov byte [ebp - 4], 3
call fcn.004040e0
add esp, 0x18
mov edi, 8
mov byte [ebp - 4], 5
cmp dword [ebp + 0x18], edi
jb 0x402f7c
mov eax, dword [ebp + 4]
push eax
call fcn.00498fe3
add esp, 4
cmp dword [ebp + 0x50], edi
mov eax, dword [ebp + 0x3c]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], esi
mov word [ebp + 4], si
jae 0x402f95
lea eax, [ebp + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x402fd8
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x402faf
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x402fc2
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x402fd8
lea edi, [ebp + 0x38]
call fcn.004039e0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebp + 0x4c], esi
je 0x40301c
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x402fe9
lea eax, [ebp + 0x3c]
push esi
push 0x80
push 1
push esi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x1c], ebx
je 0x40301c
push 0xffffffffffffffff
push esi
lea ecx, [ebp + 0x38]
push ecx
mov ecx, dword [ebp - 0x18]
add ecx, 0x40
call fcn.00402370
mov byte [ebp - 4], 0
cmp dword [ebp + 0x50], 8
jb 0x403032
mov edx, dword [ebp + 0x3c]
push edx
call fcn.00498fe3
add esp, 4
cmp ebx, 0xffffffff
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], esi
mov word [ebp + 0x3c], si
je 0x403093
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push ebx
mov edx, edi
mov byte [ebp - 4], 0xb
call fcn.00403490
push ebx
mov byte [ebp - 0x11], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x11], 0
mov dword [ebp - 0x1c], 0xffffffff
jne 0x403346
cmp dword [edi + 0x58], 8
jb 0x403337
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x403402
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x403095
xor esi, esi
push 9
push str.Setup.exe
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], esi
mov word [ebp + 4], si
call fcn.004020c0
mov ebx, dword [ebp - 0x18]
lea eax, [ebp]
push eax
add ebx, 0x24
lea ecx, [ebp - 0x3c]
push ebx
push ecx
mov byte [ebp - 4], 6
call fcn.00404020
push str..temp
push eax
lea edx, [ebp + 0x54]
push edx
mov byte [ebp - 4], 7
call fcn.004040e0
add esp, 0x18
mov byte [ebp - 4], 9
cmp dword [ebp - 0x24], 8
jb 0x4030f6
mov eax, dword [ebp - 0x38]
push eax
call fcn.00498fe3
add esp, 4
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], esi
mov word [ebp - 0x38], si
jae 0x403110
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x403147
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x403124
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x403137
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x403147
lea edi, [ebp + 0x54]
call fcn.004039e0
cmp dword [ebp + 0x68], esi
jne 0x40323f
push 0x20a
lea ecx, [ebp + 0x72]
push 0
push ecx
mov word [ebp + 0x70], 0
call fcn.004203a0
mov esi, 8
add esp, 0xc
cmp dword [ebx + 0x18], esi
jb 0x403178
mov ebx, dword [ebx + 4]
jmp 0x40317b
add ebx, 4
lea edx, [ebp + 0x70]
push edx
push 1
push 0x4e9bb4
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jbe 0x4031f5
lea eax, [ebp + 0x70]
mov word [ebp + 0x27a], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4031a0
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp + 0x54]
call fcn.004020c0
push 1
lea ebx, [ebp + 0x54]
call fcn.00403d70
cmp eax, 0xffffffff
je 0x4031f5
push eax
push 0
lea ecx, [ebp - 0x58]
push ecx
mov ecx, ebx
call fcn.00403a80
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.00402370
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00401c60
cmp dword [ebp + 0x68], 0
lea ecx, [ebp + 0x54]
jne 0x40320d
push 0xffffffffffffffff
push 0
lea edx, [ebp]
push edx
call fcn.00402370
jmp 0x403219
push 0xa
push 0x4e9bc0
call fcn.00403e10
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x54], 0
je 0x403244
cmp dword [eax + 0x58], esi
jb 0x403233
mov eax, dword [eax + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x403244
add eax, 0x44
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x403244
mov esi, 8
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
jae 0x40324f
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
jae 0x403261
lea eax, [ebp + 0x58]
xor edi, edi
push edi
push 0x80
push 1
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x1c], ebx
je 0x403296
mov ecx, dword [ebp - 0x18]
push 0xffffffffffffffff
push edi
lea eax, [ebp + 0x54]
push eax
add ecx, 0x40
call fcn.00402370
mov byte [ebp - 4], 6
cmp dword [ebp + 0x6c], 8
jb 0x4032ac
mov ecx, dword [ebp + 0x58]
push ecx
call fcn.00498fe3
add esp, 4
mov esi, 7
mov byte [ebp - 4], 0
cmp dword [ebp + 0x18], 8
mov dword [ebp + 0x6c], esi
mov dword [ebp + 0x68], edi
mov word [ebp + 0x58], di
jb 0x4032d1
mov edx, dword [ebp + 4]
push edx
call fcn.00498fe3
add esp, 4
cmp ebx, 0xffffffff
mov dword [ebp + 0x18], esi
mov dword [ebp + 0x14], edi
mov word [ebp + 4], di
jne 0x403045
mov eax, dword [ebp - 0x18]
cmp dword [eax], edi
je 0x403315
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x20], esp
push 8
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], edi
push 0x4e9bd8
mov word [ecx + 4], di
call fcn.004020c0
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x34], 8
jb 0x40345c
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00498fe3
add esp, 4
jmp 0x40345c
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x403402
mov eax, dword [edi + 0x54]
add eax, 0xfffffffb
push eax
xor esi, esi
push esi
lea edx, [ebp - 0x3c]
lea ebx, [edi + 0x40]
push edx
mov ecx, ebx
call fcn.00403a80
push 0xffffffffffffffff
push esi
add edi, 8
push eax
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.00402370
mov eax, 8
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x24], eax
jb 0x40338f
mov eax, dword [ebp - 0x38]
push eax
call fcn.00498fe3
add esp, 4
mov eax, 8
cmp dword [edi + 0x18], eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], esi
mov word [ebp - 0x38], si
jb 0x4033a7
mov ecx, dword [edi + 4]
jmp 0x4033aa
lea ecx, [edi + 4]
cmp dword [ebx + 0x18], eax
jb 0x4033b4
mov eax, dword [ebx + 4]
jmp 0x4033b7
lea eax, [ebx + 4]
push ecx
push eax
call fcn.004227b0
add esp, 8
test eax, eax
je 0x403402
mov esi, 8
cmp dword [edi + 0x18], esi
jb 0x4033d4
mov eax, dword [edi + 4]
jmp 0x4033d7
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [edi + 0x18], esi
jb 0x4033e8
mov edi, dword [edi + 4]
jmp 0x4033eb
add edi, 4
cmp dword [ebx + 0x18], esi
jb 0x4033f5
mov ebx, dword [ebx + 4]
jmp 0x4033f8
add ebx, 4
push edi
push ebx
call fcn.004227b0
add esp, 8
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x34], 8
jb 0x40341b
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.00498fe3
add esp, 4
mov al, byte [ebp - 0x11]
jmp 0x40345e
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.00420385
add ebp, 0x280
mov esp, ebp
pop ebp
ret 4