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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x449048
mov eax, dword fs:[0]
push eax
sub esp, 0x2b4
mov eax, dword [0x4581b0]
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.0040db40
cmp eax, 0xffffffff
je 0x40cc49
push eax
mov ecx, ebx
push ecx
xor ecx, ecx
lea esi, [ebp - 0x27c]
call fcn.0040db10
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 0x40cc49
mov edx, dword [ebp - 0x278]
push edx
call fcn.00433114
add esp, 4
lea edi, [ebp - 0x2a0]
lea ebx, [ebp - 0x298]
mov dword [ebp - 0x2a0], 0x2f
call fcn.0040db40
cmp eax, 0xffffffff
je 0x40ccba
mov ecx, dword [ebp - 0x2a4]
mov edx, dword [ecx + 0x14]
lea ecx, [eax + 1]
cmp ecx, edx
jae 0x40ccba
push 0xffffffffffffffff
mov edx, ebx
push edx
lea esi, [ebp - 0x27c]
call fcn.0040db10
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 0x40ccbf
mov eax, dword [ebp - 0x278]
push eax
call fcn.00433114
add esp, 4
jmp 0x40ccbf
mov ebx, 8
cmp dword [ebp - 0x284], 4
jae 0x40ccd3
lea edi, [ebp - 0x298]
call fcn.00407340
mov eax, dword [ebp - 0x284]
test eax, eax
je 0x40cd81
push 0xffffffffffffffff
lea edx, [ebp - 0x298]
lea ecx, [eax - 4]
push edx
lea esi, [ebp - 0x260]
call fcn.0040db10
mov byte [ebp - 4], 3
xor eax, eax
push 4
push 0x44d8a0
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.0042f615
test eax, eax
setne bl
cmp dword [ebp - 0x264], 8
jb 0x40cd51
mov eax, dword [ebp - 0x278]
push eax
call fcn.00433114
add esp, 4
test bl, bl
je 0x40cd60
lea edi, [ebp - 0x298]
call fcn.00407340
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], 8
jb 0x40cd7c
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.00433114
add esp, 4
mov ebx, 8
or esi, 0xffffffff
cmp dword [ebp - 0x284], 0
mov dword [ebp - 0x2a0], esi
je 0x40ceb2
mov eax, dword [ebp - 0x29c]
lea edx, [ebp - 0x298]
push edx
add eax, 0x24
push eax
lea edi, [ebp - 0x260]
call fcn.0040a780
add esp, 8
mov byte [ebp - 4], 4
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40cdce
lea eax, [ebp - 0x25c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40ce1e
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40cdf0
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40ce0b
lea eax, [ebp - 0x25c]
push eax
call edi
cmp eax, 0xffffffff
je 0x40ce1e
lea edi, [ebp - 0x260]
call fcn.00407340
xor edi, edi
cmp dword [ebp - 0x24c], edi
je 0x40ce77
cmp dword [ebp - 0x248], ebx
mov eax, dword [ebp - 0x25c]
jae 0x40ce3c
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 0x40ce77
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 0x40ce92
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.00433114
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x248], 7
mov dword [ebp - 0x24c], edi
mov word [ebp - 0x25c], di
jne 0x40d1aa
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.0040a780
add esp, 8
mov byte [ebp - 4], 6
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40cf19
lea eax, [ebp - 0x240]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40cf6b
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40cf3c
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x40cf58
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
je 0x40cf6b
lea edi, [ebp - 0x244]
call fcn.00407340
cmp dword [ebp - 0x230], 0
jne 0x40d07d
push 0x20a
lea eax, [ebp - 0x226]
push 0
push eax
mov word [ebp - 0x228], 0
call fcn.00434f20
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40cfa2
mov esi, dword [esi + 4]
jmp 0x40cfa5
add esi, 4
lea ecx, [ebp - 0x228]
push ecx
push 1
push 0x44d8c0
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jbe 0x40d036
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 0x40cfd0
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x228]
push edx
lea esi, [ebp - 0x244]
call fcn.00401aa0
push 1
push 0x44d390
mov ebx, esi
call fcn.0040dc00
cmp eax, 0xffffffff
je 0x40d030
push eax
mov eax, esi
push eax
xor ecx, ecx
lea esi, [ebp - 0x2c0]
call fcn.0040db10
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 0x40d056
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x27c]
call fcn.004019b0
jmp 0x40d062
push 0xa
push str._Setup.exe
call fcn.0040a5d0
cmp dword [ebx + 0x54], 0
je 0x40d07d
cmp dword [ebx + 0x58], 8
jb 0x40d073
mov eax, dword [ebx + 0x44]
jmp 0x40d076
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 0x40d096
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
jae 0x40d0b1
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 0x40d0ee
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 0x40d105
mov ecx, dword [ebp - 0x240]
push ecx
call fcn.00433114
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 0x40d139
mov edx, dword [ebp - 0x278]
push edx
call fcn.00433114
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x268], edi
mov word [ebp - 0x278], di
jne 0x40d1aa
mov ebx, dword [ebp - 0x29c]
cmp dword [ebx], edi
je 0x40d189
sub esp, 0x1c
mov esi, esp
mov dword [ebp - 0x2a4], esp
push 8
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
push 0x44d8e0
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 0x40d260
mov eax, dword [ebp - 0x294]
push eax
call fcn.00433114
add esp, 4
jmp 0x40d260
mov edi, dword [ebp - 0x29c]
mov edx, dword [ebp - 0x2a4]
push esi
mov ecx, edi
mov byte [ebp - 4], 8
call fcn.0040d280
push esi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
mov dword [ebp - 0x2a0], 0xffffffff
jne 0x40d1f7
cmp dword [edi + 0x58], 8
jb 0x40d1eb
mov edi, dword [edi + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40d206
add edi, 0x44
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40d206
push 0xffffffffffffffff
push 0
lea eax, [edi + 0x40]
lea ecx, [edi + 8]
call fcn.004019b0
cmp dword [ebp - 0x280], 8
jb 0x40d21e
mov ecx, dword [ebp - 0x294]
push ecx
call fcn.00433114
add esp, 4
mov al, bl
jmp 0x40d262
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.004337a7
mov esp, ebp
pop ebp
ret 8