Function at 0x40178a
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebx
push esi
push edi
push ebp
push eax
mov eax, 0xc
add esp, 0xfffff004
push eax
dec eax
jne 0x401794
mov eax, dword [esp + 0xc000]
add esp, 0xfffff988
mov esi, edx
mov edi, 0x40b064
mov dword [esp + 4], ecx
mov dword [esp], eax
test esi, esi
je 0x4021de
jmp case.0x401811.10
lea eax, [esp + 0x1024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [esp + 0x2024]
add edx, ecx
call fcn.004028e0
inc ebx
cmp ebx, 6
jl 0x4017cf
or ebp, 0xffffffff
xor ebx, ebx
push dword [edi + ebx*4]
lea eax, [esp + 0x28]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401802
mov ebp, ebx
jmp 0x401808
inc ebx
cmp ebx, 0xd
jl 0x4017ed
cmp ebp, 0xc
ja case.0x401811.10
jmp dword [ebp*4 + 0x401818]
cmp dword [esp + 4], 2
jne case.0x401811.10
lea eax, [esp + 0x8024]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [esp + 0x8024]
lea eax, [esp + 0x8424]
call fcn.004064bc
lea eax, [esp + 0x8424]
call fcn.004027d4
lea edx, [esp + 0x1024]
lea eax, [esp + 0x8424]
call fcn.00406590
lea eax, [esp + 0x8824]
call fcn.00404fb0
lea edx, [esp + 0x8424]
lea eax, [esp + 0x8824]
call fcn.00405004
jmp 0x401a24
push 0
lea edx, [esp + 0x9430]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp dword [esp + 0xa03c], 0
je 0x401999
call fcn.00404e24
cmp eax, 4
je 0x401999
lea edx, [esp + 0xa05c]
lea eax, [esp + 0x8024]
call fcn.00405648
lea eax, [esp + 0xa05c]
call fcn.004027d4
lea eax, [esp + 0x8024]
call fcn.0040643c
mov ebx, eax
cmp ebx, 4
jl 0x40192c
lea eax, [esp + 0xa05c]
call fcn.0040643c
cmp eax, ebx
jb 0x401942
lea eax, [esp + 0x1024]
xor edx, edx
call fcn.00405570
test al, al
jne 0x401a41
lea eax, [esp + 0x942c]
call fcn.0040643c
mov byte [esp + eax + 0x942d], 0
lea eax, [esp + 0xa45c]
mov ecx, 0x1e
xor edx, edx
call fcn.004063e0
mov dword [esp + 0xa460], 3
mov word [esp + 0xa46c], 0x14
lea eax, [esp + 0x942c]
mov dword [esp + 0xa464], eax
lea edx, [esp + 0xa45c]
push edx
call sub.SHELL32.DLL_SHFileOperationA
lea ecx, [esp + 0x942c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401a24
lea eax, [esp + 0x942c]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401a24
xor ebx, ebx
push ebx
lea eax, [esp + 0x9430]
push eax
push str._s._d.tmp
lea edx, [esp + 0xa488]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [esp + 0xa47c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x4019f1
inc ebx
jmp 0x4019be
lea eax, [esp + 0xa47c]
push eax
lea edx, [esp + 0x9430]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401a24
call fcn.00404e24
test eax, eax
je 0x401a24
push 4
push 0
lea ecx, [esp + 0xa484]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [esp + 0x942c]
lea eax, [esp + 0x8824]
xor ecx, ecx
call fcn.0040503c
test al, al
jne 0x4018bf
lea eax, [esp + 0x8824]
mov edx, 2
call fcn.00404fd4
jmp case.0x401811.10
cmp dword [esp + 4], 0
jne case.0x401811.10
mov eax, dword [0x40b04c]
test eax, eax
sete bl
and ebx, 1
test bl, bl
jne 0x401a7d
mov edx, 0x40b190
call fcn.00406590
cmp byte [esp + 8], 0
je 0x401a8d
lea ebp, [esp + 0x1024]
jmp 0x401a96
mov eax, esi
call fcn.00402575
mov ebp, eax
test bl, bl
je 0x401a9e
xor eax, eax
jmp 0x401aa8
mov eax, dword [0x40b04c]
call fcn.0040643c
mov dword [esp + 0xc], eax
mov eax, ebp
call fcn.0040643c
mov edx, eax
mov eax, dword [0x40b04c]
add edx, dword [esp + 0xc]
add edx, 5
call fcn.0040620c
mov dword [0x40b04c], eax
test bl, bl
je 0x401ad8
mov edx, dword [0x40b04c]
mov byte [edx], 0
mov edx, ebp
mov eax, dword [0x40b04c]
call fcn.00406590
cmp byte [esp + 8], 0
jne case.0x401811.10
mov eax, ebp
call fcn.004061f4
jmp case.0x401811.10
cmp dword [esp + 4], 0
jne case.0x401811.10
lea edx, [esp + 0x1024]
push edx
push dword [esp + 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.0x401811.10
cmp dword [esp + 4], 0
jne case.0x401811.10
mov byte [esp + 0xa87c], 0
xor ecx, ecx
mov cl, byte [esp + 0x1024]
cmp ecx, 0x2e
jne 0x401b63
xor eax, eax
mov al, byte [esp + 0x1025]
cmp eax, 0x5c
jne 0x401b63
lea edx, [esp + 0x1026]
lea eax, [esp + 0xa87c]
call fcn.004064bc
jmp 0x401c38
xor edx, edx
mov dl, byte [esp + 0x1024]
cmp edx, 0x5c
je 0x401b89
cmp byte [esp + 0x1024], 0
je 0x401ba1
xor ecx, ecx
mov cl, byte [esp + 0x1025]
cmp ecx, 0x3a
jne 0x401ba1
lea edx, [esp + 0x1024]
lea eax, [esp + 0xa87c]
call fcn.004064bc
jmp 0x401c38
lea ecx, [esp + 0x10]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401bf0
mov dword [esp + 0x18], 0x400
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0xa880]
push edx
lea ecx, [esp + 0x1c]
push ecx
push 0
push str.ProgramFilesDir
push dword [esp + 0x24]
call sub.ADVAPI32.DLL_RegQueryValueExA
push dword [esp + 0x10]
call sub.ADVAPI32.DLL_RegCloseKey
cmp byte [esp + 0xa87c], 0
je 0x401c25
lea eax, [esp + 0xa87c]
call fcn.0040643c
xor edx, edx
mov dl, byte [esp + eax + 0xa87b]
cmp edx, 0x5c
je 0x401c25
mov edx, 0x40b098
lea eax, [esp + 0xa87c]
call fcn.00406590
lea edx, [esp + 0x1024]
lea eax, [esp + 0xa87c]
call fcn.00406590
lea edx, [esp + 0xa87c]
mov eax, 0x40cd34
call fcn.004064bc
lea eax, [esp + 0xa87c]
call fcn.004026a8
push 0x65
push dword [esp + 4]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [esp + 0xa87c]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x40cd34
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [esp + 0xa87c]
mov eax, 0x40cd34
call fcn.004064e8
test eax, eax
je case.0x401811.10
lea edx, [esp + 0xa87c]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.0x401811.10
xor eax, eax
mov al, byte [esp + 0x1024]
call fcn.004065ec
test eax, eax
je 0x401cde
xor edx, edx
mov dl, byte [esp + 0x1024]
add edx, 0xffffffd0
mov dword [0x40b058], edx
jmp case.0x401811.10
mov dword [0x40b058], 2
jmp case.0x401811.10
mov cl, byte [esp + 0x1024]
sub cl, 1
jb 0x401d1f
sub cl, 0x2f
je 0x401d0b
dec cl
je 0x401d1f
dec cl
je 0x401d36
jmp case.0x401811.10
xor eax, eax
mov dword [0x40bc60], eax
xor edx, edx
mov dword [0x40bc64], edx
jmp case.0x401811.10
xor ecx, ecx
mov dword [0x40bc60], ecx
mov dword [0x40bc64], 1
jmp case.0x401811.10
mov dword [0x40bc60], 1
xor eax, eax
mov dword [0x40bc64], eax
jmp case.0x401811.10
cmp dword [esp + 4], 4
jne case.0x401811.10
lea eax, [esp + 0x1024]
xor edx, edx
call fcn.004022a1
jmp case.0x401811.10
cmp dword [esp + 4], 1
jne 0x401e9b
lea ecx, [esp + 0xac7c]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [esp + 0xac7c]
call fcn.004027d4
xor ebx, ebx
push ebx
lea eax, [esp + 0xac80]
push eax
push str._sRarSFX_d
lea edx, [esp + 0xb088]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [esp + 0xb07c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401dc8
inc ebx
jmp 0x401d95
lea eax, [esp + 0xb07c]
push eax
push 0x65
push dword [esp + 8]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [esp + 0x1024], 0
je 0x401e9b
mov byte [esp + 0xb47c], 0
xor ebx, ebx
jmp 0x401e1f
and eax, 0xff
cmp eax, 0x40
jne 0x401e1e
lea edx, [esp + 0x1025]
lea eax, [esp + 0xb47c]
add edx, ebx
call fcn.004064bc
mov byte [esp + ebx + 0x1024], 0
jmp 0x401e2a
inc ebx
mov al, byte [esp + ebx + 0x1024]
test al, al
jne 0x401df5
cmp byte [esp + 0xb47c], 0
jne 0x401e5a
lea edx, [esp + 0x2024]
lea eax, [esp + 0x1024]
call fcn.004064bc
lea edx, [esp + 0x3024]
lea eax, [esp + 0xb47c]
call fcn.004064bc
lea eax, [esp + 0x1024]
call fcn.00402b98
push 0x24
lea edx, [esp + 0xb480]
push edx
lea ecx, [esp + 0x102c]
push ecx
push dword [esp + 0xc]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x401e9b
mov dword [0x40bc5c], 1
push 1
push dword [esp + 4]
call sub.USER32.DLL_EndDialog
cmp dword [esp + 4], 7
jne case.0x401811.10
cmp dword [0x40b058], 0
jne 0x401eb9
mov dword [0x40b058], 2
mov byte [0x40b045], 1
jmp case.0x401811.10
cmp dword [esp + 4], 3
jne 0x401ef3
cmp byte [esp + 0x1024], 0
je 0x401ee7
lea eax, [esp + 0x1024]
push eax
push dword [esp + 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.00402575
mov dword [0x40b050], eax
mov byte [0x40b05d], 1
jmp case.0x401811.10
cmp dword [esp + 4], 5
jne case.0x401811.10
lea eax, [esp + 0x1024]
mov dl, 1
call fcn.004022a1
jmp case.0x401811.10
cmp dword [esp + 4], 6
jne case.0x401811.10
lea ecx, [esp + 0x2024]
xor eax, eax
mov al, byte [ecx]
call fcn.00406234
sub eax, 0x50
je 0x401f5b
sub eax, 3
je 0x401f47
dec eax
je 0x401f51
jmp 0x401f65
mov dword [esp + 0x1c], 0xb
jmp 0x401f6d
mov dword [esp + 0x1c], 7
jmp 0x401f6d
mov dword [esp + 0x1c], 2
jmp 0x401f6d
mov dword [esp + 0x1c], 0x10
mov byte [esp + 0xc27c], 0
lea edx, [esp + 0x3024]
lea eax, [esp + 0xb67c]
call fcn.004064bc
xor edx, edx
mov dl, byte [esp + 0xb67c]
cmp edx, 0x22
jne 0x401ffb
lea edx, [esp + 0x3024]
lea eax, [esp + 0xb67c]
inc edx
call fcn.004064bc
cmp byte [0x40d684], 0
je 0x401fcb
lea edx, [esp + 0xb67d]
mov eax, 0x40d584
mov ecx, 0x22
call fcn.00406184
jmp 0x401fdc
lea eax, [esp + 0xb67d]
mov edx, 0x22
call fcn.0040644c
test eax, eax
je 0x4020ab
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [esp + 0xc27c]
call fcn.004064bc
jmp 0x4020ab
lea eax, [esp + 0xb67c]
xor edx, edx
call fcn.00405858
test al, al
jne 0x4020ab
xor ecx, ecx
mov dword [esp + 0x20], ecx
lea ebp, [esp + 0xb67c]
jmp 0x402097
mov dl, byte [ebp]
xor eax, eax
mov al, dl
cmp eax, 0x20
je 0x402031
cmp eax, 0x2f
jne 0x402096
mov ebx, edx
xor edx, edx
mov byte [ebp], 0
lea eax, [esp + 0xb67c]
call fcn.00405858
test al, al
je 0x402093
mov dword [esp + 0x20], ebp
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x40206f
mov byte [esp + 0xc27c], 0x2f
lea edx, [ebp + 1]
lea eax, [esp + 0xc27d]
call fcn.004064bc
jmp 0x40208b
inc ebp
jmp 0x402073
inc ebp
xor ecx, ecx
mov cl, byte [ebp]
cmp ecx, 0x20
je 0x402072
lea eax, [esp + 0xc27c]
mov edx, ebp
call fcn.004064bc
mov ecx, dword [esp + 0x20]
mov byte [ecx], bl
jmp 0x402096
mov byte [ebp], bl
inc ebp
cmp byte [ebp], 0
jne 0x402020
cmp dword [esp + 0x20], 0
je 0x4020ab
mov eax, dword [esp + 0x20]
mov byte [eax], 0
lea edx, [esp + 0xba7c]
lea eax, [esp + 0xb67c]
call fcn.004058ec
lea eax, [esp + 0xbe7c]
mov edx, dword [esp + 0x1c]
call fcn.00402ab0
lea eax, [esp + 0xbe7c]
call fcn.004027d4
lea edx, [esp + 0x4024]
cmp byte [edx], 0
je 0x402105
lea edx, [esp + 0x4024]
lea eax, [esp + 0xbe7c]
call fcn.00406590
lea eax, [esp + 0xbe7c]
call fcn.004027d4
lea edx, [esp + 0x6024]
cmp byte [edx], 0
je 0x40211a
lea eax, [esp + 0x6024]
jmp 0x402121
lea eax, [esp + 0x3024]
call fcn.004027b0
mov edx, eax
lea eax, [esp + 0xbe7c]
call fcn.00406590
mov edx, 0x40b1da
lea eax, [esp + 0xbe7c]
call fcn.004054f4
lea eax, [esp + 0xbe7c]
mov cl, 1
xor edx, edx
call fcn.00405760
lea eax, [esp + 0x7024]
cmp byte [eax], 0
je 0x40216a
lea edx, [esp + 0x7024]
jmp 0x40216c
xor edx, edx
push edx
cmp byte [esp + 0xc280], 0
je 0x402180
lea eax, [esp + 0xc280]
jmp 0x402182
xor eax, eax
push eax
lea edx, [esp + 0x502c]
cmp byte [edx], 0
je 0x402198
lea ecx, [esp + 0x502c]
jmp 0x40219a
xor ecx, ecx
lea edx, [esp + 0xbe84]
lea eax, [esp + 0xba84]
call fcn.004029a0
jmp case.0x401811.10
cmp dword [esp + 4], 7
jne case.0x401811.10
mov byte [0x40b05c], 1
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x1028]
lea edx, [esp + 0x28]
mov eax, esi
call fcn.004021e9
mov esi, eax
test eax, eax
jne 0x4017c6
add esp, 0xc67c
pop ebp
pop edi
pop esi
pop ebx
ret