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

Disassembly:
push ebp
sub esp, 0x260
lea ebp, [esp - 4]
mov eax, dword [0x41b214]
xor eax, ebp
mov dword [ebp + 0x260], eax
push 0x34
mov eax, 0x4151c9
call fcn.00409098
mov eax, dword [ebp + 0x26c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x270]
mov dword [ebp - 0x24], eax
lea esi, [ebp + 0x1c]
call fcn.004039d2
mov dword [ebp - 0x20], 0x3f
lea eax, [ebp - 0x20]
push eax
mov eax, esi
call fcn.004050a2
push 7
xor ebx, ebx
pop edi
cmp eax, 0xffffffff
je 0x4044e0
mov dword [ebp + 0x50], edi
and dword [ebp + 0x4c], ebx
and word [ebp + 0x3c], bx
push eax
lea eax, [ebp + 0x38]
push eax
mov eax, esi
call fcn.004039f1
push 0xffffffffffffffff
mov eax, esi
push eax
lea eax, [ebp + 0x38]
call fcn.004039f1
push ebx
push 1
lea esi, [ebp + 0x38]
call fcn.00403ae3
mov dword [ebp - 0x20], 0x2f
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 0x1c]
call fcn.004050a2
cmp eax, 0xffffffff
je 0x404538
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ecx + 0x14]
inc eax
cmp eax, ecx
jae 0x404538
mov dword [ebp + 0x50], edi
mov dword [ebp + 0x4c], ebx
mov word [ebp + 0x3c], bx
push 0xffffffffffffffff
lea ecx, [ebp + 0x38]
push ecx
mov ebx, eax
lea eax, [ebp + 0x1c]
call fcn.004039f1
push 0xffffffffffffffff
lea eax, [ebp + 0x1c]
push eax
xor ebx, ebx
lea eax, [ebp + 0x38]
call fcn.004039f1
push ebx
push 1
lea esi, [ebp + 0x38]
call fcn.00403ae3
cmp dword [ebp + 0x30], 4
jae 0x404546
lea eax, [ebp + 0x1c]
call fcn.00404ed2
mov eax, dword [ebp + 0x30]
cmp eax, ebx
je 0x4045ab
mov dword [ebp + 0x50], edi
mov dword [ebp + 0x4c], ebx
mov word [ebp + 0x3c], bx
push 0xffffffffffffffff
lea ebx, [eax - 4]
lea eax, [ebp + 0x38]
push eax
lea eax, [ebp + 0x1c]
call fcn.004039f1
mov eax, str..exe
lea ecx, [ebp]
call fcn.00404e86
lea eax, [ebp]
lea ecx, [ebp + 0x38]
call fcn.00406a55
test eax, eax
setne bl
push 0
push 1
lea esi, [ebp]
call fcn.00403ae3
test bl, bl
je 0x40459d
lea eax, [ebp + 0x1c]
call fcn.00404ed2
push 0
push 1
lea esi, [ebp + 0x38]
call fcn.00403ae3
xor ebx, ebx
or dword [ebp - 0x18], 0xffffffff
cmp dword [ebp + 0x30], ebx
je 0x4046a7
lea eax, [ebp + 0x1c]
push eax
mov eax, dword [ebp - 0x1c]
add eax, 0x24
lea ecx, [ebp + 0x38]
push ecx
call fcn.004055b4
pop ecx
pop ecx
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x4045d9
lea eax, [ebp + 0x3c]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call edi
or esi, 0xffffffff
cmp eax, esi
je 0x404617
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x4045f5
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x404608
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, esi
je 0x404617
lea eax, [ebp + 0x38]
call fcn.00404ed2
cmp dword [ebp + 0x4c], ebx
je 0x404658
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x404628
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 dword [ebp - 0x18], eax
cmp eax, esi
je 0x404658
push esi
mov eax, dword [ebp - 0x1c]
add eax, 0x40
push eax
xor ebx, ebx
lea eax, [ebp + 0x38]
call fcn.004039f1
push ebx
push 1
lea esi, [ebp + 0x38]
call fcn.00403ae3
cmp dword [ebp - 0x18], 0xffffffff
je 0x4046ad
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 4], ebx
push dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
mov ecx, edi
call fcn.00404925
mov byte [ebp - 0x11], al
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x18], 0xffffffff
cmp byte [ebp - 0x11], bl
jne 0x4048a1
cmp dword [edi + 0x58], 8
jb 0x404895
mov eax, dword [edi + 0x44]
jmp 0x404898
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov eax, str.Setup.exe
lea ecx, [ebp]
call fcn.00404e86
mov esi, dword [ebp - 0x1c]
add esi, 0x24
lea eax, [ebp]
push eax
lea eax, [ebp + 0x38]
push eax
mov eax, esi
call fcn.004055b4
pop ecx
pop ecx
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x4046dd
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x404714
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x4046f1
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x404704
lea eax, [ebp + 0x3c]
push eax
call edi
cmp eax, 0xffffffff
je 0x404714
lea eax, [ebp + 0x38]
call fcn.00404ed2
cmp dword [ebp + 0x4c], ebx
jne 0x404805
mov word [ebp + 0x54], bx
push 0x20a
push ebx
lea eax, [ebp + 0x56]
push eax
call fcn.00407c10
add esp, 0xc
cmp dword [esi + 0x18], 8
jb 0x40473e
mov eax, dword [esi + 4]
jmp 0x404741
lea eax, [esi + 4]
lea ecx, [ebp + 0x54]
push ecx
push 1
push 0x418310
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, ebx
jbe 0x4047b5
mov word [ebp + 0x25e], bx
lea eax, [ebp + 0x54]
lea esi, [ebp + 0x38]
call fcn.00403a77
push 0x418318
call fcn.00407e20
pop ecx
push eax
mov eax, esi
call fcn.00405118
cmp eax, 0xffffffff
je 0x4047b5
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x3c], bx
push eax
lea eax, [ebp - 0x40]
push eax
xor ebx, ebx
mov eax, esi
call fcn.004039f1
push 0xffffffffffffffff
mov eax, esi
push eax
lea eax, [ebp - 0x40]
call fcn.004039f1
push ebx
push 1
lea esi, [ebp - 0x40]
call fcn.00403ae3
cmp dword [ebp + 0x4c], ebx
jne 0x4047cc
push 0xffffffffffffffff
lea eax, [ebp + 0x38]
push eax
xor ebx, ebx
lea eax, [ebp]
call fcn.004039f1
jmp 0x4047e3
mov esi, 0x41831c
push esi
call fcn.00407e20
pop ecx
push esi
mov ebx, eax
lea eax, [ebp + 0x38]
call fcn.004052e8
mov edi, dword [ebp - 0x1c]
cmp dword [edi + 0x54], 0
je 0x404801
cmp dword [edi + 0x58], 8
jb 0x4047f7
mov eax, dword [edi + 0x44]
jmp 0x4047fa
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebx, ebx
jmp 0x404808
mov edi, dword [ebp - 0x1c]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x404814
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x404827
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 dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x404856
push 0xffffffffffffffff
lea eax, [edi + 0x40]
push eax
xor ebx, ebx
lea eax, [ebp + 0x38]
call fcn.004039f1
push ebx
push 1
lea esi, [ebp + 0x38]
call fcn.00403ae3
push ebx
push 1
lea esi, [ebp]
call fcn.00403ae3
cmp dword [ebp - 0x18], 0xffffffff
jne 0x40466c
mov eax, dword [edi]
cmp eax, ebx
je 0x404892
mov esi, dword [eax]
sub esp, 0x1c
mov eax, 0x418334
mov ecx, esp
call fcn.00404e86
mov ecx, dword [edi]
call dword [esi + 0x14]
push ebx
jmp 0x4048f4
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4048ad
lea eax, [edi + 0x40]
add edi, 8
push edi
call fcn.00404ea2
push ebx
push 1
lea esi, [ebp + 0x1c]
call fcn.00403ae3
mov al, byte [ebp - 0x11]
jmp 0x404900
push 1
lea esi, [ebp + 0x1c]
call fcn.00403ae3
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 + 0x260]
xor ecx, ebp
call fcn.004076ec
add ebp, 0x264
leave
ret 8