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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447158
mov eax, dword fs:[0]
push eax
sub esp, 0x2b4
mov eax, dword [0x4551b0]
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.004019a0
mov dword [ebp - 4], esi
lea edi, [ebp - 0x2a0]
lea ebx, [ebp - 0x298]
mov dword [ebp - 0x2a0], 0x3f
call fcn.0040cdd0
cmp eax, 0xffffffff
je 0x40bed9
push eax
mov ecx, ebx
push ecx
xor ecx, ecx
lea esi, [ebp - 0x27c]
call fcn.0040cda0
push 0xffffffffffffffff
push 0
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.004019a0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x264], 8
jb 0x40bed9
mov edx, dword [ebp - 0x278]
push edx
call fcn.00431474
add esp, 4
lea edi, [ebp - 0x2a0]
lea ebx, [ebp - 0x298]
mov dword [ebp - 0x2a0], 0x2f
call fcn.0040cdd0
cmp eax, 0xffffffff
je 0x40bf4a
mov ecx, dword [ebp - 0x2a4]
mov edx, dword [ecx + 0x14]
lea ecx, [eax + 1]
cmp ecx, edx
jae 0x40bf4a
push 0xffffffffffffffff
mov edx, ebx
push edx
lea esi, [ebp - 0x27c]
call fcn.0040cda0
push 0xffffffffffffffff
push 0
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.004019a0
mov ebx, 8
mov byte [ebp - 4], 0
cmp dword [ebp - 0x264], ebx
jb 0x40bf4f
mov eax, dword [ebp - 0x278]
push eax
call fcn.00431474
add esp, 4
jmp 0x40bf4f
mov ebx, 8
cmp dword [ebp - 0x284], 4
jae 0x40bf63
lea edi, [ebp - 0x298]
call fcn.00407320
mov eax, dword [ebp - 0x284]
test eax, eax
je 0x40c011
push 0xffffffffffffffff
lea edx, [ebp - 0x298]
lea ecx, [eax - 4]
push edx
lea esi, [ebp - 0x260]
call fcn.0040cda0
mov byte [ebp - 4], 3
xor eax, eax
push 4
push 0x44b7f0
lea esi, [ebp - 0x27c]
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], eax
mov word [ebp - 0x278], ax
call fcn.00401a90
mov eax, esi
lea ecx, [ebp - 0x260]
call fcn.0042d9a5
test eax, eax
setne bl
cmp dword [ebp - 0x264], 8
jb 0x40bfe1
mov eax, dword [ebp - 0x278]
push eax
call fcn.00431474
add esp, 4
test bl, bl
je 0x40bff0
lea edi, [ebp - 0x298]
call fcn.00407320
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], 8
jb 0x40c00c
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.00431474
add esp, 4
mov ebx, 8
or esi, 0xffffffff
cmp dword [ebp - 0x284], 0
mov dword [ebp - 0x2a0], esi
je 0x40c142
mov eax, dword [ebp - 0x29c]
lea edx, [ebp - 0x298]
push edx
add eax, 0x24
push eax
lea edi, [ebp - 0x260]
call fcn.0040a7a0
add esp, 8
mov byte [ebp - 4], 4
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40c05e
lea eax, [ebp - 0x25c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c0ae
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40c080
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40c09b
lea eax, [ebp - 0x25c]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c0ae
lea edi, [ebp - 0x260]
call fcn.00407320
xor edi, edi
cmp dword [ebp - 0x24c], edi
je 0x40c107
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40c0cc
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 0x40c107
mov ecx, dword [ebp - 0x29c]
push 0xffffffffffffffff
push edi
add ecx, 0x40
lea eax, [ebp - 0x260]
call fcn.004019a0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], ebx
jb 0x40c122
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.00431474
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x248], 7
mov dword [ebp - 0x24c], edi
mov word [ebp - 0x25c], di
jne 0x40c43a
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.00401a90
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.0040a7a0
add esp, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40c1a9
lea eax, [ebp - 0x240]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c1fb
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40c1cc
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40c1e8
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c1fb
lea edi, [ebp - 0x244]
call fcn.00407320
cmp dword [ebp - 0x230], 0
jne 0x40c30d
push 0x20a
lea eax, [ebp - 0x226]
push 0
push eax
mov word [ebp - 0x228], 0
call fcn.00433170
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40c232
mov esi, dword [esi + 4]
jmp 0x40c235
add esi, 4
lea ecx, [ebp - 0x228]
push ecx
push 1
push 0x44b810
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jbe 0x40c2c6
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 0x40c260
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x228]
push edx
lea esi, [ebp - 0x244]
call fcn.00401a90
push 1
push 0x44b340
mov ebx, esi
call fcn.0040ce90
cmp eax, 0xffffffff
je 0x40c2c0
push eax
mov eax, esi
push eax
xor ecx, ecx
lea esi, [ebp - 0x2c0]
call fcn.0040cda0
push 0xffffffffffffffff
push 0
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.004019a0
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.00401940
mov ebx, dword [ebp - 0x29c]
cmp dword [ebp - 0x230], 0
lea ecx, [ebp - 0x244]
jne 0x40c2e6
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x27c]
call fcn.004019a0
jmp 0x40c2f2
push 0xa
push str._Setup.exe
call fcn.0040a5f0
cmp dword [ebx + 0x54], 0
je 0x40c30d
cmp dword [ebx + 0x58], 8
jb 0x40c303
mov eax, dword [ebx + 0x44]
jmp 0x40c306
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 0x40c326
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
jae 0x40c341
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 0x40c37e
mov ecx, dword [ebp - 0x29c]
push 0xffffffffffffffff
push edi
add ecx, 0x40
lea eax, [ebp - 0x244]
call fcn.004019a0
cmp dword [ebp - 0x22c], ebx
jb 0x40c395
mov ecx, dword [ebp - 0x240]
push ecx
call fcn.00431474
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 0x40c3c9
mov edx, dword [ebp - 0x278]
push edx
call fcn.00431474
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x268], edi
mov word [ebp - 0x278], di
jne 0x40c43a
mov ebx, dword [ebp - 0x29c]
cmp dword [ebx], edi
je 0x40c419
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0x2a4], esp
push 8
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
push 0x44b830
mov word [esi + 4], di
call fcn.00401a90
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
cmp dword [ebp - 0x280], 8
jb 0x40c4f0
mov eax, dword [ebp - 0x294]
push eax
call fcn.00431474
add esp, 4
jmp 0x40c4f0
mov edi, dword [ebp - 0x29c]
mov edx, dword [ebp - 0x2a4]
push esi
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.0040c510
push esi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
mov dword [ebp - 0x2a0], 0xffffffff
jne 0x40c487
cmp dword [edi + 0x58], 8
jb 0x40c47b
mov edi, dword [edi + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40c496
add edi, 0x44
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40c496
push 0xffffffffffffffff
push 0
lea eax, [edi + 0x40]
lea ecx, [edi + 8]
call fcn.004019a0
cmp dword [ebp - 0x280], 8
jb 0x40c4ae
mov ecx, dword [ebp - 0x294]
push ecx
call fcn.00431474
add esp, 4
mov al, bl
jmp 0x40c4f2
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.00431b07
mov esp, ebp
pop ebp
ret 8