Function at 0x402fb0
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 0x511900
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x5655bc]
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 ebx, ebx
push 0xffffffffffffffff
mov esi, ecx
push ebx
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], ebx
mov word [ebp + 0x20], bx
call fcn.004023c0
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 4], ebx
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x3f
call fcn.00403f30
cmp eax, 0xffffffff
je 0x403068
push eax
push ebx
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00403d10
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 1
call fcn.004023c0
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x403068
mov eax, dword [ebp - 0x38]
push eax
call fcn.0045a60c
add esp, 4
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x2f
call fcn.00403f30
cmp eax, 0xffffffff
je 0x4030c2
mov esi, dword [esi + 0x14]
add eax, 1
cmp eax, esi
jae 0x4030c2
push 0xffffffffffffffff
push eax
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00403d10
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call fcn.004023c0
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x4030c2
mov eax, dword [ebp - 0x38]
push eax
call fcn.0045a60c
add esp, 4
cmp dword [ebp + 0x30], 4
jae 0x4030d0
lea edi, [ebp + 0x1c]
call fcn.00403c20
or esi, 0xffffffff
cmp dword [ebp + 0x30], ebx
mov dword [ebp - 0x1c], esi
je 0x403229
mov edx, dword [ebp - 0x18]
lea ecx, [ebp + 0x1c]
push ecx
add edx, 0x24
push edx
lea eax, [ebp]
push eax
call fcn.00404360
push str..temp
push eax
lea ecx, [ebp + 0x38]
push ecx
mov byte [ebp - 4], 3
call fcn.00404420
add esp, 0x18
mov edi, 8
mov byte [ebp - 4], 5
cmp dword [ebp + 0x18], edi
jb 0x403123
mov edx, dword [ebp + 4]
push edx
call fcn.0045a60c
add esp, 4
cmp dword [ebp + 0x50], edi
mov eax, dword [ebp + 0x3c]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
jae 0x40313c
lea eax, [ebp + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40317f
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403156
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403169
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x40317f
lea edi, [ebp + 0x38]
call fcn.00403c20
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebp + 0x4c], ebx
je 0x4031c3
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403190
lea eax, [ebp + 0x3c]
push ebx
push 0x80
push 1
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x1c], esi
je 0x4031c3
mov ecx, dword [ebp - 0x18]
push 0xffffffffffffffff
push ebx
lea eax, [ebp + 0x38]
push eax
add ecx, 0x40
call fcn.004023c0
mov byte [ebp - 4], bl
cmp dword [ebp + 0x50], 8
jb 0x4031d8
mov ecx, dword [ebp + 0x3c]
push ecx
call fcn.0045a60c
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], ebx
mov word [ebp + 0x3c], bx
je 0x40322f
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push esi
mov edx, edi
mov byte [ebp - 4], 0xb
call fcn.00403640
push esi
mov byte [ebp - 0x11], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x11], bl
mov dword [ebp - 0x1c], 0xffffffff
jne 0x4034fd
cmp dword [edi + 0x58], 8
jb 0x4034ce
mov eax, dword [edi + 0x44]
jmp 0x4034d1
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 9
push str.Setup.exe
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
call fcn.004020d0
mov esi, dword [ebp - 0x18]
lea edx, [ebp]
push edx
add esi, 0x24
lea eax, [ebp - 0x3c]
push esi
push eax
mov byte [ebp - 4], 6
call fcn.00404360
push str..temp
push eax
lea ecx, [ebp + 0x54]
push ecx
mov byte [ebp - 4], 7
call fcn.00404420
add esp, 0x18
mov byte [ebp - 4], 9
cmp dword [ebp - 0x24], 8
jb 0x403290
mov edx, dword [ebp - 0x38]
push edx
call fcn.0045a60c
add esp, 4
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], bx
jae 0x4032aa
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x4032e1
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x4032be
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x4032d1
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x4032e1
lea edi, [ebp + 0x54]
call fcn.00403c20
cmp dword [ebp + 0x68], ebx
jne 0x4033d8
push 0x20a
lea eax, [ebp + 0x72]
push ebx
push eax
mov word [ebp + 0x70], bx
call fcn.00463a20
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40330b
mov esi, dword [esi + 4]
jmp 0x40330e
add esi, 4
lea ecx, [ebp + 0x70]
push ecx
push 1
push 0x53aea0
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, ebx
jbe 0x40338d
lea eax, [ebp + 0x70]
mov word [ebp + 0x27a], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x403331
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp + 0x70]
push edx
lea ecx, [ebp + 0x54]
call fcn.004020d0
push 1
push 0xffffffffffffffff
push 0x53aea8
lea ecx, [ebp + 0x54]
call fcn.00404020
cmp eax, 0xffffffff
je 0x40338d
push eax
push ebx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp + 0x54]
call fcn.00403d10
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 0xa
call fcn.004023c0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00401cc0
cmp dword [ebp + 0x68], ebx
jne 0x4033a3
push 0xffffffffffffffff
push ebx
lea ecx, [ebp]
push ecx
lea ecx, [ebp + 0x54]
call fcn.004023c0
jmp 0x4033b2
push 0xa
push 0x53aeac
lea ecx, [ebp + 0x54]
call fcn.004040c0
mov edi, dword [ebp - 0x18]
cmp dword [edi + 0x54], ebx
je 0x4033db
cmp dword [edi + 0x58], 8
jb 0x4033cc
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4033db
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4033db
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp + 0x58]
mov esi, 8
cmp dword [ebp + 0x6c], esi
jae 0x4033eb
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
jae 0x4033fd
lea eax, [ebp + 0x58]
push ebx
push 0x80
push 1
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x1c], esi
je 0x40342d
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0x54]
push edx
lea ecx, [edi + 0x40]
call fcn.004023c0
mov byte [ebp - 4], 6
cmp dword [ebp + 0x6c], 8
jb 0x403443
mov eax, dword [ebp + 0x58]
push eax
call fcn.0045a60c
add esp, 4
mov byte [ebp - 4], bl
cmp dword [ebp + 0x18], 8
mov dword [ebp + 0x6c], 7
mov dword [ebp + 0x68], ebx
mov word [ebp + 0x58], bx
jb 0x403466
mov ecx, dword [ebp + 4]
push ecx
call fcn.0045a60c
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
jne 0x4031ee
cmp dword [edi], ebx
je 0x4034ac
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x20], esp
push 8
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], ebx
push 0x53aec4
mov word [ecx + 4], bx
call fcn.004020d0
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x34], 8
jb 0x40360f
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a60c
add esp, 4
jmp 0x40360f
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, 8
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x34], ebx
jb 0x4034f5
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.0045a60c
add esp, 4
mov al, byte [ebp - 0x11]
jmp 0x403611
mov edi, dword [ebp - 0x18]
mov eax, dword [edi + 0x54]
add eax, 0xfffffffb
push eax
push ebx
lea edx, [ebp - 0x3c]
add edi, 0x40
push edx
mov ecx, edi
call fcn.00403d10
mov esi, dword [ebp - 0x18]
push 0xffffffffffffffff
push ebx
add esi, 8
push eax
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.004023c0
mov eax, 8
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x24], eax
jb 0x40354a
mov eax, dword [ebp - 0x38]
push eax
call fcn.0045a60c
add esp, 4
mov eax, 8
cmp dword [esi + 0x18], eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], bx
jb 0x403562
mov ecx, dword [esi + 4]
jmp 0x403565
lea ecx, [esi + 4]
cmp dword [edi + 0x18], eax
jb 0x40356f
mov eax, dword [edi + 4]
jmp 0x403572
lea eax, [edi + 4]
push ecx
push eax
call fcn.004693a7
add esp, 8
test eax, eax
je 0x4034d8
mov ebx, 8
cmp dword [esi + 0x18], ebx
jb 0x403593
mov eax, dword [esi + 4]
jmp 0x403596
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esi + 0x18], ebx
jb 0x4035a7
mov esi, dword [esi + 4]
jmp 0x4035aa
add esi, 4
cmp dword [edi + 0x18], ebx
jb 0x4035c1
mov edi, dword [edi + 4]
push esi
push edi
call fcn.004693a7
add esp, 8
jmp 0x4034dd
add edi, 4
push esi
push edi
call fcn.004693a7
add esp, 8
jmp 0x4034dd
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.00463a0b
add ebp, 0x280
mov esp, ebp
pop ebp
ret 4