Function at 0x402452
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0xc
add esp, 0xfffff004
push eax
dec eax
jne 0x4019f3
mov eax, dword [ebp - 4]
add esp, 0xfffff104
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
test esi, esi
je 0x402497
jmp case.default.0x401a6d
lea eax, [ebp - 0x2024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8024]
add edx, ecx
call fcn.00402c44
inc ebx
cmp ebx, 6
jl 0x401a26
or edi, 0xffffffff
xor ebx, ebx
push dword [ebx*4 + 0x40c064]
lea eax, [ebp - 0x1024]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401a5e
mov edi, ebx
jmp 0x401a64
inc ebx
cmp ebx, 0xc
jl 0x401a43
cmp edi, 0xb
ja case.default.0x401a6d
jmp dword [edi*4 + 0x401a74]
cmp dword [ebp - 8], 2
jne case.default.0x401a6d
lea eax, [ebp - 0x8424]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x8424]
lea eax, [ebp - 0x8824]
call fcn.0040708c
lea eax, [ebp - 0x8824]
call fcn.00402b30
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.00407154
lea eax, [ebp - 0x942c]
call fcn.004055fc
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.00405650
lea eax, [ebp - 0x98cc]
call fcn.00405e34
lea eax, [ebp - 0x98a0]
call fcn.00405e34
lea eax, [ebp - 0x9874]
call fcn.00405e34
jmp 0x401c7c
push 0
lea edx, [ebp - 0xa4e0]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d0], 0
je 0x401bf9
call fcn.004053f0
cmp eax, 4
je 0x401bf9
lea edx, [ebp - 0xa8e0]
lea eax, [ebp - 0x8424]
call fcn.00405db0
lea eax, [ebp - 0xa8e0]
call fcn.00402b30
lea eax, [ebp - 0x8424]
call fcn.00407010
mov ebx, eax
cmp ebx, 4
jl 0x401b94
lea eax, [ebp - 0xa8e0]
call fcn.00407010
cmp eax, ebx
jb 0x401ba9
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00405c54
test al, al
jne 0x401c97
lea eax, [ebp - 0xa4e0]
call fcn.00407010
mov byte [ebp + eax - 0xa4df], 0
lea eax, [ebp - 0xa900]
mov ecx, 0x1e
xor edx, edx
call fcn.00406fbc
mov dword [ebp - 0xa8fc], 3
mov word [ebp - 0xa8f0], 0x14
lea eax, [ebp - 0xa4e0]
mov dword [ebp - 0xa8f8], eax
lea edx, [ebp - 0xa900]
push edx
call sub.SHELL32.DLL_SHFileOperationA
lea ecx, [ebp - 0xa4e0]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401c7c
lea eax, [ebp - 0xa4e0]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401c7c
xor ebx, ebx
push ebx
lea eax, [ebp - 0xa4e0]
push eax
push str._s._d.tmp
lea edx, [ebp - 0xad00]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xad00]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401c4c
inc ebx
jmp 0x401c1c
lea eax, [ebp - 0xad00]
push eax
lea edx, [ebp - 0xa4e0]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401c7c
call fcn.004053f0
test eax, eax
je 0x401c7c
push 4
push 0
lea ecx, [ebp - 0xad00]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [ebp - 0xa4e0]
lea eax, [ebp - 0x942c]
xor ecx, ecx
call fcn.00405688
test al, al
jne 0x401b2e
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.00405620
jmp case.default.0x401a6d
cmp dword [ebp - 8], 0
jne case.default.0x401a6d
cmp dword [0x40c04c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401cd6
mov edx, 0x40c1d1
mov eax, dword [0x40c04c]
call fcn.00407154
cmp byte [ebp - 9], 0
je 0x401ce4
lea edi, [ebp - 0x2024]
jmp 0x401ced
mov eax, esi
call fcn.004028b4
mov edi, eax
test bl, bl
je 0x401cf5
xor eax, eax
jmp 0x401cff
mov eax, dword [0x40c04c]
call fcn.00407010
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.00407010
mov edx, eax
mov eax, dword [0x40c04c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.00406dec
mov dword [0x40c04c], eax
test bl, bl
je 0x401d2d
mov edx, dword [0x40c04c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x40c04c]
call fcn.00407154
cmp byte [ebp - 9], 0
jne case.default.0x401a6d
mov eax, edi
call fcn.00406dd4
jmp case.default.0x401a6d
cmp dword [ebp - 8], 0
jne case.default.0x401a6d
lea edx, [ebp - 0x2024]
push edx
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401a6d
cmp dword [ebp - 8], 0
jne case.default.0x401a6d
cmp byte [0x40ccda], 0
jne case.default.0x401a6d
lea ebx, [ebp - 0x2024]
xor eax, eax
mov byte [ebp - 0xb100], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401d9b
inc ebx
mov eax, ebx
call fcn.00407010
cmp eax, 0x400
jae case.default.0x401a6d
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401dd3
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401dd3
lea edx, [ebx + 2]
lea eax, [ebp - 0xb100]
call fcn.0040708c
jmp 0x401ea2
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401deb
cmp byte [ebx], 0
je 0x401dfd
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401dfd
lea eax, [ebp - 0xb100]
mov edx, ebx
call fcn.0040708c
jmp 0x401ea2
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401e45
mov dword [ebp - 0x1c], 0x400
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0xb100]
push edx
lea ecx, [ebp - 0x18]
push ecx
push 0
push str.ProgramFilesDir
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegQueryValueExA
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegCloseKey
cmp byte [ebp - 0xb100], 0
je 0x401e77
lea eax, [ebp - 0xb100]
call fcn.00407010
xor edx, edx
mov dl, byte [ebp + eax - 0xb101]
cmp edx, 0x5c
je 0x401e77
mov edx, 0x40c094
lea eax, [ebp - 0xb100]
call fcn.00407154
lea eax, [ebp - 0xb100]
call fcn.00407010
mov edi, eax
mov eax, ebx
call fcn.00407010
add edi, eax
cmp edi, 0x3ff
jae 0x401ea2
lea eax, [ebp - 0xb100]
mov edx, ebx
call fcn.00407154
lea eax, [ebp - 0xb100]
mov edx, 0x22
call fcn.00407034
test eax, eax
je 0x401ebf
cmp byte [eax + 1], 0
jne 0x401ebf
mov byte [eax], 0
lea edx, [ebp - 0xb100]
mov eax, 0x40e23c
call fcn.0040708c
lea eax, [ebp - 0xb100]
call fcn.00402a2f
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [ebp - 0xb100]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x40e23c
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb100]
mov eax, 0x40e23c
call fcn.004070bc
test eax, eax
je case.default.0x401a6d
lea edx, [ebp - 0xb100]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401a6d
cmp dword [0x40ccd4], 1
je case.default.0x401a6d
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.004071b0
test eax, eax
je 0x401f6a
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x40ccd4], edx
jmp case.default.0x401a6d
mov dword [0x40ccd4], 2
jmp case.default.0x401a6d
mov cl, byte [ebp - 0x2024]
sub cl, 1
jb 0x401faa
sub cl, 0x2f
je 0x401f96
dec cl
je 0x401faa
dec cl
je 0x401fc1
jmp case.default.0x401a6d
xor eax, eax
mov dword [0x40d568], eax
xor edx, edx
mov dword [0x40d56c], edx
jmp case.default.0x401a6d
xor ecx, ecx
mov dword [0x40d568], ecx
mov dword [0x40d56c], 1
jmp case.default.0x401a6d
mov dword [0x40d568], 1
xor eax, eax
mov dword [0x40d56c], eax
jmp case.default.0x401a6d
cmp dword [ebp - 8], 4
jne case.default.0x401a6d
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.0040259c
jmp case.default.0x401a6d
cmp dword [ebp - 8], 1
jne 0x402146
lea ecx, [ebp - 0xb500]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xb500]
call fcn.00402b30
xor ebx, ebx
push ebx
lea eax, [ebp - 0xb500]
push dword [0x40c040]
push eax
lea edx, [ebp - 0xb900]
push str._s_s_d
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x14
lea ecx, [ebp - 0xb900]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x402051
inc ebx
jmp 0x40201b
lea eax, [ebp - 0xb900]
push eax
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2024], 0
je 0x402146
cmp byte [0x40c058], 0
jne 0x402146
mov byte [ebp - 0xbb00], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.00407020
test eax, eax
jne 0x4020d1
xor ebx, ebx
jmp 0x4020c7
xor eax, eax
mov al, byte [ebp + ebx - 0x2024]
cmp eax, 0x40
jne 0x4020c6
lea edx, [ebp - 0x2023]
lea eax, [ebp - 0xbb00]
add edx, ebx
call fcn.0040708c
mov byte [ebp + ebx - 0x2024], 0
jmp 0x4020d1
inc ebx
cmp byte [ebp + ebx - 0x2024], 0
jne 0x40209b
cmp byte [ebp - 0xbb00], 0
jne 0x4020fc
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0x2024]
call fcn.0040708c
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb00]
call fcn.0040708c
lea eax, [ebp - 0x2024]
call fcn.00402f04
mov byte [ebp - 0x1824], 0
push 0x24
lea edx, [ebp - 0xbb00]
push edx
lea ecx, [ebp - 0x2024]
push ecx
push dword [ebp - 4]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x402146
push 1
mov byte [0x40c044], 1
push dword [ebp - 4]
mov dword [0x40d564], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401a6d
cmp dword [0x40ccd4], 0
jne 0x402163
mov dword [0x40ccd4], 2
mov byte [0x40ccd0], 1
jmp case.default.0x401a6d
cmp dword [ebp - 8], 3
jne 0x402199
cmp byte [ebp - 0x2024], 0
je 0x40218d
lea eax, [ebp - 0x2024]
push eax
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.004028b4
mov dword [0x40c050], eax
mov byte [0x40c059], 1
jmp case.default.0x401a6d
cmp dword [ebp - 8], 5
jne case.default.0x401a6d
lea eax, [ebp - 0x2024]
mov dl, 1
call fcn.0040259c
jmp case.default.0x401a6d
cmp dword [ebp - 8], 6
jne case.default.0x401a6d
xor eax, eax
mov al, byte [ebp - 0x8024]
call fcn.00406e14
sub eax, 0x50
je 0x4021f9
sub eax, 3
je 0x4021e7
dec eax
je 0x4021f0
jmp 0x402202
mov dword [ebp - 0x20], 0xb
jmp 0x402209
mov dword [ebp - 0x20], 7
jmp 0x402209
mov dword [ebp - 0x20], 2
jmp 0x402209
mov dword [ebp - 0x20], 0x10
mov byte [ebp - 0xcb00], 0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbf00]
call fcn.0040708c
xor edx, edx
mov dl, byte [ebp - 0xbf00]
cmp edx, 0x22
jne 0x40228d
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf00]
call fcn.0040708c
cmp byte [0x40ef50], 0
je 0x40225f
lea edx, [ebp - 0xbeff]
mov eax, 0x40ee50
mov ecx, 0x22
call fcn.00406d70
jmp 0x40226f
lea eax, [ebp - 0xbeff]
mov edx, 0x22
call fcn.00407020
test eax, eax
je 0x40232f
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcb00]
call fcn.0040708c
jmp 0x40232f
lea eax, [ebp - 0xbf00]
xor edx, edx
call fcn.00406140
test al, al
jne 0x40232f
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edi, [ebp - 0xbf00]
jmp 0x40231e
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x4022c1
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x40231d
mov bl, byte [edi]
mov byte [edi], 0
lea eax, [ebp - 0xbf00]
xor edx, edx
call fcn.00406140
test al, al
je 0x40231b
mov dword [ebp - 0x24], edi
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x4022fa
mov byte [ebp - 0xcb00], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xcaff]
call fcn.0040708c
jmp 0x402314
inc edi
jmp 0x4022fe
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x4022fd
lea eax, [ebp - 0xcb00]
mov edx, edi
call fcn.0040708c
mov ecx, dword [ebp - 0x24]
mov byte [ecx], bl
jmp 0x40231d
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x4022af
cmp dword [ebp - 0x24], 0
je 0x40232f
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
lea edx, [ebp - 0xc300]
lea eax, [ebp - 0xbf00]
call fcn.004061d4
lea eax, [ebp - 0xc700]
mov edx, dword [ebp - 0x20]
call fcn.00402e1c
lea eax, [ebp - 0xc700]
call fcn.00402b30
cmp byte [ebp - 0x6024], 0
je 0x40237e
lea edx, [ebp - 0x6024]
lea eax, [ebp - 0xc700]
call fcn.00407154
lea eax, [ebp - 0xc700]
call fcn.00402b30
lea edx, [ebp - 0xc700]
lea eax, [ebp - 0xcf00]
call fcn.0040708c
cmp byte [ebp - 0x4024], 0
je 0x4023a0
lea eax, [ebp - 0x4024]
jmp 0x4023a6
lea eax, [ebp - 0x7024]
call fcn.00405b00
mov edx, eax
lea eax, [ebp - 0xc700]
call fcn.00407154
lea eax, [ebp - 0xc700]
call fcn.00405c1c
test eax, eax
je 0x4023d5
mov edx, str..lnk
call fcn.0040710c
test eax, eax
je 0x4023e5
mov edx, str..lnk
lea eax, [ebp - 0xc700]
call fcn.00407154
lea eax, [ebp - 0xc700]
mov cl, 1
xor edx, edx
call fcn.00405fa8
cmp byte [ebp - 0x3024], 0
je 0x402405
lea eax, [ebp - 0x3024]
jmp 0x402407
xor eax, eax
push eax
cmp byte [ebp - 0xcb00], 0
je 0x402419
lea edx, [ebp - 0xcb00]
jmp 0x40241b
xor edx, edx
push edx
cmp byte [ebp - 0x5024], 0
je 0x40242d
lea ecx, [ebp - 0x5024]
jmp 0x40242f
xor ecx, ecx
lea edx, [ebp - 0xc700]
lea eax, [ebp - 0xc300]
call fcn.00402d0c
cmp byte [ebp - 0xcf00], 0
je case.default.0x401a6d
push 0
lea eax, [ebp - 0xcf00]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401a6d
cmp dword [ebp - 8], 7
jne case.default.0x401a6d
mov byte [0x40ccd8], 1
lea edx, [ebp - 9]
push edx
lea ecx, [ebp - 0xa]
push ecx
push 0x1000
lea ecx, [ebp - 0x2024]
lea edx, [ebp - 0x1024]
mov eax, esi
call fcn.0040249e
mov esi, eax
test eax, eax
jne 0x401a1e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret