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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443428
mov eax, dword fs:[0]
push eax
sub esp, 0x2b4
mov eax, dword [0x451254]
xor eax, ebp
mov dword [ebp - 0x14], 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 + 8]
xor esi, esi
mov dword [ebp - 0x29c], eax
mov eax, dword [ebp + 0xc]
push 0xffffffffffffffff
push esi
lea ecx, [ebp - 0x298]
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], esi
mov word [ebp - 0x294], si
call fcn.004019b0
mov dword [ebp - 4], esi
lea edi, [ebp - 0x2a0]
lea ebx, [ebp - 0x298]
mov dword [ebp - 0x2a0], 0x3f
call fcn.0040b1a0
cmp eax, 0xffffffff
je 0x40a2e9
push eax
mov ecx, ebx
push ecx
xor ecx, ecx
lea esi, [ebp - 0x27c]
call fcn.0040b170
push 0xffffffffffffffff
push 0
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.004019b0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x264], 8
jb 0x40a2e9
mov edx, dword [ebp - 0x278]
push edx
call fcn.0042e0ba
add esp, 4
lea edi, [ebp - 0x2a0]
lea ebx, [ebp - 0x298]
mov dword [ebp - 0x2a0], 0x2f
call fcn.0040b1a0
cmp eax, 0xffffffff
je 0x40a35a
mov ecx, dword [ebp - 0x2a4]
mov edx, dword [ecx + 0x14]
lea ecx, [eax + 1]
cmp ecx, edx
jae 0x40a35a
push 0xffffffffffffffff
mov edx, ebx
push edx
lea esi, [ebp - 0x27c]
call fcn.0040b170
push 0xffffffffffffffff
push 0
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.004019b0
mov ebx, 8
mov byte [ebp - 4], 0
cmp dword [ebp - 0x264], ebx
jb 0x40a35f
mov eax, dword [ebp - 0x278]
push eax
call fcn.0042e0ba
add esp, 4
jmp 0x40a35f
mov ebx, 8
cmp dword [ebp - 0x284], 4
jae 0x40a373
lea edi, [ebp - 0x298]
call fcn.00405850
mov eax, dword [ebp - 0x284]
test eax, eax
je 0x40a421
push 0xffffffffffffffff
lea edx, [ebp - 0x298]
lea ecx, [eax - 4]
push edx
lea esi, [ebp - 0x260]
call fcn.0040b170
mov byte [ebp - 4], 3
xor eax, eax
push 4
push 0x447548
lea esi, [ebp - 0x27c]
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], eax
mov word [ebp - 0x278], ax
call fcn.00401aa0
mov eax, esi
lea ecx, [ebp - 0x260]
call fcn.0042a806
test eax, eax
setne bl
cmp dword [ebp - 0x264], 8
jb 0x40a3f1
mov eax, dword [ebp - 0x278]
push eax
call fcn.0042e0ba
add esp, 4
test bl, bl
je 0x40a400
lea edi, [ebp - 0x298]
call fcn.00405850
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], 8
jb 0x40a41c
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.0042e0ba
add esp, 4
mov ebx, 8
or esi, 0xffffffff
cmp dword [ebp - 0x284], 0
mov dword [ebp - 0x2a0], esi
je 0x40a552
mov eax, dword [ebp - 0x29c]
lea edx, [ebp - 0x298]
push edx
add eax, 0x24
push eax
lea edi, [ebp - 0x260]
call fcn.004097f0
add esp, 8
mov byte [ebp - 4], 4
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40a46e
lea eax, [ebp - 0x25c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40a4be
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40a490
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40a4ab
lea eax, [ebp - 0x25c]
push eax
call edi
cmp eax, 0xffffffff
je 0x40a4be
lea edi, [ebp - 0x260]
call fcn.00405850
xor edi, edi
cmp dword [ebp - 0x24c], edi
je 0x40a517
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40a4dc
lea eax, [ebp - 0x25c]
push edi
push 0x80
push 1
push edi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x2a0], esi
je 0x40a517
mov ecx, dword [ebp - 0x29c]
push 0xffffffffffffffff
push edi
add ecx, 0x40
lea eax, [ebp - 0x260]
call fcn.004019b0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], ebx
jb 0x40a532
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.0042e0ba
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x248], 7
mov dword [ebp - 0x24c], edi
mov word [ebp - 0x25c], di
jne 0x40a84a
xor eax, eax
push 9
push str.Setup.exe
lea esi, [ebp - 0x27c]
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], eax
mov word [ebp - 0x278], ax
call fcn.00401aa0
mov ebx, dword [ebp - 0x29c]
lea edx, [ebp - 0x27c]
push edx
lea esi, [ebx + 0x24]
push esi
lea edi, [ebp - 0x244]
mov byte [ebp - 4], 5
call fcn.004097f0
add esp, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40a5b9
lea eax, [ebp - 0x240]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40a60b
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40a5dc
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40a5f8
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
je 0x40a60b
lea edi, [ebp - 0x244]
call fcn.00405850
cmp dword [ebp - 0x230], 0
jne 0x40a71d
push 0x20a
lea eax, [ebp - 0x226]
push 0
push eax
mov word [ebp - 0x228], 0
call fcn.0042fcc0
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40a642
mov esi, dword [esi + 4]
jmp 0x40a645
add esi, 4
lea ecx, [ebp - 0x228]
push ecx
push 1
push 0x447568
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jbe 0x40a6d6
lea eax, [ebp - 0x228]
mov word [ebp - 0x1e], 0
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a670
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x228]
push edx
lea esi, [ebp - 0x244]
call fcn.00401aa0
push 1
push 0x4471d8
mov ebx, esi
call fcn.0040b260
cmp eax, 0xffffffff
je 0x40a6d0
push eax
mov eax, esi
push eax
xor ecx, ecx
lea esi, [ebp - 0x2c0]
call fcn.0040b170
push 0xffffffffffffffff
push 0
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.004019b0
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.00401950
mov ebx, dword [ebp - 0x29c]
cmp dword [ebp - 0x230], 0
lea ecx, [ebp - 0x244]
jne 0x40a6f6
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x27c]
call fcn.004019b0
jmp 0x40a702
push 0xa
push str._Setup.exe
call fcn.00409640
cmp dword [ebx + 0x54], 0
je 0x40a71d
cmp dword [ebx + 0x58], 8
jb 0x40a713
mov eax, dword [ebx + 0x44]
jmp 0x40a716
lea eax, [ebx + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x240]
mov ebx, 8
cmp dword [ebp - 0x22c], ebx
jae 0x40a736
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
jae 0x40a751
lea eax, [ebp - 0x240]
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 esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x2a0], esi
je 0x40a78e
mov ecx, dword [ebp - 0x29c]
push 0xffffffffffffffff
push edi
add ecx, 0x40
lea eax, [ebp - 0x244]
call fcn.004019b0
cmp dword [ebp - 0x22c], ebx
jb 0x40a7a5
mov ecx, dword [ebp - 0x240]
push ecx
call fcn.0042e0ba
add esp, 4
mov ebx, 7
mov byte [ebp - 4], 0
cmp dword [ebp - 0x264], 8
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], edi
mov word [ebp - 0x240], di
jb 0x40a7d9
mov edx, dword [ebp - 0x278]
push edx
call fcn.0042e0ba
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x268], edi
mov word [ebp - 0x278], di
jne 0x40a84a
mov ebx, dword [ebp - 0x29c]
cmp dword [ebx], edi
je 0x40a829
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0x2a4], esp
push 8
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
push 0x447588
mov word [esi + 4], di
call fcn.00401aa0
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
cmp dword [ebp - 0x280], 8
jb 0x40a900
mov eax, dword [ebp - 0x294]
push eax
call fcn.0042e0ba
add esp, 4
jmp 0x40a900
mov edi, dword [ebp - 0x29c]
mov edx, dword [ebp - 0x2a4]
push esi
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.0040a920
push esi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
mov dword [ebp - 0x2a0], 0xffffffff
jne 0x40a897
cmp dword [edi + 0x58], 8
jb 0x40a88b
mov edi, dword [edi + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40a8a6
add edi, 0x44
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40a8a6
push 0xffffffffffffffff
push 0
lea eax, [edi + 0x40]
lea ecx, [edi + 8]
call fcn.004019b0
cmp dword [ebp - 0x280], 8
jb 0x40a8be
mov ecx, dword [ebp - 0x294]
push ecx
call fcn.0042e0ba
add esp, 4
mov al, bl
jmp 0x40a902
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 - 0x14]
xor ecx, ebp
call fcn.0042e4b4
mov esp, ebp
pop ebp
ret 8