Function at 0x40253a
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 0x401adb
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 0x40257f
jmp case.default.0x401b55
lea eax, [ebp - 0x2024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8024]
add edx, ecx
call fcn.00402d08
inc ebx
cmp ebx, 6
jl 0x401b0e
or edi, 0xffffffff
xor ebx, ebx
push dword [ebx*4 + 0x412064]
lea eax, [ebp - 0x1024]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401b46
mov edi, ebx
jmp 0x401b4c
inc ebx
cmp ebx, 0xc
jl 0x401b2b
cmp edi, 0xb
ja case.default.0x401b55
jmp dword [edi*4 + 0x401b5c]
cmp dword [ebp - 8], 2
jne case.default.0x401b55
lea eax, [ebp - 0x8424]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x8424]
lea eax, [ebp - 0x8824]
call fcn.0040ceac
lea eax, [ebp - 0x8824]
call fcn.00402bf4
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.0040cf74
lea eax, [ebp - 0x942c]
call fcn.00405a34
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.00405a88
lea eax, [ebp - 0x98cc]
call fcn.00406714
lea eax, [ebp - 0x98a0]
call fcn.00406714
lea eax, [ebp - 0x9874]
call fcn.00406714
jmp 0x401d64
push 0
lea edx, [ebp - 0xa4e0]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d0], 0
je 0x401ce1
call fcn.004056e0
cmp eax, 4
je 0x401ce1
lea edx, [ebp - 0xa8e0]
lea eax, [ebp - 0x8424]
call fcn.00406600
lea eax, [ebp - 0xa8e0]
call fcn.00402bf4
lea eax, [ebp - 0x8424]
call fcn.0040ce30
mov ebx, eax
cmp ebx, 4
jl 0x401c7c
lea eax, [ebp - 0xa8e0]
call fcn.0040ce30
cmp eax, ebx
jb 0x401c91
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00406334
test al, al
jne 0x401d7f
lea eax, [ebp - 0xa4e0]
call fcn.0040ce30
mov byte [ebp + eax - 0xa4df], 0
lea eax, [ebp - 0xa900]
mov ecx, 0x1e
xor edx, edx
call fcn.0040cda8
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 0x401d64
lea eax, [ebp - 0xa4e0]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401d64
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 0x401d34
inc ebx
jmp 0x401d04
lea eax, [ebp - 0xad00]
push eax
lea edx, [ebp - 0xa4e0]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401d64
call fcn.004056e0
test eax, eax
je 0x401d64
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.00405ac0
test al, al
jne 0x401c16
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.00405a58
jmp case.default.0x401b55
cmp dword [ebp - 8], 0
jne case.default.0x401b55
cmp dword [0x41204c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401dbe
mov edx, 0x4121e0
mov eax, dword [0x41204c]
call fcn.0040cf74
cmp byte [ebp - 9], 0
je 0x401dcc
lea edi, [ebp - 0x2024]
jmp 0x401dd5
mov eax, esi
call fcn.0040299c
mov edi, eax
test bl, bl
je 0x401ddd
xor eax, eax
jmp 0x401de7
mov eax, dword [0x41204c]
call fcn.0040ce30
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.0040ce30
mov edx, eax
mov eax, dword [0x41204c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.0040cd44
mov dword [0x41204c], eax
test bl, bl
je 0x401e15
mov edx, dword [0x41204c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x41204c]
call fcn.0040cf74
cmp byte [ebp - 9], 0
jne case.default.0x401b55
mov eax, edi
call fcn.0040cd2c
jmp case.default.0x401b55
cmp dword [ebp - 8], 0
jne case.default.0x401b55
lea edx, [ebp - 0x2024]
push edx
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401b55
cmp dword [ebp - 8], 0
jne case.default.0x401b55
cmp byte [0x4128be], 0
jne case.default.0x401b55
lea ebx, [ebp - 0x2024]
xor eax, eax
mov byte [ebp - 0xb100], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401e83
inc ebx
mov eax, ebx
call fcn.0040ce30
cmp eax, 0x400
jae case.default.0x401b55
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401ebb
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401ebb
lea edx, [ebx + 2]
lea eax, [ebp - 0xb100]
call fcn.0040ceac
jmp 0x401f8a
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401ed3
cmp byte [ebx], 0
je 0x401ee5
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401ee5
lea eax, [ebp - 0xb100]
mov edx, ebx
call fcn.0040ceac
jmp 0x401f8a
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401f2d
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 0x401f5f
lea eax, [ebp - 0xb100]
call fcn.0040ce30
xor edx, edx
mov dl, byte [ebp + eax - 0xb101]
cmp edx, 0x5c
je 0x401f5f
mov edx, 0x412094
lea eax, [ebp - 0xb100]
call fcn.0040cf74
lea eax, [ebp - 0xb100]
call fcn.0040ce30
mov edi, eax
mov eax, ebx
call fcn.0040ce30
add edi, eax
cmp edi, 0x3ff
jae 0x401f8a
lea eax, [ebp - 0xb100]
mov edx, ebx
call fcn.0040cf74
lea eax, [ebp - 0xb100]
mov edx, 0x22
call fcn.0040ce54
test eax, eax
je 0x401fa7
cmp byte [eax + 1], 0
jne 0x401fa7
mov byte [eax], 0
lea edx, [ebp - 0xb100]
mov eax, 0x413dfc
call fcn.0040ceac
lea eax, [ebp - 0xb100]
call fcn.00402b17
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 0x413dfc
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb100]
mov eax, 0x413dfc
call fcn.0040cedc
test eax, eax
je case.default.0x401b55
lea edx, [ebp - 0xb100]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401b55
cmp dword [0x4128b8], 1
je case.default.0x401b55
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.0040cfb8
test eax, eax
je 0x402052
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x4128b8], edx
jmp case.default.0x401b55
mov dword [0x4128b8], 2
jmp case.default.0x401b55
mov cl, byte [ebp - 0x2024]
sub cl, 1
jb 0x402092
sub cl, 0x2f
je 0x40207e
dec cl
je 0x402092
dec cl
je 0x4020a9
jmp case.default.0x401b55
xor eax, eax
mov dword [0x41314c], eax
xor edx, edx
mov dword [0x413150], edx
jmp case.default.0x401b55
xor ecx, ecx
mov dword [0x41314c], ecx
mov dword [0x413150], 1
jmp case.default.0x401b55
mov dword [0x41314c], 1
xor eax, eax
mov dword [0x413150], eax
jmp case.default.0x401b55
cmp dword [ebp - 8], 4
jne case.default.0x401b55
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00402684
jmp case.default.0x401b55
cmp dword [ebp - 8], 1
jne 0x40222e
lea ecx, [ebp - 0xb500]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xb500]
call fcn.00402bf4
xor ebx, ebx
push ebx
lea eax, [ebp - 0xb500]
push dword [0x412040]
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 0x402139
inc ebx
jmp 0x402103
lea eax, [ebp - 0xb900]
push eax
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2024], 0
je 0x40222e
cmp byte [0x412058], 0
jne 0x40222e
mov byte [ebp - 0xbb00], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.0040ce40
test eax, eax
jne 0x4021b9
xor ebx, ebx
jmp 0x4021af
xor eax, eax
mov al, byte [ebp + ebx - 0x2024]
cmp eax, 0x40
jne 0x4021ae
lea edx, [ebp - 0x2023]
lea eax, [ebp - 0xbb00]
add edx, ebx
call fcn.0040ceac
mov byte [ebp + ebx - 0x2024], 0
jmp 0x4021b9
inc ebx
cmp byte [ebp + ebx - 0x2024], 0
jne 0x402183
cmp byte [ebp - 0xbb00], 0
jne 0x4021e4
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0x2024]
call fcn.0040ceac
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb00]
call fcn.0040ceac
lea eax, [ebp - 0x2024]
call fcn.00402fc8
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 0x40222e
push 1
mov byte [0x412044], 1
push dword [ebp - 4]
mov dword [0x413148], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401b55
cmp dword [0x4128b8], 0
jne 0x40224b
mov dword [0x4128b8], 2
mov byte [0x4128b4], 1
jmp case.default.0x401b55
cmp dword [ebp - 8], 3
jne 0x402281
cmp byte [ebp - 0x2024], 0
je 0x402275
lea eax, [ebp - 0x2024]
push eax
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.0040299c
mov dword [0x412050], eax
mov byte [0x412059], 1
jmp case.default.0x401b55
cmp dword [ebp - 8], 5
jne case.default.0x401b55
lea eax, [ebp - 0x2024]
mov dl, 1
call fcn.00402684
jmp case.default.0x401b55
cmp dword [ebp - 8], 6
jne case.default.0x401b55
xor eax, eax
mov al, byte [ebp - 0x8024]
call fcn.0040cd6c
sub eax, 0x50
je 0x4022e1
sub eax, 3
je 0x4022cf
dec eax
je 0x4022d8
jmp 0x4022ea
mov dword [ebp - 0x20], 0xb
jmp 0x4022f1
mov dword [ebp - 0x20], 7
jmp 0x4022f1
mov dword [ebp - 0x20], 2
jmp 0x4022f1
mov dword [ebp - 0x20], 0x10
mov byte [ebp - 0xcb00], 0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbf00]
call fcn.0040ceac
xor edx, edx
mov dl, byte [ebp - 0xbf00]
cmp edx, 0x22
jne 0x402375
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf00]
call fcn.0040ceac
cmp byte [0x414f38], 0
je 0x402347
lea edx, [ebp - 0xbeff]
mov eax, 0x414e38
mov ecx, 0x22
call fcn.0040d7b4
jmp 0x402357
lea eax, [ebp - 0xbeff]
mov edx, 0x22
call fcn.0040ce40
test eax, eax
je 0x402417
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcb00]
call fcn.0040ceac
jmp 0x402417
lea eax, [ebp - 0xbf00]
xor edx, edx
call fcn.00406d0c
test al, al
jne 0x402417
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edi, [ebp - 0xbf00]
jmp 0x402406
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x4023a9
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x402405
mov bl, byte [edi]
mov byte [edi], 0
lea eax, [ebp - 0xbf00]
xor edx, edx
call fcn.00406d0c
test al, al
je 0x402403
mov dword [ebp - 0x24], edi
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x4023e2
mov byte [ebp - 0xcb00], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xcaff]
call fcn.0040ceac
jmp 0x4023fc
inc edi
jmp 0x4023e6
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x4023e5
lea eax, [ebp - 0xcb00]
mov edx, edi
call fcn.0040ceac
mov ecx, dword [ebp - 0x24]
mov byte [ecx], bl
jmp 0x402405
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x402397
cmp dword [ebp - 0x24], 0
je 0x402417
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
lea edx, [ebp - 0xc300]
lea eax, [ebp - 0xbf00]
call fcn.00406dd8
lea eax, [ebp - 0xc700]
mov edx, dword [ebp - 0x20]
call fcn.00402ee0
lea eax, [ebp - 0xc700]
call fcn.00402bf4
cmp byte [ebp - 0x6024], 0
je 0x402466
lea edx, [ebp - 0x6024]
lea eax, [ebp - 0xc700]
call fcn.0040cf74
lea eax, [ebp - 0xc700]
call fcn.00402bf4
lea edx, [ebp - 0xc700]
lea eax, [ebp - 0xcf00]
call fcn.0040ceac
cmp byte [ebp - 0x4024], 0
je 0x402488
lea eax, [ebp - 0x4024]
jmp 0x40248e
lea eax, [ebp - 0x7024]
call fcn.00405f94
mov edx, eax
lea eax, [ebp - 0xc700]
call fcn.0040cf74
lea eax, [ebp - 0xc700]
call fcn.004062d0
test eax, eax
je 0x4024bd
mov edx, str..lnk
call fcn.0040cf2c
test eax, eax
je 0x4024cd
mov edx, str..lnk
lea eax, [ebp - 0xc700]
call fcn.0040cf74
lea eax, [ebp - 0xc700]
mov cl, 1
xor edx, edx
call fcn.00406a18
cmp byte [ebp - 0x3024], 0
je 0x4024ed
lea eax, [ebp - 0x3024]
jmp 0x4024ef
xor eax, eax
push eax
cmp byte [ebp - 0xcb00], 0
je 0x402501
lea edx, [ebp - 0xcb00]
jmp 0x402503
xor edx, edx
push edx
cmp byte [ebp - 0x5024], 0
je 0x402515
lea ecx, [ebp - 0x5024]
jmp 0x402517
xor ecx, ecx
lea edx, [ebp - 0xc700]
lea eax, [ebp - 0xc300]
call fcn.00402dd0
cmp byte [ebp - 0xcf00], 0
je case.default.0x401b55
push 0
lea eax, [ebp - 0xcf00]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401b55
cmp dword [ebp - 8], 7
jne case.default.0x401b55
mov byte [0x4128bc], 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.00402586
mov esi, eax
test eax, eax
jne 0x401b06
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret