Function at 0x40174a
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Query or enumerate registry value
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0xb
add esp, 0xfffff004
push eax
dec eax
jne 0x401753
mov eax, dword [ebp - 4]
add esp, 0xfffff990
push ebx
push esi
push edi
mov dword [ebp - 0xc34], ecx
mov esi, edx
mov dword [ebp - 0xc30], eax
mov eax, 0x40a27c
call fcn.00405540
test esi, esi
jne case.0x4017ec.10
mov edx, dword [ebp - 0xc2c]
mov dword fs:[0], edx
mov eax, edx
jmp 0x401ec1
lea eax, [ebp - 0x2c44]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8c44]
add edx, ecx
call fcn.00402494
inc ebx
cmp ebx, 6
jl 0x4017a5
or edi, 0xffffffff
xor ebx, ebx
push dword [ebx*4 + 0x40a054]
lea eax, [ebp - 0x1c44]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x4017dd
mov edi, ebx
jmp 0x4017e3
inc ebx
cmp ebx, 0xc
jl 0x4017c2
cmp edi, 0xb
ja case.0x4017ec.10
jmp dword [edi*4 + 0x4017f3]
cmp dword [ebp - 0xc34], 1
jne case.0x4017ec.10
lea eax, [ebp - 0x9044]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea eax, [ebp - 0x9044]
call fcn.00402388
lea edx, [ebp - 0x2c44]
lea eax, [ebp - 0x9044]
call fcn.004054d0
mov word [ebp - 0xc1c], 8
lea eax, [ebp - 0xc08]
call fcn.00404218
inc dword [ebp - 0xc10]
lea edx, [ebp - 0x9044]
mov word [ebp - 0xc1c], 0x14
lea eax, [ebp - 0xc08]
call fcn.0040426c
jmp 0x401930
push 0
lea edx, [ebp - 0x9c74]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
lea ecx, [ebp - 0x9c74]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401930
lea eax, [ebp - 0x9c74]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401930
mov word [ebp - 0xc1c], 0x14
xor ebx, ebx
push ebx
lea eax, [ebp - 0x9c74]
push eax
push str._s._d.tmp
lea edx, [ebp - 0xa074]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xa074]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401900
inc ebx
jmp 0x4018d0
lea eax, [ebp - 0xa074]
push eax
lea edx, [ebp - 0x9c74]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401930
call fcn.00404048
test eax, eax
je 0x401930
push 4
push 0
lea ecx, [ebp - 0xa074]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [ebp - 0x9c74]
lea eax, [ebp - 0xc08]
xor ecx, ecx
call fcn.004042a4
test al, al
jne 0x401896
dec dword [ebp - 0xc10]
lea eax, [ebp - 0xc08]
mov edx, 2
call fcn.0040423c
mov word [ebp - 0xc1c], 0
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 0
jne case.0x4017ec.10
cmp byte [ebp - 0xc35], 0
je 0x401997
lea edx, [ebp - 0x2c44]
mov al, 1
call fcn.00402758
jmp case.0x4017ec.10
mov eax, esi
call fcn.0040220c
mov ebx, eax
mov al, 1
mov edx, ebx
call fcn.00402758
mov eax, ebx
call fcn.0040518c
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 0
jne case.0x4017ec.10
lea edx, [ebp - 0x2c44]
push edx
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetWindowTextA
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 0
jne case.0x4017ec.10
mov byte [ebp - 0xa474], 0
xor ecx, ecx
mov cl, byte [ebp - 0x2c44]
cmp ecx, 0x2e
jne 0x401a1d
xor eax, eax
mov al, byte [ebp - 0x2c43]
cmp eax, 0x5c
jne 0x401a1d
lea edx, [ebp - 0x2c42]
lea eax, [ebp - 0xa474]
call fcn.004053fc
jmp 0x401af3
xor edx, edx
mov dl, byte [ebp - 0x2c44]
cmp edx, 0x5c
je 0x401a40
cmp byte [ebp - 0x2c44], 0
je 0x401a56
xor ecx, ecx
mov cl, byte [ebp - 0x2c43]
cmp ecx, 0x3a
jne 0x401a56
lea edx, [ebp - 0x2c44]
lea eax, [ebp - 0xa474]
call fcn.004053fc
jmp 0x401af3
lea ecx, [ebp - 0xc3c]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401ab0
mov dword [ebp - 0xc44], 0x400
lea eax, [ebp - 0xc44]
push eax
lea edx, [ebp - 0xa474]
push edx
lea ecx, [ebp - 0xc40]
push ecx
push 0
push str.ProgramFilesDir
push dword [ebp - 0xc3c]
call sub.ADVAPI32.DLL_RegQueryValueExA
push dword [ebp - 0xc3c]
call sub.ADVAPI32.DLL_RegCloseKey
cmp byte [ebp - 0xa474], 0
je 0x401ae2
lea eax, [ebp - 0xa474]
call fcn.0040537c
xor edx, edx
mov dl, byte [ebp + eax - 0xa475]
cmp edx, 0x5c
je 0x401ae2
mov edx, 0x40a0b0
lea eax, [ebp - 0xa474]
call fcn.004054d0
lea edx, [ebp - 0x2c44]
lea eax, [ebp - 0xa474]
call fcn.004054d0
lea ecx, [ebp - 0xa474]
push ecx
push 0x65
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetDlgItemTextA
jmp case.0x4017ec.10
xor eax, eax
mov al, byte [ebp - 0x2c44]
call fcn.0040552c
test eax, eax
je 0x401b33
xor edx, edx
mov dl, byte [ebp - 0x2c44]
add edx, 0xffffffd0
mov dword [0x40a04c], edx
jmp case.0x4017ec.10
mov dword [0x40a04c], 2
jmp case.0x4017ec.10
mov cl, byte [ebp - 0x2c44]
sub cl, 1
jb 0x401b73
sub cl, 0x2f
je 0x401b5f
dec cl
je 0x401b73
dec cl
je 0x401b8a
jmp case.0x4017ec.10
xor eax, eax
mov dword [0x40a9f8], eax
xor edx, edx
mov dword [0x40a9fc], edx
jmp case.0x4017ec.10
xor ecx, ecx
mov dword [0x40a9f8], ecx
mov dword [0x40a9fc], 1
jmp case.0x4017ec.10
mov dword [0x40a9f8], 1
xor eax, eax
mov dword [0x40a9fc], eax
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 3
jne case.0x4017ec.10
lea eax, [ebp - 0x2c44]
xor edx, edx
call fcn.00401f7c
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 0
jne case.0x4017ec.10
lea ecx, [ebp - 0xa874]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xa874]
call fcn.00402388
xor ebx, ebx
push ebx
lea eax, [ebp - 0xa874]
push eax
push str._sRarSFX_d
lea edx, [ebp - 0xac74]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xac74]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401c1a
inc ebx
jmp 0x401bea
lea eax, [ebp - 0xac74]
push eax
push 0x65
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2c44], 0
je 0x401cdb
mov byte [ebp - 0xae74], 0
xor ebx, ebx
jmp 0x401c6e
and eax, 0xff
cmp eax, 0x40
jne 0x401c6d
lea edx, [ebp - 0x2c43]
lea eax, [ebp - 0xae74]
add edx, ebx
call fcn.004053fc
mov byte [ebp + ebx - 0x2c44], 0
jmp 0x401c79
inc ebx
mov al, byte [ebp + ebx - 0x2c44]
test al, al
jne 0x401c46
cmp byte [ebp - 0xae74], 0
jne 0x401ca4
lea edx, [ebp - 0x8c44]
lea eax, [ebp - 0x2c44]
call fcn.004053fc
lea edx, [ebp - 0x7c44]
lea eax, [ebp - 0xae74]
call fcn.004053fc
push 0x24
lea edx, [ebp - 0xae74]
push edx
lea ecx, [ebp - 0x2c44]
push ecx
push dword [ebp - 0xc30]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x401cdb
mov dword [0x40a9f4], 1
push 1
push dword [ebp - 0xc30]
call sub.USER32.DLL_EndDialog
cmp dword [0x40a04c], 0
jne 0x401cee
mov dword [0x40a04c], 1
mov byte [0x40a041], 1
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 2
jne case.0x4017ec.10
cmp byte [ebp - 0x2c44], 0
je 0x401d22
lea eax, [ebp - 0x2c44]
push eax
push dword [ebp - 0xc30]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.0040220c
mov ebx, eax
push 0x65
push dword [ebp - 0xc30]
call sub.USER32.DLL_GetDlgItem
mov cl, 1
mov edx, ebx
call fcn.004031ec
mov eax, ebx
call fcn.0040518c
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 4
jne case.0x4017ec.10
lea eax, [ebp - 0x2c44]
mov dl, 1
call fcn.00401f7c
jmp case.0x4017ec.10
cmp dword [ebp - 0xc34], 5
jne case.0x4017ec.10
lea ecx, [ebp - 0x8c44]
xor eax, eax
mov al, byte [ecx]
call fcn.004051a4
sub eax, 0x50
je 0x401da5
sub eax, 3
je 0x401d97
dec eax
je 0x401d9e
jmp 0x401dac
mov ebx, 0xb
jmp 0x401db1
mov ebx, 7
jmp 0x401db1
mov ebx, 2
jmp 0x401db1
mov ebx, 0x10
lea edx, [ebp - 0xb274]
lea eax, [ebp - 0x7c44]
call fcn.004049e4
lea eax, [ebp - 0xb674]
mov edx, ebx
call fcn.00402640
lea eax, [ebp - 0xb674]
call fcn.00402388
lea edx, [ebp - 0x6c44]
cmp byte [edx], 0
je 0x401e01
lea edx, [ebp - 0x6c44]
lea eax, [ebp - 0xb674]
call fcn.004054d0
lea eax, [ebp - 0xb674]
call fcn.00402388
lea edx, [ebp - 0x4c44]
cmp byte [edx], 0
je 0x401e14
lea eax, [ebp - 0x4c44]
jmp 0x401e1a
lea eax, [ebp - 0x7c44]
call fcn.00402364
mov edx, eax
lea eax, [ebp - 0xb674]
call fcn.004054d0
mov edx, 0x40a201
lea eax, [ebp - 0xb674]
call fcn.00404734
lea eax, [ebp - 0xb674]
mov cl, 1
xor edx, edx
call fcn.00404874
lea eax, [ebp - 0x3c44]
cmp byte [eax], 0
je 0x401e5e
lea edx, [ebp - 0x3c44]
jmp 0x401e60
xor edx, edx
lea eax, [ebp - 0x5c44]
push edx
push 0
cmp byte [eax], 0
je 0x401e76
lea ecx, [ebp - 0x5c44]
jmp 0x401e78
xor ecx, ecx
lea edx, [ebp - 0xb674]
lea eax, [ebp - 0xb274]
call fcn.00402530
lea eax, [ebp - 0xc35]
lea ecx, [ebp - 0x2c44]
push eax
mov eax, esi
lea edx, [ebp - 0x1c44]
call fcn.00401ec8
mov esi, eax
test eax, eax
jne 0x40179d
mov byte [0x40a01d], 0
mov edx, dword [ebp - 0xc2c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret