Function at 0x401ade
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0xd
add esp, 0xfffff004
push eax
dec eax
jne 0x401ae7
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 0x4025ec
jmp case.default.0x401b61
lea eax, [ebp - 0x2024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8024]
add edx, ecx
call fcn.00402d74
inc ebx
cmp ebx, 6
jl 0x401b1a
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 0x401b52
mov edi, ebx
jmp 0x401b58
inc ebx
cmp ebx, 0xd
jl 0x401b37
cmp edi, 0xc
ja case.default.0x401b61
jmp dword [edi*4 + 0x401b68]
cmp dword [ebp - 8], 2
jne case.default.0x401b61
lea eax, [ebp - 0x8424]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x8424]
lea eax, [ebp - 0x8824]
call fcn.0040d3f4
lea eax, [ebp - 0x8824]
call fcn.00402c60
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.0040d4bc
lea eax, [ebp - 0x942c]
call fcn.00405b0c
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.00405b5c
lea eax, [ebp - 0x98d0]
call fcn.00406a5c
lea eax, [ebp - 0x98a4]
call fcn.00406a5c
lea eax, [ebp - 0x9878]
call fcn.00406a5c
jmp 0x401d74
push 0
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d4], 0
je 0x401cf1
call fcn.004057b8
cmp eax, 4
je 0x401cf1
lea edx, [ebp - 0xa8e4]
lea eax, [ebp - 0x8424]
call fcn.0040691c
lea eax, [ebp - 0xa8e4]
call fcn.00402c60
lea eax, [ebp - 0x8424]
call fcn.0040d378
mov ebx, eax
cmp ebx, 4
jl 0x401c8c
lea eax, [ebp - 0xa8e4]
call fcn.0040d378
cmp eax, ebx
jb 0x401ca1
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.0040641c
test al, al
jne 0x401d8f
lea eax, [ebp - 0xa4e4]
call fcn.0040d378
mov byte [ebp + eax - 0xa4e3], 0
lea eax, [ebp - 0xa904]
mov ecx, 0x1e
xor edx, edx
call fcn.0040d2f0
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 0x401d74
lea eax, [ebp - 0xa4e4]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401d74
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 0x401d44
inc ebx
jmp 0x401d14
lea eax, [ebp - 0xad04]
push eax
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401d74
call fcn.004057b8
test eax, eax
je 0x401d74
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.00405b94
test al, al
jne 0x401c26
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.00405b2c
jmp case.default.0x401b61
cmp dword [ebp - 8], 0
jne case.default.0x401b61
cmp dword [0x41204c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401dce
mov edx, 0x4121eb
mov eax, dword [0x41204c]
call fcn.0040d4bc
cmp byte [ebp - 9], 0
je 0x401ddc
lea edi, [ebp - 0x2024]
jmp 0x401de5
mov eax, esi
call fcn.00402a09
mov edi, eax
test bl, bl
je 0x401ded
xor eax, eax
jmp 0x401df7
mov eax, dword [0x41204c]
call fcn.0040d378
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.0040d378
mov edx, eax
mov eax, dword [0x41204c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.0040d28c
mov dword [0x41204c], eax
test bl, bl
je 0x401e25
mov edx, dword [0x41204c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x41204c]
call fcn.0040d4bc
cmp byte [ebp - 9], 0
jne case.default.0x401b61
mov eax, edi
call fcn.0040d274
jmp case.default.0x401b61
cmp dword [ebp - 8], 0
jne case.default.0x401b61
lea edx, [ebp - 0x2024]
push edx
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401b61
cmp dword [ebp - 8], 0
jne case.default.0x401b61
cmp byte [0x4128ca], 0
jne case.default.0x401b61
lea ebx, [ebp - 0x2024]
xor eax, eax
mov byte [ebp - 0xb104], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401e93
inc ebx
mov eax, ebx
call fcn.0040d378
cmp eax, 0x400
jae case.default.0x401b61
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401ecb
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401ecb
lea edx, [ebx + 2]
lea eax, [ebp - 0xb104]
call fcn.0040d3f4
jmp 0x401f9a
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401ee3
cmp byte [ebx], 0
je 0x401ef5
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401ef5
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.0040d3f4
jmp 0x401f9a
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401f3d
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 0x401f6f
lea eax, [ebp - 0xb104]
call fcn.0040d378
xor edx, edx
mov dl, byte [ebp + eax - 0xb105]
cmp edx, 0x5c
je 0x401f6f
mov edx, 0x412098
lea eax, [ebp - 0xb104]
call fcn.0040d4bc
lea eax, [ebp - 0xb104]
call fcn.0040d378
mov edi, eax
mov eax, ebx
call fcn.0040d378
add edi, eax
cmp edi, 0x3ff
jae 0x401f9a
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.0040d4bc
lea eax, [ebp - 0xb104]
mov edx, 0x22
call fcn.0040d39c
test eax, eax
je 0x401fb7
cmp byte [eax + 1], 0
jne 0x401fb7
mov byte [eax], 0
lea edx, [ebp - 0xb104]
mov eax, 0x414604
call fcn.0040d3f4
lea eax, [ebp - 0xb104]
call fcn.00402b84
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 0x414604
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb104]
mov eax, 0x414604
call fcn.0040d424
test eax, eax
je case.default.0x401b61
lea edx, [ebp - 0xb104]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401b61
cmp dword [0x4128c4], 1
je case.default.0x401b61
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.0040d500
test eax, eax
je 0x402062
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x4128c4], edx
jmp case.default.0x401b61
mov dword [0x4128c4], 2
jmp case.default.0x401b61
mov cl, byte [ebp - 0x2024]
sub cl, 1
jb 0x4020a1
sub cl, 0x2f
je 0x40208e
dec cl
je 0x4020a1
dec cl
je 0x4020b4
jmp case.default.0x401b61
mov byte [0x413168], 0
mov byte [0x413169], 0
jmp case.default.0x401b61
mov byte [0x413168], 0
mov byte [0x413169], 1
jmp case.default.0x401b61
mov byte [0x413168], 1
mov byte [0x413169], 0
jmp case.default.0x401b61
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.0040d2b4
sub eax, 0x46
je 0x4020e0
sub eax, 0xf
je 0x4020ec
jmp 0x4020f8
mov byte [0x41316a], 1
jmp case.default.0x401b61
mov byte [0x41316b], 1
jmp case.default.0x401b61
mov byte [0x41316a], 0
mov byte [0x41316b], 0
jmp case.default.0x401b61
cmp dword [ebp - 8], 4
jne case.default.0x401b61
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.004026f1
jmp case.default.0x401b61
cmp dword [ebp - 8], 1
jne 0x40227a
lea ecx, [ebp - 0xb504]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xb504]
call fcn.00402c60
xor ebx, ebx
push ebx
lea eax, [ebp - 0xb504]
push dword [0x412040]
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 0x402185
inc ebx
jmp 0x40214f
lea eax, [ebp - 0xb904]
push eax
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2024], 0
je 0x40227a
cmp byte [0x412058], 0
jne 0x40227a
mov byte [ebp - 0xbb04], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.0040d388
test eax, eax
jne 0x402205
xor ebx, ebx
jmp 0x4021fb
xor eax, eax
mov al, byte [ebp + ebx - 0x2024]
cmp eax, 0x40
jne 0x4021fa
lea edx, [ebp - 0x2023]
lea eax, [ebp - 0xbb04]
add edx, ebx
call fcn.0040d3f4
mov byte [ebp + ebx - 0x2024], 0
jmp 0x402205
inc ebx
cmp byte [ebp + ebx - 0x2024], 0
jne 0x4021cf
cmp byte [ebp - 0xbb04], 0
jne 0x402230
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0x2024]
call fcn.0040d3f4
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb04]
call fcn.0040d3f4
lea eax, [ebp - 0x2024]
call fcn.00403034
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 0x40227a
push 1
mov byte [0x412044], 1
push dword [ebp - 4]
mov dword [0x413154], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401b61
cmp dword [0x4128c4], 0
jne 0x402297
mov dword [0x4128c4], 2
mov byte [0x4128c0], 1
jmp case.default.0x401b61
cmp dword [ebp - 8], 3
jne 0x4022cd
cmp byte [ebp - 0x2024], 0
je 0x4022c1
lea eax, [ebp - 0x2024]
push eax
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.00402a09
mov dword [0x412050], eax
mov byte [0x412059], 1
jmp case.default.0x401b61
cmp dword [ebp - 8], 5
jne case.default.0x401b61
lea eax, [ebp - 0x2024]
mov dl, 1
call fcn.004026f1
jmp case.default.0x401b61
cmp dword [ebp - 8], 6
jne case.default.0x401b61
xor eax, eax
mov al, byte [ebp - 0x8024]
call fcn.0040d2b4
sub eax, 0x50
je 0x40232d
sub eax, 3
je 0x40231b
dec eax
je 0x402324
jmp 0x402336
mov dword [ebp - 0x20], 0xb
jmp 0x40233d
mov dword [ebp - 0x20], 7
jmp 0x40233d
mov dword [ebp - 0x20], 2
jmp 0x40233d
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.0040d3f4
xor edx, edx
mov dl, byte [ebp - 0xbf04]
cmp edx, 0x22
jne 0x4023c8
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf04]
call fcn.0040d3f4
cmp byte [0x415740], 0
je 0x40239a
lea edx, [ebp - 0xbf03]
mov eax, 0x415640
mov ecx, 0x22
call fcn.0040dcfc
jmp 0x4023aa
lea eax, [ebp - 0xbf03]
mov edx, 0x22
call fcn.0040d388
test eax, eax
je 0x40246a
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcf04]
call fcn.0040d3f4
jmp 0x40246a
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.004070d0
test al, al
jne 0x40246a
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edi, [ebp - 0xbf04]
jmp 0x402459
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x4023fc
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x402458
mov bl, byte [edi]
mov byte [edi], 0
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.004070d0
test al, al
je 0x402456
mov dword [ebp - 0x24], edi
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x402435
mov byte [ebp - 0xcf04], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xcf03]
call fcn.0040d3f4
jmp 0x40244f
inc edi
jmp 0x402439
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x402438
lea eax, [ebp - 0xcf04]
mov edx, edi
call fcn.0040d3f4
mov ecx, dword [ebp - 0x24]
mov byte [ecx], bl
jmp 0x402458
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x4023ea
cmp dword [ebp - 0x24], 0
je 0x40246a
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
cmp byte [ebp - 0x3024], 0
je 0x402484
lea edx, [ebp - 0xcb04]
lea eax, [ebp - 0x3024]
call fcn.0040719c
lea edx, [ebp - 0xc304]
lea eax, [ebp - 0xbf04]
call fcn.0040719c
lea eax, [ebp - 0xc704]
mov edx, dword [ebp - 0x20]
call fcn.00402f4c
lea eax, [ebp - 0xc704]
call fcn.00402c60
cmp byte [ebp - 0x6024], 0
je 0x4024d3
lea edx, [ebp - 0x6024]
lea eax, [ebp - 0xc704]
call fcn.0040d4bc
lea eax, [ebp - 0xc704]
call fcn.00402c60
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xd304]
call fcn.0040d3f4
cmp byte [ebp - 0x4024], 0
je 0x4024f5
lea eax, [ebp - 0x4024]
jmp 0x4024fb
lea eax, [ebp - 0x7024]
call fcn.0040607c
mov edx, eax
lea eax, [ebp - 0xc704]
call fcn.0040d4bc
lea eax, [ebp - 0xc704]
call fcn.004063b8
test eax, eax
je 0x40252a
mov edx, str..lnk
call fcn.0040d474
test eax, eax
je 0x40253a
mov edx, str..lnk
lea eax, [ebp - 0xc704]
call fcn.0040d4bc
lea eax, [ebp - 0xc704]
mov cl, 1
xor edx, edx
call fcn.00406dc0
cmp byte [ebp - 0xcb04], 0
je 0x40255a
lea eax, [ebp - 0xcb04]
jmp 0x40255c
xor eax, eax
push eax
cmp byte [ebp - 0xcf04], 0
je 0x40256e
lea edx, [ebp - 0xcf04]
jmp 0x402570
xor edx, edx
push edx
cmp byte [ebp - 0x5024], 0
je 0x402582
lea ecx, [ebp - 0x5024]
jmp 0x402584
xor ecx, ecx
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xc304]
call fcn.00402e3c
cmp byte [ebp - 0xd304], 0
je case.default.0x401b61
push 0
lea eax, [ebp - 0xd304]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401b61
cmp dword [ebp - 8], 7
jne case.default.0x401b61
mov byte [0x4128c8], 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.004025f3
mov esi, eax
test eax, eax
jne 0x401b12
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret