Function at 0x401791
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, 0xb
add esp, 0xfffff004
push eax
dec eax
jne 0x40179a
mov eax, dword [ebp - 4]
add esp, 0xfffff188
push ebx
push esi
push edi
mov dword [ebp - 0xc34], ecx
mov esi, edx
mov dword [ebp - 0xc30], eax
mov eax, 0x4103a4
call fcn.0040b6f0
test esi, esi
jne case.0x401833.10
mov edx, dword [ebp - 0xc2c]
mov dword fs:[0], edx
mov eax, edx
jmp 0x40207a
lea eax, [ebp - 0x2c4c]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8c4c]
add edx, ecx
call fcn.00402758
inc ebx
cmp ebx, 6
jl 0x4017ec
or edi, 0xffffffff
xor ebx, ebx
push dword [ebx*4 + 0x410060]
lea eax, [ebp - 0x1c4c]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401824
mov edi, ebx
jmp 0x40182a
inc ebx
cmp ebx, 0xd
jl 0x401809
cmp edi, 0xc
ja case.0x401833.10
jmp dword [edi*4 + 0x40183a]
cmp dword [ebp - 0xc34], 2
jne case.0x401833.10
lea eax, [ebp - 0x904c]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea eax, [ebp - 0x904c]
call fcn.0040264c
lea edx, [ebp - 0x2c4c]
lea eax, [ebp - 0x904c]
call fcn.0040b698
mov word [ebp - 0xc1c], 8
lea eax, [ebp - 0xc08]
call fcn.00405ab8
inc dword [ebp - 0xc10]
lea edx, [ebp - 0x904c]
mov word [ebp - 0xc1c], 0x14
lea eax, [ebp - 0xc08]
call fcn.00405b0c
jmp 0x40197b
push 0
lea edx, [ebp - 0x9c7c]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
lea ecx, [ebp - 0x9c7c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40197b
lea eax, [ebp - 0x9c7c]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x40197b
mov word [ebp - 0xc1c], 0x14
xor ebx, ebx
push ebx
lea eax, [ebp - 0x9c7c]
push eax
push str._s._d.tmp
lea edx, [ebp - 0xa07c]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xa07c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40194b
inc ebx
jmp 0x40191b
lea eax, [ebp - 0xa07c]
push eax
lea edx, [ebp - 0x9c7c]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x40197b
call fcn.004058dc
test eax, eax
je 0x40197b
push 4
push 0
lea ecx, [ebp - 0xa07c]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [ebp - 0x9c7c]
lea eax, [ebp - 0xc08]
xor ecx, ecx
call fcn.00405b44
test al, al
jne 0x4018e1
dec dword [ebp - 0xc10]
lea eax, [ebp - 0xc08]
mov edx, 2
call fcn.00405adc
mov word [ebp - 0xc1c], 0
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 0
jne case.0x401833.10
mov eax, dword [0x410048]
test eax, eax
sete bl
and ebx, 1
test bl, bl
jne 0x4019e2
mov edx, 0x410188
call fcn.0040b698
cmp byte [ebp - 0xc35], 0
je 0x4019f3
lea edi, [ebp - 0x2c4c]
jmp 0x4019fc
mov eax, esi
call fcn.00402414
mov edi, eax
test bl, bl
je 0x401a04
xor eax, eax
jmp 0x401a0e
mov eax, dword [0x410048]
call fcn.0040b544
mov dword [ebp - 0xc3c], eax
mov eax, edi
call fcn.0040b544
mov edx, eax
mov eax, dword [0x410048]
add edx, dword [ebp - 0xc3c]
add edx, 5
call fcn.0040b460
mov dword [0x410048], eax
test bl, bl
je 0x401a42
mov edx, dword [0x410048]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x410048]
call fcn.0040b698
cmp byte [ebp - 0xc35], 0
jne case.0x401833.10
mov eax, edi
call fcn.0040b448
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 0
jne case.0x401833.10
lea edx, [ebp - 0x2c4c]
push edx
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetWindowTextA
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 0
jne case.0x401833.10
mov byte [ebp - 0xa47c], 0
xor ecx, ecx
mov cl, byte [ebp - 0x2c4c]
cmp ecx, 0x2e
jne 0x401acf
xor eax, eax
mov al, byte [ebp - 0x2c4b]
cmp eax, 0x5c
jne 0x401acf
lea edx, [ebp - 0x2c4a]
lea eax, [ebp - 0xa47c]
call fcn.0040b5c4
jmp 0x401ba5
xor edx, edx
mov dl, byte [ebp - 0x2c4c]
cmp edx, 0x5c
je 0x401af2
cmp byte [ebp - 0x2c4c], 0
je 0x401b08
xor ecx, ecx
mov cl, byte [ebp - 0x2c4b]
cmp ecx, 0x3a
jne 0x401b08
lea edx, [ebp - 0x2c4c]
lea eax, [ebp - 0xa47c]
call fcn.0040b5c4
jmp 0x401ba5
lea ecx, [ebp - 0xc40]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401b62
mov dword [ebp - 0xc48], 0x400
lea eax, [ebp - 0xc48]
push eax
lea edx, [ebp - 0xa47c]
push edx
lea ecx, [ebp - 0xc44]
push ecx
push 0
push str.ProgramFilesDir
push dword [ebp - 0xc40]
call sub.ADVAPI32.DLL_RegQueryValueExA
push dword [ebp - 0xc40]
call sub.ADVAPI32.DLL_RegCloseKey
cmp byte [ebp - 0xa47c], 0
je 0x401b94
lea eax, [ebp - 0xa47c]
call fcn.0040b544
xor edx, edx
mov dl, byte [ebp + eax - 0xa47d]
cmp edx, 0x5c
je 0x401b94
mov edx, 0x410094
lea eax, [ebp - 0xa47c]
call fcn.0040b698
lea edx, [ebp - 0x2c4c]
lea eax, [ebp - 0xa47c]
call fcn.0040b698
lea edx, [ebp - 0xa47c]
mov eax, 0x411b68
call fcn.0040b5c4
lea eax, [ebp - 0xa47c]
call fcn.00402547
push 0x65
push dword [ebp - 0xc30]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [ebp - 0xa47c]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x411b68
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xa47c]
mov eax, 0x411b68
call fcn.0040b5f0
test eax, eax
je case.0x401833.10
lea edx, [ebp - 0xa47c]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.0x401833.10
xor eax, eax
mov al, byte [ebp - 0x2c4c]
call fcn.0040b6dc
test eax, eax
je 0x401c46
xor edx, edx
mov dl, byte [ebp - 0x2c4c]
add edx, 0xffffffd0
mov dword [0x410054], edx
jmp case.0x401833.10
mov dword [0x410054], 2
jmp case.0x401833.10
mov cl, byte [ebp - 0x2c4c]
sub cl, 1
jb 0x401c86
sub cl, 0x2f
je 0x401c72
dec cl
je 0x401c86
dec cl
je 0x401c9d
jmp case.0x401833.10
xor eax, eax
mov dword [0x410abc], eax
xor edx, edx
mov dword [0x410ac0], edx
jmp case.0x401833.10
xor ecx, ecx
mov dword [0x410abc], ecx
mov dword [0x410ac0], 1
jmp case.0x401833.10
mov dword [0x410abc], 1
xor eax, eax
mov dword [0x410ac0], eax
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 4
jne case.0x401833.10
lea eax, [ebp - 0x2c4c]
xor edx, edx
call fcn.0040214d
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 1
jne case.0x401833.10
lea ecx, [ebp - 0xa87c]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xa87c]
call fcn.0040264c
xor ebx, ebx
push ebx
lea eax, [ebp - 0xa87c]
push eax
push str._sRarSFX_d
lea edx, [ebp - 0xac7c]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xac7c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401d2d
inc ebx
jmp 0x401cfd
lea eax, [ebp - 0xac7c]
push eax
push 0x65
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2c4c], 0
je 0x401dee
mov byte [ebp - 0xae7c], 0
xor ebx, ebx
jmp 0x401d81
and eax, 0xff
cmp eax, 0x40
jne 0x401d80
lea edx, [ebp - 0x2c4b]
lea eax, [ebp - 0xae7c]
add edx, ebx
call fcn.0040b5c4
mov byte [ebp + ebx - 0x2c4c], 0
jmp 0x401d8c
inc ebx
mov al, byte [ebp + ebx - 0x2c4c]
test al, al
jne 0x401d59
cmp byte [ebp - 0xae7c], 0
jne 0x401db7
lea edx, [ebp - 0x8c4c]
lea eax, [ebp - 0x2c4c]
call fcn.0040b5c4
lea edx, [ebp - 0x7c4c]
lea eax, [ebp - 0xae7c]
call fcn.0040b5c4
push 0x24
lea edx, [ebp - 0xae7c]
push edx
lea ecx, [ebp - 0x2c4c]
push ecx
push dword [ebp - 0xc30]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x401dee
mov dword [0x410ab8], 1
push 1
push dword [ebp - 0xc30]
call sub.USER32.DLL_EndDialog
cmp dword [0x410054], 0
jne 0x401e01
mov dword [0x410054], 2
mov byte [0x410041], 1
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 3
jne case.0x401833.10
cmp byte [ebp - 0x2c4c], 0
je 0x401e35
lea eax, [ebp - 0x2c4c]
push eax
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.00402414
mov dword [0x41004c], eax
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 5
jne case.0x401833.10
lea eax, [ebp - 0x2c4c]
mov dl, 1
call fcn.0040214d
jmp case.0x401833.10
cmp dword [ebp - 0xc34], 6
jne case.0x401833.10
lea ecx, [ebp - 0x8c4c]
xor eax, eax
mov al, byte [ecx]
call fcn.0040b488
sub eax, 0x50
je 0x401ea8
sub eax, 3
je 0x401e90
dec eax
je 0x401e9c
jmp 0x401eb4
mov dword [ebp - 0xc4c], 0xb
jmp 0x401ebe
mov dword [ebp - 0xc4c], 7
jmp 0x401ebe
mov dword [ebp - 0xc4c], 2
jmp 0x401ebe
mov dword [ebp - 0xc4c], 0x10
lea edx, [ebp - 0x7c4c]
lea eax, [ebp - 0xb27c]
call fcn.0040b5c4
lea eax, [ebp - 0xb27c]
xor edx, edx
call fcn.00406654
test al, al
jne 0x401f52
lea edi, [ebp - 0xb27c]
jmp 0x401f4d
mov dl, byte [edi]
xor eax, eax
mov al, dl
cmp eax, 0x20
je 0x401ef8
cmp eax, 0x2f
jne 0x401f4c
mov ebx, edx
mov byte [edi], 0
lea eax, [ebp - 0xb27c]
xor edx, edx
call fcn.00406654
test al, al
je 0x401f4a
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x401f2e
mov byte [ebp - 0xbe7c], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xbe7b]
call fcn.0040b5c4
jmp 0x401f4c
inc edi
jmp 0x401f32
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x401f31
lea eax, [ebp - 0xbe7c]
mov edx, edi
call fcn.0040b5c4
jmp 0x401f4c
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x401ee8
lea edx, [ebp - 0xb67c]
lea eax, [ebp - 0xb27c]
call fcn.004066f4
lea eax, [ebp - 0xba7c]
mov edx, dword [ebp - 0xc4c]
call fcn.00402904
lea eax, [ebp - 0xba7c]
call fcn.0040264c
lea edx, [ebp - 0x6c4c]
cmp byte [edx], 0
je 0x401fa6
lea edx, [ebp - 0x6c4c]
lea eax, [ebp - 0xba7c]
call fcn.0040b698
lea eax, [ebp - 0xba7c]
call fcn.0040264c
lea edx, [ebp - 0x4c4c]
cmp byte [edx], 0
je 0x401fb9
lea eax, [ebp - 0x4c4c]
jmp 0x401fbf
lea eax, [ebp - 0x7c4c]
call fcn.00402628
mov edx, eax
lea eax, [ebp - 0xba7c]
call fcn.0040b698
mov edx, 0x4101d2
lea eax, [ebp - 0xba7c]
call fcn.00406224
lea eax, [ebp - 0xba7c]
mov cl, 1
xor edx, edx
call fcn.0040650c
lea eax, [ebp - 0x3c4c]
cmp byte [eax], 0
je 0x402003
lea edx, [ebp - 0x3c4c]
jmp 0x402005
xor edx, edx
push edx
cmp byte [ebp - 0xbe7c], 0
je 0x402017
lea eax, [ebp - 0xbe7c]
jmp 0x402019
xor eax, eax
push eax
lea edx, [ebp - 0x5c4c]
cmp byte [edx], 0
je 0x40202d
lea ecx, [ebp - 0x5c4c]
jmp 0x40202f
xor ecx, ecx
lea edx, [ebp - 0xba7c]
lea eax, [ebp - 0xb67c]
call fcn.004027f4
jmp case.0x401833.10
mov byte [0x410058], 1
lea eax, [ebp - 0xc35]
lea ecx, [ebp - 0x2c4c]
push eax
mov eax, esi
lea edx, [ebp - 0x1c4c]
call fcn.00402081
mov esi, eax
test eax, eax
jne 0x4017e4
mov edx, dword [ebp - 0xc2c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret