Function at 0x4024b5
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, 0xd
add esp, 0xfffff004
push eax
dec eax
jne 0x4019f5
mov eax, dword [ebp - 4]
add esp, 0xfffffd00
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
test esi, esi
je 0x4024fa
jmp case.default.0x401a6f
lea eax, [ebp - 0x2024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8024]
add edx, ecx
call fcn.00402ca8
inc ebx
cmp ebx, 6
jl 0x401a28
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 0x401a60
mov edi, ebx
jmp 0x401a66
inc ebx
cmp ebx, 0xd
jl 0x401a45
cmp edi, 0xc
ja case.default.0x401a6f
jmp dword [edi*4 + 0x401a76]
cmp dword [ebp - 8], 2
jne case.default.0x401a6f
lea eax, [ebp - 0x8424]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x8424]
lea eax, [ebp - 0x8824]
call fcn.004071a0
lea eax, [ebp - 0x8824]
call fcn.00402b94
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.00407268
lea eax, [ebp - 0x942c]
call fcn.00405674
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.004056c4
lea eax, [ebp - 0x98d0]
call fcn.00405f18
lea eax, [ebp - 0x98a4]
call fcn.00405f18
lea eax, [ebp - 0x9878]
call fcn.00405f18
jmp 0x401c82
push 0
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d4], 0
je 0x401bff
call fcn.00405468
cmp eax, 4
je 0x401bff
lea edx, [ebp - 0xa8e4]
lea eax, [ebp - 0x8424]
call fcn.00405e94
lea eax, [ebp - 0xa8e4]
call fcn.00402b94
lea eax, [ebp - 0x8424]
call fcn.00407124
mov ebx, eax
cmp ebx, 4
jl 0x401b9a
lea eax, [ebp - 0xa8e4]
call fcn.00407124
cmp eax, ebx
jb 0x401baf
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00405d38
test al, al
jne 0x401c9d
lea eax, [ebp - 0xa4e4]
call fcn.00407124
mov byte [ebp + eax - 0xa4e3], 0
lea eax, [ebp - 0xa904]
mov ecx, 0x1e
xor edx, edx
call fcn.004070d0
mov dword [ebp - 0xa900], 3
mov word [ebp - 0xa8f4], 0x14
lea eax, [ebp - 0xa4e4]
mov dword [ebp - 0xa8fc], eax
lea edx, [ebp - 0xa904]
push edx
call sub.SHELL32.DLL_SHFileOperationA
lea ecx, [ebp - 0xa4e4]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401c82
lea eax, [ebp - 0xa4e4]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401c82
xor ebx, ebx
push ebx
lea eax, [ebp - 0xa4e4]
push eax
push str._s._d.tmp
lea edx, [ebp - 0xad04]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xad04]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401c52
inc ebx
jmp 0x401c22
lea eax, [ebp - 0xad04]
push eax
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401c82
call fcn.00405468
test eax, eax
je 0x401c82
push 4
push 0
lea ecx, [ebp - 0xad04]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [ebp - 0xa4e4]
lea eax, [ebp - 0x942c]
xor ecx, ecx
call fcn.004056fc
test al, al
jne 0x401b34
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.00405694
jmp case.default.0x401a6f
cmp dword [ebp - 8], 0
jne case.default.0x401a6f
cmp dword [0x40c04c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401cdc
mov edx, 0x40c1dc
mov eax, dword [0x40c04c]
call fcn.00407268
cmp byte [ebp - 9], 0
je 0x401cea
lea edi, [ebp - 0x2024]
jmp 0x401cf3
mov eax, esi
call fcn.00402917
mov edi, eax
test bl, bl
je 0x401cfb
xor eax, eax
jmp 0x401d05
mov eax, dword [0x40c04c]
call fcn.00407124
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.00407124
mov edx, eax
mov eax, dword [0x40c04c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.00406f00
mov dword [0x40c04c], eax
test bl, bl
je 0x401d33
mov edx, dword [0x40c04c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x40c04c]
call fcn.00407268
cmp byte [ebp - 9], 0
jne case.default.0x401a6f
mov eax, edi
call fcn.00406ee8
jmp case.default.0x401a6f
cmp dword [ebp - 8], 0
jne case.default.0x401a6f
lea edx, [ebp - 0x2024]
push edx
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401a6f
cmp dword [ebp - 8], 0
jne case.default.0x401a6f
cmp byte [0x40cce2], 0
jne case.default.0x401a6f
lea ebx, [ebp - 0x2024]
xor eax, eax
mov byte [ebp - 0xb104], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401da1
inc ebx
mov eax, ebx
call fcn.00407124
cmp eax, 0x400
jae case.default.0x401a6f
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401dd9
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401dd9
lea edx, [ebx + 2]
lea eax, [ebp - 0xb104]
call fcn.004071a0
jmp 0x401ea8
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401df1
cmp byte [ebx], 0
je 0x401e03
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401e03
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.004071a0
jmp 0x401ea8
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401e4b
mov dword [ebp - 0x1c], 0x400
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0xb104]
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 - 0xb104], 0
je 0x401e7d
lea eax, [ebp - 0xb104]
call fcn.00407124
xor edx, edx
mov dl, byte [ebp + eax - 0xb105]
cmp edx, 0x5c
je 0x401e7d
mov edx, 0x40c098
lea eax, [ebp - 0xb104]
call fcn.00407268
lea eax, [ebp - 0xb104]
call fcn.00407124
mov edi, eax
mov eax, ebx
call fcn.00407124
add edi, eax
cmp edi, 0x3ff
jae 0x401ea8
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.00407268
lea eax, [ebp - 0xb104]
mov edx, 0x22
call fcn.00407148
test eax, eax
je 0x401ec5
cmp byte [eax + 1], 0
jne 0x401ec5
mov byte [eax], 0
lea edx, [ebp - 0xb104]
mov eax, 0x40e240
call fcn.004071a0
lea eax, [ebp - 0xb104]
call fcn.00402a92
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [ebp - 0xb104]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x40e240
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb104]
mov eax, 0x40e240
call fcn.004071d0
test eax, eax
je case.default.0x401a6f
lea edx, [ebp - 0xb104]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401a6f
cmp dword [0x40ccdc], 1
je case.default.0x401a6f
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.004072c4
test eax, eax
je 0x401f70
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x40ccdc], edx
jmp case.default.0x401a6f
mov dword [0x40ccdc], 2
jmp case.default.0x401a6f
mov cl, byte [ebp - 0x2024]
sub cl, 1
jb 0x401faf
sub cl, 0x2f
je 0x401f9c
dec cl
je 0x401faf
dec cl
je 0x401fc2
jmp case.default.0x401a6f
mov byte [0x40d580], 0
mov byte [0x40d581], 0
jmp case.default.0x401a6f
mov byte [0x40d580], 0
mov byte [0x40d581], 1
jmp case.default.0x401a6f
mov byte [0x40d580], 1
mov byte [0x40d581], 0
jmp case.default.0x401a6f
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.00406f28
sub eax, 0x46
je 0x401fee
sub eax, 0xf
je 0x401ffa
jmp 0x402006
mov byte [0x40d582], 1
jmp case.default.0x401a6f
mov byte [0x40d583], 1
jmp case.default.0x401a6f
mov byte [0x40d582], 0
mov byte [0x40d583], 0
jmp case.default.0x401a6f
cmp dword [ebp - 8], 4
jne case.default.0x401a6f
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.004025ff
jmp case.default.0x401a6f
cmp dword [ebp - 8], 1
jne 0x402188
lea ecx, [ebp - 0xb504]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xb504]
call fcn.00402b94
xor ebx, ebx
push ebx
lea eax, [ebp - 0xb504]
push dword [0x40c040]
push eax
lea edx, [ebp - 0xb904]
push str._s_s_d
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x14
lea ecx, [ebp - 0xb904]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x402093
inc ebx
jmp 0x40205d
lea eax, [ebp - 0xb904]
push eax
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2024], 0
je 0x402188
cmp byte [0x40c058], 0
jne 0x402188
mov byte [ebp - 0xbb04], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.00407134
test eax, eax
jne 0x402113
xor ebx, ebx
jmp 0x402109
xor eax, eax
mov al, byte [ebp + ebx - 0x2024]
cmp eax, 0x40
jne 0x402108
lea edx, [ebp - 0x2023]
lea eax, [ebp - 0xbb04]
add edx, ebx
call fcn.004071a0
mov byte [ebp + ebx - 0x2024], 0
jmp 0x402113
inc ebx
cmp byte [ebp + ebx - 0x2024], 0
jne 0x4020dd
cmp byte [ebp - 0xbb04], 0
jne 0x40213e
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0x2024]
call fcn.004071a0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb04]
call fcn.004071a0
lea eax, [ebp - 0x2024]
call fcn.00402f68
mov byte [ebp - 0x1824], 0
push 0x24
lea edx, [ebp - 0xbb04]
push edx
lea ecx, [ebp - 0x2024]
push ecx
push dword [ebp - 4]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x402188
push 1
mov byte [0x40c044], 1
push dword [ebp - 4]
mov dword [0x40d56c], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401a6f
cmp dword [0x40ccdc], 0
jne 0x4021a5
mov dword [0x40ccdc], 2
mov byte [0x40ccd8], 1
jmp case.default.0x401a6f
cmp dword [ebp - 8], 3
jne 0x4021db
cmp byte [ebp - 0x2024], 0
je 0x4021cf
lea eax, [ebp - 0x2024]
push eax
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.00402917
mov dword [0x40c050], eax
mov byte [0x40c059], 1
jmp case.default.0x401a6f
cmp dword [ebp - 8], 5
jne case.default.0x401a6f
lea eax, [ebp - 0x2024]
mov dl, 1
call fcn.004025ff
jmp case.default.0x401a6f
cmp dword [ebp - 8], 6
jne case.default.0x401a6f
xor eax, eax
mov al, byte [ebp - 0x8024]
call fcn.00406f28
sub eax, 0x50
je 0x40223b
sub eax, 3
je 0x402229
dec eax
je 0x402232
jmp 0x402244
mov dword [ebp - 0x20], 0xb
jmp 0x40224b
mov dword [ebp - 0x20], 7
jmp 0x40224b
mov dword [ebp - 0x20], 2
jmp 0x40224b
mov dword [ebp - 0x20], 0x10
mov byte [ebp - 0xcb04], 0
mov byte [ebp - 0xcf04], 0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbf04]
call fcn.004071a0
xor edx, edx
mov dl, byte [ebp - 0xbf04]
cmp edx, 0x22
jne 0x4022d6
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf04]
call fcn.004071a0
cmp byte [0x40ef54], 0
je 0x4022a8
lea edx, [ebp - 0xbf03]
mov eax, 0x40ee54
mov ecx, 0x22
call fcn.00406e84
jmp 0x4022b8
lea eax, [ebp - 0xbf03]
mov edx, 0x22
call fcn.00407134
test eax, eax
je 0x402378
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcf04]
call fcn.004071a0
jmp 0x402378
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.00406224
test al, al
jne 0x402378
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edi, [ebp - 0xbf04]
jmp 0x402367
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x40230a
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x402366
mov bl, byte [edi]
mov byte [edi], 0
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.00406224
test al, al
je 0x402364
mov dword [ebp - 0x24], edi
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x402343
mov byte [ebp - 0xcf04], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xcf03]
call fcn.004071a0
jmp 0x40235d
inc edi
jmp 0x402347
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x402346
lea eax, [ebp - 0xcf04]
mov edx, edi
call fcn.004071a0
mov ecx, dword [ebp - 0x24]
mov byte [ecx], bl
jmp 0x402366
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x4022f8
cmp dword [ebp - 0x24], 0
je 0x402378
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
cmp byte [ebp - 0x3024], 0
je 0x402392
lea edx, [ebp - 0xcb04]
lea eax, [ebp - 0x3024]
call fcn.004062b8
lea edx, [ebp - 0xc304]
lea eax, [ebp - 0xbf04]
call fcn.004062b8
lea eax, [ebp - 0xc704]
mov edx, dword [ebp - 0x20]
call fcn.00402e80
lea eax, [ebp - 0xc704]
call fcn.00402b94
cmp byte [ebp - 0x6024], 0
je 0x4023e1
lea edx, [ebp - 0x6024]
lea eax, [ebp - 0xc704]
call fcn.00407268
lea eax, [ebp - 0xc704]
call fcn.00402b94
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xd304]
call fcn.004071a0
cmp byte [ebp - 0x4024], 0
je 0x402403
lea eax, [ebp - 0x4024]
jmp 0x402409
lea eax, [ebp - 0x7024]
call fcn.00405be4
mov edx, eax
lea eax, [ebp - 0xc704]
call fcn.00407268
lea eax, [ebp - 0xc704]
call fcn.00405d00
test eax, eax
je 0x402438
mov edx, str..lnk
call fcn.00407220
test eax, eax
je 0x402448
mov edx, str..lnk
lea eax, [ebp - 0xc704]
call fcn.00407268
lea eax, [ebp - 0xc704]
mov cl, 1
xor edx, edx
call fcn.0040608c
cmp byte [ebp - 0xcb04], 0
je 0x402468
lea eax, [ebp - 0xcb04]
jmp 0x40246a
xor eax, eax
push eax
cmp byte [ebp - 0xcf04], 0
je 0x40247c
lea edx, [ebp - 0xcf04]
jmp 0x40247e
xor edx, edx
push edx
cmp byte [ebp - 0x5024], 0
je 0x402490
lea ecx, [ebp - 0x5024]
jmp 0x402492
xor ecx, ecx
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xc304]
call fcn.00402d70
cmp byte [ebp - 0xd304], 0
je case.default.0x401a6f
push 0
lea eax, [ebp - 0xd304]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401a6f
cmp dword [ebp - 8], 7
jne case.default.0x401a6f
mov byte [0x40cce0], 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.00402501
mov esi, eax
test eax, eax
jne 0x401a20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret