Function at 0x4027d0
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 0x4c7ec0
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x509690]
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 - 0x1c], eax
mov dword [ebp - 0x20], esi
mov dword [ebp + 0x34], 7
mov dword [ebp + 0x30], edi
mov word [ebp + 0x20], di
call fcn.00401d10
mov dword [ebp - 4], edi
lea edi, [ebp - 0x18]
lea ebx, [ebp + 0x1c]
mov dword [ebp - 0x18], 0x3f
call fcn.00403660
cmp eax, 0xffffffff
je 0x402884
push eax
push 0
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, ebx
call fcn.00403430
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.00401d10
mov byte [ebp - 4], 0
cmp dword [ebp - 0x24], 8
jb 0x402884
mov edx, dword [ebp - 0x38]
push edx
call fcn.004ba1b0
add esp, 4
lea edi, [ebp - 0x18]
lea ebx, [ebp + 0x1c]
mov dword [ebp - 0x18], 0x2f
call fcn.00403660
cmp eax, 0xffffffff
je 0x4028d9
mov esi, dword [esi + 0x14]
add eax, 1
cmp eax, esi
jae 0x4028d9
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x3c]
push eax
mov ecx, ebx
call fcn.00403430
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00401d10
mov byte [ebp - 4], 0
cmp dword [ebp - 0x24], 8
jb 0x4028d9
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004ba1b0
add esp, 4
cmp dword [ebp + 0x30], 4
jae 0x4028e7
lea edi, [ebp + 0x1c]
call fcn.00403390
or ebx, 0xffffffff
cmp dword [ebp + 0x30], 0
mov dword [ebp - 0x18], ebx
je 0x402a05
mov eax, dword [ebp - 0x1c]
lea edx, [ebp + 0x1c]
push edx
add eax, 0x24
push eax
lea esi, [ebp]
call fcn.00403a00
push str..temp
push eax
lea ecx, [ebp + 0x38]
push ecx
mov byte [ebp - 4], 3
call fcn.00403ab0
add esp, 0x14
mov edi, 8
mov byte [ebp - 4], 5
cmp dword [ebp + 0x18], edi
jb 0x40293a
mov edx, dword [ebp + 4]
push edx
call fcn.004ba1b0
add esp, 4
mov eax, dword [ebp + 0x3c]
xor esi, esi
cmp dword [ebp + 0x50], edi
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], esi
mov word [ebp + 4], si
jae 0x402955
lea eax, [ebp + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x402994
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x40296f
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x402982
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x402994
lea edi, [ebp + 0x38]
call fcn.00403390
xor esi, esi
cmp dword [ebp + 0x4c], esi
je 0x4029d8
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x4029a5
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 - 0x18], ebx
je 0x4029d8
mov ecx, dword [ebp - 0x1c]
push 0xffffffffffffffff
push esi
lea eax, [ebp + 0x38]
push eax
add ecx, 0x40
call fcn.00401d10
mov byte [ebp - 4], 0
cmp dword [ebp + 0x50], 8
jb 0x4029ee
mov ecx, dword [ebp + 0x3c]
push ecx
call fcn.004ba1b0
add esp, 4
cmp ebx, 0xffffffff
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], esi
mov word [ebp + 0x3c], si
jne 0x402ca3
push 9
xor edi, edi
push str.Setup.exe
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], edi
mov word [ebp + 4], di
call fcn.00401a40
mov ebx, dword [ebp - 0x1c]
lea edx, [ebp]
push edx
add ebx, 0x24
push ebx
lea esi, [ebp - 0x3c]
mov byte [ebp - 4], 6
call fcn.00403a00
push str..temp
push eax
lea eax, [ebp + 0x54]
push eax
mov byte [ebp - 4], 7
call fcn.00403ab0
add esp, 0x14
mov esi, 8
mov byte [ebp - 4], 9
cmp dword [ebp - 0x24], esi
jb 0x402a6b
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004ba1b0
add esp, 4
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], edi
mov word [ebp - 0x38], di
jae 0x402a84
lea eax, [ebp + 0x58]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
je 0x402ac3
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x402a9e
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x402ab1
lea eax, [ebp + 0x58]
push eax
call esi
cmp eax, 0xffffffff
je 0x402ac3
lea edi, [ebp + 0x54]
call fcn.00403390
xor edi, edi
cmp dword [ebp + 0x68], edi
jne 0x402bb5
push 0x20a
lea edx, [ebp + 0x72]
push edi
push edx
mov word [ebp + 0x70], di
call fcn.0043db10
add esp, 0xc
cmp dword [ebx + 0x18], 8
jb 0x402aed
mov ebx, dword [ebx + 4]
jmp 0x402af0
add ebx, 4
lea eax, [ebp + 0x70]
push eax
push 1
push 0x4e30b8
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, edi
jbe 0x402b6a
lea eax, [ebp + 0x70]
mov word [ebp + 0x27a], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402b15
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp + 0x70]
push ecx
lea ecx, [ebp + 0x54]
call fcn.00401a40
push 1
lea ebx, [ebp + 0x54]
call fcn.00403720
cmp eax, 0xffffffff
je 0x402b6a
push eax
push 0
lea edx, [ebp - 0x58]
push edx
mov ecx, ebx
call fcn.00403430
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.00401d10
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00401610
cmp dword [ebp + 0x68], 0
lea ecx, [ebp + 0x54]
jne 0x402b82
push 0xffffffffffffffff
push 0
lea eax, [ebp]
push eax
call fcn.00401d10
jmp 0x402b8e
push 0xa
push 0x4e30c4
call fcn.004037c0
mov edi, dword [ebp - 0x1c]
cmp dword [edi + 0x54], 0
je 0x402bb8
cmp dword [edi + 0x58], 8
jb 0x402ba9
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402bb8
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402bb8
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x58]
mov esi, 8
cmp dword [ebp + 0x6c], esi
jae 0x402bc8
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
jae 0x402bda
lea eax, [ebp + 0x58]
xor esi, esi
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 - 0x18], ebx
je 0x402c0c
push 0xffffffffffffffff
push esi
lea ecx, [ebp + 0x54]
push ecx
lea ecx, [edi + 0x40]
call fcn.00401d10
cmp dword [ebp + 0x6c], 8
jb 0x402c1e
mov edx, dword [ebp + 0x58]
push edx
call fcn.004ba1b0
add esp, 4
mov byte [ebp - 4], 0
cmp dword [ebp + 0x18], 8
mov dword [ebp + 0x6c], 7
mov dword [ebp + 0x68], esi
mov word [ebp + 0x58], si
jb 0x402c42
mov eax, dword [ebp + 4]
push eax
call fcn.004ba1b0
add esp, 4
cmp ebx, 0xffffffff
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], esi
mov word [ebp + 4], si
jne 0x402ca6
xor eax, eax
cmp dword [edi], eax
je 0x402c88
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x20], esp
push 8
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], eax
push 0x4e30dc
mov word [ecx + 4], ax
call fcn.00401a40
mov edi, dword [edi]
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
mov ecx, edi
call eax
cmp dword [ebp + 0x34], 8
jb 0x402ddf
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004ba1b0
add esp, 4
jmp 0x402ddf
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
push ebx
mov edx, edi
mov byte [ebp - 4], 0xb
call fcn.00402e10
push ebx
mov byte [ebp - 0x11], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x11], 0
mov dword [ebp - 0x18], 0xffffffff
jne 0x402cf4
mov esi, 8
cmp dword [edi + 0x58], esi
jb 0x402ce5
mov edi, dword [edi + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402d94
add edi, 0x44
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402d94
mov eax, dword [edi + 0x54]
add eax, 0xfffffffb
push eax
push 0
lea edx, [ebp - 0x3c]
lea ebx, [edi + 0x40]
push edx
mov ecx, ebx
call fcn.00403430
push 0xffffffffffffffff
push 0
add edi, 8
push eax
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.00401d10
mov esi, 8
cmp dword [ebp - 0x24], esi
jb 0x402d34
mov eax, dword [ebp - 0x38]
push eax
call fcn.004ba1b0
add esp, 4
cmp dword [edi + 0x18], esi
jb 0x402d3e
mov ecx, dword [edi + 4]
jmp 0x402d41
lea ecx, [edi + 4]
cmp dword [ebx + 0x18], esi
jb 0x402d4b
mov eax, dword [ebx + 4]
jmp 0x402d4e
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00441af1
add esp, 8
test eax, eax
je 0x402d94
cmp dword [edi + 0x18], esi
jb 0x402d66
mov eax, dword [edi + 4]
jmp 0x402d69
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [edi + 0x18], esi
jb 0x402d7a
mov edi, dword [edi + 4]
jmp 0x402d7d
add edi, 4
cmp dword [ebx + 0x18], esi
jb 0x402d87
mov ebx, dword [ebx + 4]
jmp 0x402d8a
add ebx, 4
push edi
push ebx
call fcn.00441af1
add esp, 8
cmp dword [ebp + 0x34], esi
jb 0x402da5
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004ba1b0
add esp, 4
mov al, byte [ebp - 0x11]
jmp 0x402de1
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.0043daf5
add ebp, 0x280
mov esp, ebp
pop ebp
ret 4