Function at 0x4017c2
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Persist via lnk shortcut
Query or enumerate registry value
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 0x4017cc
mov eax, dword [esp + 0xc000]
add esp, 0xfffff91c
mov esi, edx
mov edi, 0x40b05c
mov dword [esp + 4], ecx
mov dword [esp], eax
test esi, esi
je 0x402277
jmp case.0x401849.10
lea eax, [esp + 0x1024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [esp + 0x2024]
add edx, ecx
call fcn.00402978
inc ebx
cmp ebx, 6
jl 0x401807
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 0x40183a
mov ebp, ebx
jmp 0x401840
inc ebx
cmp ebx, 0xd
jl 0x401825
cmp ebp, 0xc
ja case.0x401849.10
jmp dword [ebp*4 + 0x401850]
cmp dword [esp + 4], 2
jne case.0x401849.10
lea eax, [esp + 0x8024]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [esp + 0x8024]
lea eax, [esp + 0x8424]
call fcn.004066e0
lea eax, [esp + 0x8424]
call fcn.0040286c
lea edx, [esp + 0x1024]
lea eax, [esp + 0x8424]
call fcn.004067b4
lea eax, [esp + 0x8824]
call fcn.004050f0
lea edx, [esp + 0x8424]
lea eax, [esp + 0x8824]
call fcn.00405144
lea eax, [esp + 0xa040]
call fcn.0040582c
lea eax, [esp + 0xa064]
call fcn.0040582c
lea eax, [esp + 0xa088]
call fcn.0040582c
jmp 0x401a80
push 0
lea edx, [esp + 0x9430]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp dword [esp + 0xa03c], 0
je 0x4019f5
call fcn.00404ee0
cmp eax, 4
je 0x4019f5
lea edx, [esp + 0xa0c8]
lea eax, [esp + 0x8024]
call fcn.004057a8
lea eax, [esp + 0xa0c8]
call fcn.0040286c
lea eax, [esp + 0x8024]
call fcn.00406660
mov ebx, eax
cmp ebx, 4
jl 0x401988
lea eax, [esp + 0xa0c8]
call fcn.00406660
cmp eax, ebx
jb 0x40199e
lea eax, [esp + 0x1024]
xor edx, edx
call fcn.004056d0
test al, al
jne 0x401a9d
lea eax, [esp + 0x942c]
call fcn.00406660
mov byte [esp + eax + 0x942d], 0
lea eax, [esp + 0xa4c8]
mov ecx, 0x1e
xor edx, edx
call fcn.00406604
mov dword [esp + 0xa4cc], 3
mov word [esp + 0xa4d8], 0x14
lea eax, [esp + 0x942c]
mov dword [esp + 0xa4d0], eax
lea edx, [esp + 0xa4c8]
push edx
call sub.SHELL32.DLL_SHFileOperationA
lea ecx, [esp + 0x942c]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401a80
lea eax, [esp + 0x942c]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401a80
xor ebx, ebx
push ebx
lea eax, [esp + 0x9430]
push eax
push str._s._d.tmp
lea edx, [esp + 0xa4f4]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [esp + 0xa4e8]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401a4d
inc ebx
jmp 0x401a1a
lea eax, [esp + 0xa4e8]
push eax
lea edx, [esp + 0x9430]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401a80
call fcn.00404ee0
test eax, eax
je 0x401a80
push 4
push 0
lea ecx, [esp + 0xa4f0]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [esp + 0x942c]
lea eax, [esp + 0x8824]
xor ecx, ecx
call fcn.0040517c
test al, al
jne 0x40191b
lea eax, [esp + 0x8824]
mov edx, 2
call fcn.00405114
jmp case.0x401849.10
cmp dword [esp + 4], 0
jne case.0x401849.10
cmp dword [0x40b044], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401ade
mov edx, 0x40b188
mov eax, dword [0x40b044]
call fcn.004067b4
cmp byte [esp + 8], 0
je 0x401aee
lea ebp, [esp + 0x1024]
jmp 0x401af7
mov eax, esi
call fcn.0040260e
mov ebp, eax
test bl, bl
je 0x401aff
xor eax, eax
jmp 0x401b09
mov eax, dword [0x40b044]
call fcn.00406660
mov dword [esp + 0xc], eax
mov eax, ebp
call fcn.00406660
mov edx, eax
mov eax, dword [0x40b044]
add edx, dword [esp + 0xc]
add edx, 5
call fcn.00406430
mov dword [0x40b044], eax
test bl, bl
je 0x401b39
mov edx, dword [0x40b044]
mov byte [edx], 0
mov edx, ebp
mov eax, dword [0x40b044]
call fcn.004067b4
cmp byte [esp + 8], 0
jne case.0x401849.10
mov eax, ebp
call fcn.00406418
jmp case.0x401849.10
cmp dword [esp + 4], 0
jne case.0x401849.10
lea edx, [esp + 0x1024]
push edx
push dword [esp + 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.0x401849.10
cmp dword [esp + 4], 0
jne case.0x401849.10
mov byte [esp + 0xa8e8], 0
xor ecx, ecx
mov cl, byte [esp + 0x1024]
cmp ecx, 0x2e
jne 0x401bc4
xor eax, eax
mov al, byte [esp + 0x1025]
cmp eax, 0x5c
jne 0x401bc4
lea edx, [esp + 0x1026]
lea eax, [esp + 0xa8e8]
call fcn.004066e0
jmp 0x401c99
xor edx, edx
mov dl, byte [esp + 0x1024]
cmp edx, 0x5c
je 0x401bea
cmp byte [esp + 0x1024], 0
je 0x401c02
xor ecx, ecx
mov cl, byte [esp + 0x1025]
cmp ecx, 0x3a
jne 0x401c02
lea edx, [esp + 0x1024]
lea eax, [esp + 0xa8e8]
call fcn.004066e0
jmp 0x401c99
lea ecx, [esp + 0x10]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401c51
mov dword [esp + 0x18], 0x400
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0xa8ec]
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 + 0xa8e8], 0
je 0x401c86
lea eax, [esp + 0xa8e8]
call fcn.00406660
xor edx, edx
mov dl, byte [esp + eax + 0xa8e7]
cmp edx, 0x5c
je 0x401c86
mov edx, 0x40b090
lea eax, [esp + 0xa8e8]
call fcn.004067b4
lea edx, [esp + 0x1024]
lea eax, [esp + 0xa8e8]
call fcn.004067b4
lea edx, [esp + 0xa8e8]
mov eax, 0x40cd3c
call fcn.004066e0
lea eax, [esp + 0xa8e8]
call fcn.00402741
push 0x65
push dword [esp + 4]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [esp + 0xa8e8]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x40cd3c
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [esp + 0xa8e8]
mov eax, 0x40cd3c
call fcn.0040670c
test eax, eax
je case.0x401849.10
lea edx, [esp + 0xa8e8]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.0x401849.10
cmp dword [0x40b050], 1
je case.0x401849.10
xor eax, eax
mov al, byte [esp + 0x1024]
call fcn.00406810
test eax, eax
je 0x401d4c
xor edx, edx
mov dl, byte [esp + 0x1024]
add edx, 0xffffffd0
mov dword [0x40b050], edx
jmp case.0x401849.10
mov dword [0x40b050], 2
jmp case.0x401849.10
mov cl, byte [esp + 0x1024]
sub cl, 1
jb 0x401d8d
sub cl, 0x2f
je 0x401d79
dec cl
je 0x401d8d
dec cl
je 0x401da4
jmp case.0x401849.10
xor eax, eax
mov dword [0x40bc68], eax
xor edx, edx
mov dword [0x40bc6c], edx
jmp case.0x401849.10
xor ecx, ecx
mov dword [0x40bc68], ecx
mov dword [0x40bc6c], 1
jmp case.0x401849.10
mov dword [0x40bc68], 1
xor eax, eax
mov dword [0x40bc6c], eax
jmp case.0x401849.10
cmp dword [esp + 4], 4
jne case.0x401849.10
lea eax, [esp + 0x1024]
xor edx, edx
call fcn.0040233a
jmp case.0x401849.10
cmp dword [esp + 4], 1
jne 0x401f16
lea ecx, [esp + 0xace8]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [esp + 0xace8]
call fcn.0040286c
xor ebx, ebx
push ebx
lea eax, [esp + 0xacec]
push eax
push str._sRarSFX_d
lea edx, [esp + 0xb0f4]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [esp + 0xb0e8]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401e36
inc ebx
jmp 0x401e03
lea eax, [esp + 0xb0e8]
push eax
push 0x65
push dword [esp + 8]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [esp + 0x1024], 0
je 0x401f16
cmp dword [0x40b050], 1
je 0x401f16
mov byte [esp + 0xb4e8], 0
xor ebx, ebx
jmp 0x401e9a
and eax, 0xff
cmp eax, 0x40
jne 0x401e99
lea edx, [esp + 0x1025]
lea eax, [esp + 0xb4e8]
add edx, ebx
call fcn.004066e0
mov byte [esp + ebx + 0x1024], 0
jmp 0x401ea5
inc ebx
mov al, byte [esp + ebx + 0x1024]
test al, al
jne 0x401e70
cmp byte [esp + 0xb4e8], 0
jne 0x401ed5
lea edx, [esp + 0x2024]
lea eax, [esp + 0x1024]
call fcn.004066e0
lea edx, [esp + 0x3024]
lea eax, [esp + 0xb4e8]
call fcn.004066e0
lea eax, [esp + 0x1024]
call fcn.00402c30
push 0x24
lea edx, [esp + 0xb4ec]
push edx
lea ecx, [esp + 0x102c]
push ecx
push dword [esp + 0xc]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x401f16
mov dword [0x40bc64], 1
push 1
push dword [esp + 4]
call sub.USER32.DLL_EndDialog
cmp dword [esp + 4], 7
jne case.0x401849.10
cmp dword [0x40b050], 0
jne 0x401f34
mov dword [0x40b050], 2
mov byte [0x40b03d], 1
jmp case.0x401849.10
cmp dword [esp + 4], 3
jne 0x401f6e
cmp byte [esp + 0x1024], 0
je 0x401f62
lea eax, [esp + 0x1024]
push eax
push dword [esp + 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.0040260e
mov dword [0x40b048], eax
mov byte [0x40b055], 1
jmp case.0x401849.10
cmp dword [esp + 4], 5
jne case.0x401849.10
lea eax, [esp + 0x1024]
mov dl, 1
call fcn.0040233a
jmp case.0x401849.10
cmp dword [esp + 4], 6
jne case.0x401849.10
lea ecx, [esp + 0x2024]
xor eax, eax
mov al, byte [ecx]
call fcn.00406458
sub eax, 0x50
je 0x401fd6
sub eax, 3
je 0x401fc2
dec eax
je 0x401fcc
jmp 0x401fe0
mov dword [esp + 0x1c], 0xb
jmp 0x401fe8
mov dword [esp + 0x1c], 7
jmp 0x401fe8
mov dword [esp + 0x1c], 2
jmp 0x401fe8
mov dword [esp + 0x1c], 0x10
mov byte [esp + 0xc2e8], 0
lea edx, [esp + 0x3024]
lea eax, [esp + 0xb6e8]
call fcn.004066e0
xor edx, edx
mov dl, byte [esp + 0xb6e8]
cmp edx, 0x22
jne 0x402076
lea edx, [esp + 0x3024]
lea eax, [esp + 0xb6e8]
inc edx
call fcn.004066e0
cmp byte [0x40d690], 0
je 0x402046
lea edx, [esp + 0xb6e9]
mov eax, 0x40d590
mov ecx, 0x22
call fcn.004063a8
jmp 0x402057
lea eax, [esp + 0xb6e9]
mov edx, 0x22
call fcn.00406670
test eax, eax
je 0x402126
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [esp + 0xc2e8]
call fcn.004066e0
jmp 0x402126
lea eax, [esp + 0xb6e8]
xor edx, edx
call fcn.00405a34
test al, al
jne 0x402126
xor ecx, ecx
mov dword [esp + 0x20], ecx
lea ebp, [esp + 0xb6e8]
jmp 0x402112
mov dl, byte [ebp]
xor eax, eax
mov al, dl
cmp eax, 0x20
je 0x4020ac
cmp eax, 0x2f
jne 0x402111
mov ebx, edx
xor edx, edx
mov byte [ebp], 0
lea eax, [esp + 0xb6e8]
call fcn.00405a34
test al, al
je 0x40210e
mov dword [esp + 0x20], ebp
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x4020ea
mov byte [esp + 0xc2e8], 0x2f
lea edx, [ebp + 1]
lea eax, [esp + 0xc2e9]
call fcn.004066e0
jmp 0x402106
inc ebp
jmp 0x4020ee
inc ebp
xor ecx, ecx
mov cl, byte [ebp]
cmp ecx, 0x20
je 0x4020ed
lea eax, [esp + 0xc2e8]
mov edx, ebp
call fcn.004066e0
mov ecx, dword [esp + 0x20]
mov byte [ecx], bl
jmp 0x402111
mov byte [ebp], bl
inc ebp
cmp byte [ebp], 0
jne 0x40209b
cmp dword [esp + 0x20], 0
je 0x402126
mov eax, dword [esp + 0x20]
mov byte [eax], 0
lea edx, [esp + 0xbae8]
lea eax, [esp + 0xb6e8]
call fcn.00405ac8
lea eax, [esp + 0xbee8]
mov edx, dword [esp + 0x1c]
call fcn.00402b48
lea eax, [esp + 0xbee8]
call fcn.0040286c
lea edx, [esp + 0x4024]
cmp byte [edx], 0
je 0x402180
lea edx, [esp + 0x4024]
lea eax, [esp + 0xbee8]
call fcn.004067b4
lea eax, [esp + 0xbee8]
call fcn.0040286c
lea edx, [esp + 0x6024]
cmp byte [edx], 0
je 0x402195
lea eax, [esp + 0x6024]
jmp 0x40219c
lea eax, [esp + 0x3024]
call fcn.00402848
mov edx, eax
lea eax, [esp + 0xbee8]
call fcn.004067b4
lea eax, [esp + 0xbee8]
call fcn.00405698
test eax, eax
je 0x4021cd
mov edx, str..lnk
call fcn.00406768
test eax, eax
je 0x4021de
mov edx, str..lnk
lea eax, [esp + 0xbee8]
call fcn.004067b4
lea eax, [esp + 0xbee8]
mov cl, 1
xor edx, edx
call fcn.0040593c
lea eax, [esp + 0x7024]
cmp byte [eax], 0
je 0x402203
lea edx, [esp + 0x7024]
jmp 0x402205
xor edx, edx
push edx
cmp byte [esp + 0xc2ec], 0
je 0x402219
lea eax, [esp + 0xc2ec]
jmp 0x40221b
xor eax, eax
push eax
lea edx, [esp + 0x502c]
cmp byte [edx], 0
je 0x402231
lea ecx, [esp + 0x502c]
jmp 0x402233
xor ecx, ecx
lea edx, [esp + 0xbef0]
lea eax, [esp + 0xbaf0]
call fcn.00402a38
jmp case.0x401849.10
cmp dword [esp + 4], 7
jne case.0x401849.10
mov byte [0x40b054], 1
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x1028]
lea edx, [esp + 0x28]
mov eax, esi
call fcn.00402282
mov esi, eax
test eax, eax
jne 0x4017fe
add esp, 0xc6e8
pop ebp
pop edi
pop esi
pop ebx
ret