Function at 0x402e70
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 0x5109c0
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x5645bc]
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.004023b0
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.00403dd0
cmp eax, 0xffffffff
je 0x402f28
push eax
push ebx
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00403bd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 1
call fcn.004023b0
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x402f28
mov eax, dword [ebp - 0x38]
push eax
call fcn.004e0b6b
add esp, 4
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp + 0x1c]
mov dword [ebp - 0x1c], 0x2f
call fcn.00403dd0
cmp eax, 0xffffffff
je 0x402f82
mov esi, dword [esi + 0x14]
add eax, 1
cmp eax, esi
jae 0x402f82
push 0xffffffffffffffff
push eax
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00403bd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call fcn.004023b0
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x402f82
mov eax, dword [ebp - 0x38]
push eax
call fcn.004e0b6b
add esp, 4
cmp dword [ebp + 0x30], 4
jae 0x402f90
lea edi, [ebp + 0x1c]
call fcn.00403af0
or esi, 0xffffffff
cmp dword [ebp + 0x30], ebx
mov dword [ebp - 0x1c], esi
je 0x4030e9
mov edx, dword [ebp - 0x18]
lea ecx, [ebp + 0x1c]
push ecx
add edx, 0x24
push edx
lea eax, [ebp]
push eax
call fcn.00404200
push str..temp
push eax
lea ecx, [ebp + 0x38]
push ecx
mov byte [ebp - 4], 3
call fcn.004042c0
add esp, 0x18
mov edi, 8
mov byte [ebp - 4], 5
cmp dword [ebp + 0x18], edi
jb 0x402fe3
mov edx, dword [ebp + 4]
push edx
call fcn.004e0b6b
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 0x402ffc
lea eax, [ebp + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x40303f
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403016
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403029
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x40303f
lea edi, [ebp + 0x38]
call fcn.00403af0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebp + 0x4c], ebx
je 0x403083
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x403050
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 0x403083
mov ecx, dword [ebp - 0x18]
push 0xffffffffffffffff
push ebx
lea eax, [ebp + 0x38]
push eax
add ecx, 0x40
call fcn.004023b0
mov byte [ebp - 4], bl
cmp dword [ebp + 0x50], 8
jb 0x403098
mov ecx, dword [ebp + 0x3c]
push ecx
call fcn.004e0b6b
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp + 0x50], 7
mov dword [ebp + 0x4c], ebx
mov word [ebp + 0x3c], bx
je 0x4030ef
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push esi
mov edx, edi
mov byte [ebp - 4], 0xb
call fcn.00403500
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 0x4033bd
cmp dword [edi + 0x58], 8
jb 0x40338e
mov eax, dword [edi + 0x44]
jmp 0x403391
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.004020f0
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.00404200
push str..temp
push eax
lea ecx, [ebp + 0x54]
push ecx
mov byte [ebp - 4], 7
call fcn.004042c0
add esp, 0x18
mov byte [ebp - 4], 9
cmp dword [ebp - 0x24], 8
jb 0x403150
mov edx, dword [ebp - 0x38]
push edx
call fcn.004e0b6b
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 0x40316a
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x4031a1
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x40317e
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x403191
lea eax, [ebp + 0x58]
push eax
call edi
cmp eax, 0xffffffff
je 0x4031a1
lea edi, [ebp + 0x54]
call fcn.00403af0
cmp dword [ebp + 0x68], ebx
jne 0x403298
push 0x20a
lea eax, [ebp + 0x72]
push ebx
push eax
mov word [ebp + 0x70], bx
call fcn.00463f00
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x4031cb
mov esi, dword [esi + 4]
jmp 0x4031ce
add esi, 4
lea ecx, [ebp + 0x70]
push ecx
push 1
push 0x539f20
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, ebx
jbe 0x40324d
lea eax, [ebp + 0x70]
mov word [ebp + 0x27a], bx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4031f1
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp + 0x70]
push edx
lea ecx, [ebp + 0x54]
call fcn.004020f0
push 1
push 0xffffffffffffffff
push 0x539f28
lea ecx, [ebp + 0x54]
call fcn.00403ec0
cmp eax, 0xffffffff
je 0x40324d
push eax
push ebx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp + 0x54]
call fcn.00403bd0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 0xa
call fcn.004023b0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00401cd0
cmp dword [ebp + 0x68], ebx
jne 0x403263
push 0xffffffffffffffff
push ebx
lea ecx, [ebp]
push ecx
lea ecx, [ebp + 0x54]
call fcn.004023b0
jmp 0x403272
push 0xa
push 0x539f2c
lea ecx, [ebp + 0x54]
call fcn.00403f60
mov edi, dword [ebp - 0x18]
cmp dword [edi + 0x54], ebx
je 0x40329b
cmp dword [edi + 0x58], 8
jb 0x40328c
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40329b
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40329b
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp + 0x58]
mov esi, 8
cmp dword [ebp + 0x6c], esi
jae 0x4032ab
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x6c], esi
mov eax, dword [ebp + 0x58]
jae 0x4032bd
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 0x4032ed
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0x54]
push edx
lea ecx, [edi + 0x40]
call fcn.004023b0
mov byte [ebp - 4], 6
cmp dword [ebp + 0x6c], 8
jb 0x403303
mov eax, dword [ebp + 0x58]
push eax
call fcn.004e0b6b
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 0x403326
mov ecx, dword [ebp + 4]
push ecx
call fcn.004e0b6b
add esp, 4
cmp esi, 0xffffffff
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], bx
jne 0x4030ae
cmp dword [edi], ebx
je 0x40336c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x20], esp
push 8
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], ebx
push 0x539f44
mov word [ecx + 4], bx
call fcn.004020f0
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 0x4034cf
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004e0b6b
add esp, 4
jmp 0x4034cf
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 0x4033b5
mov ecx, dword [ebp + 0x20]
push ecx
call fcn.004e0b6b
add esp, 4
mov al, byte [ebp - 0x11]
jmp 0x4034d1
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.00403bd0
mov esi, dword [ebp - 0x18]
push 0xffffffffffffffff
push ebx
add esi, 8
push eax
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.004023b0
mov eax, 8
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x24], eax
jb 0x40340a
mov eax, dword [ebp - 0x38]
push eax
call fcn.004e0b6b
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 0x403422
mov ecx, dword [esi + 4]
jmp 0x403425
lea ecx, [esi + 4]
cmp dword [edi + 0x18], eax
jb 0x40342f
mov eax, dword [edi + 4]
jmp 0x403432
lea eax, [edi + 4]
push ecx
push eax
call fcn.00468d25
add esp, 8
test eax, eax
je 0x403398
mov ebx, 8
cmp dword [esi + 0x18], ebx
jb 0x403453
mov eax, dword [esi + 4]
jmp 0x403456
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esi + 0x18], ebx
jb 0x403467
mov esi, dword [esi + 4]
jmp 0x40346a
add esi, 4
cmp dword [edi + 0x18], ebx
jb 0x403481
mov edi, dword [edi + 4]
push esi
push edi
call fcn.00468d25
add esp, 8
jmp 0x40339d
add edi, 4
push esi
push edi
call fcn.00468d25
add esp, 8
jmp 0x40339d
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.00463ee8
add ebp, 0x280
mov esp, ebp
pop ebp
ret 4