Function at 0x409f47
Capabilities:
Check if file exists
Create process on windows
Delete directory
Delete file
Get common file path
Get comspec environment variable
Get file attributes
Move file
Query environment variable
Self delete
Set current directory
Set file attributes

Disassembly:
mov eax, 0x8c60
call fcn.0040a9a0
mov eax, dword [0x42b7a4]
xor eax, esp
mov dword [esp + 0x8c5c], eax
push ebx
push ebp
mov ebp, 0x800
lea eax, [esp + 0x2464]
push ebp
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebp
lea eax, [esp + 0x2468]
push eax
lea eax, [esp + 0x346c]
push eax
call fcn.00407851
lea eax, [esp + 0x3464]
push 0x5c
push eax
call fcn.0040cafb
pop ecx
pop ecx
test eax, eax
je 0x40a50e
lea ecx, [esp + 0x3464]
cmp eax, ecx
jbe 0x409fc1
cmp word [eax - 2], 0x3a
jne 0x409fc1
xor ecx, ecx
mov word [eax + 2], cx
jmp 0x409fc6
xor ecx, ecx
mov word [eax], cx
push esi
lea eax, [esp + 0x3468]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebp
lea eax, [esp + 0x346c]
push eax
call fcn.00405676
mov esi, 0x13f2
cmp byte [0x435398], bl
jne 0x40a016
push 0x10024
push esi
call fcn.0040733d
push eax
push 0x13f5
call fcn.0040733d
push eax
push ebx
call fcn.00409393
cmp eax, 6
jne 0x40a50d
push edi
push 0x42294c
push str.Uninstall.lst
call fcn.0040485b
mov edi, eax
test edi, edi
jne 0x40a06a
push str.Uninstall.lst
push 0x13f6
call fcn.0040733d
push eax
lea eax, [esp + 0x74]
push 0xc8
push eax
call fcn.004035d8
add esp, 0x10
push 0x10010
push esi
call fcn.0040733d
push eax
lea eax, [esp + 0x74]
push eax
push ebx
call fcn.00409393
jmp 0x40a50c
mov esi, 0x100
push esi
push 0x13fc
call fcn.0040733d
push eax
lea eax, [esp + 0xa74]
push eax
call fcn.00407851
push esi
push 0x13f2
call fcn.0040733d
push eax
lea eax, [esp + 0x874]
push eax
call fcn.00407851
call fcn.00409593
mov ecx, 0x42e150
call fcn.004073c2
cmp byte [0x435399], bl
jne 0x40a50c
mov esi, ebx
push ebx
push dword [esi + 0x42b794]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esi + 0x42b794]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esi, 4
cmp esi, 8
jb 0x40a0be
mov byte [esp + 0x13], bl
push edi
lea eax, [esp + 0x70]
push ebp
push eax
call fcn.004116cc
add esp, 0xc
test eax, eax
je 0x40a2d5
lea eax, [esp + 0x6c]
push eax
call fcn.00410a00
pop ecx
jmp 0x40a124
mov cl, byte [esp + eax + 0x6c]
cmp cl, 0xd
je 0x40a11f
cmp cl, 0xa
je 0x40a11f
cmp cl, 0x20
je 0x40a11f
cmp cl, 9
jne 0x40a129
mov byte [esp + eax + 0x6c], 0
sub eax, 1
jns 0x40a107
cmp byte [esp + 0x6c], 0
je 0x40a2a8
push ebp
lea eax, [esp + 0x3470]
push eax
lea eax, [esp + 0x1474]
push eax
call fcn.00407851
lea eax, [esp + 0x146c]
push eax
call fcn.0040e348
pop ecx
mov ecx, ebp
sub ecx, eax
push ecx
lea ecx, [esp + 0x1470]
lea eax, [ecx + eax*2]
push eax
lea eax, [esp + 0x74]
push eax
call fcn.00407ae3
lea eax, [esp + 0x146c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x146c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x40a1bc
test al, 0x10
je 0x40a1bc
lea eax, [esp + 0x146c]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
neg eax
sbb eax, eax
neg eax
add ebx, eax
jmp 0x40a2a8
lea eax, [esp + 0x146c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ecx, ecx
test eax, eax
setne cl
add ebx, ecx
test eax, eax
jne 0x40a2a8
cmp dword [esp + 0x14], 0xffffffff
je 0x40a2a8
lea eax, [esp + 0x146c]
push eax
call fcn.00405bbc
mov esi, eax
lea eax, [esp + 0x246c]
push eax
call fcn.00405bbc
push eax
push esi
call fcn.00407df8
test eax, eax
je 0x40a2a8
push str.Uninstall.lst
push esi
call fcn.00407df8
test eax, eax
je 0x40a2a8
mov byte [esp + 0x13], 1
xor esi, esi
push esi
lea eax, [esp + 0x1470]
push eax
push str._s._u.tmp
lea eax, [esp + 0x4478]
push ebp
push eax
call fcn.004035d8
add esp, 0x14
lea eax, [esp + 0x446c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a266
inc esi
cmp esi, 0x3e8
jb 0x40a22b
lea eax, [esp + 0x446c]
push eax
lea eax, [esp + 0x1470]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x40a296
push ebp
lea eax, [esp + 0x1470]
push eax
lea eax, [esp + 0x4474]
push eax
call fcn.00407851
push 4
push 0
lea eax, [esp + 0x4474]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push edi
lea eax, [esp + 0x70]
push ebp
push eax
call fcn.004116cc
add esp, 0xc
test eax, eax
jne 0x40a0fa
test ebx, ebx
je 0x40a2d5
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00411991
add esp, 0xc
jmp 0x40a0e3
push edi
call fcn.00410538
mov dword [esp], str.Uninstall.lst
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x6c6c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor ebx, ebx
cmp byte [esp + 0x13], bl
je 0x40a34f
cmp byte [0x435398], bl
jne 0x40a34f
push 0x10040
lea eax, [esp + 0x870]
push eax
lea eax, [esp + 0xa74]
push eax
push ebx
call fcn.00409393
push 0x420984
lea eax, [esp + 0x6c70]
push eax
call fcn.00405bbc
push eax
call fcn.00407df8
test eax, eax
jne 0x40a34f
push 4
push ebx
lea eax, [esp + 0x6c74]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [esp + 0x546c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebp
push str.Uninstall_Rar.Bat
lea eax, [esp + 0x5474]
push eax
call fcn.00407829
push 0x4211c4
lea eax, [esp + 0x5470]
push eax
call fcn.0040485b
mov esi, eax
test esi, esi
je 0x40a50c
lea eax, [esp + 0x246c]
mov edi, 0x400
push eax
push str.__s___wait_r_n
lea eax, [esp + 0xc74]
push edi
push eax
call fcn.004035d8
add esp, 0x10
lea eax, [esp + 0xc6c]
push eax
push esi
call fcn.0040a525
lea eax, [esp + 0x246c]
push eax
lea eax, [esp + 0x6c70]
push eax
lea eax, [esp + 0x2474]
push eax
push str.del___s__r_nrd___s__r_nif_not_exist___s__goto_done_r_n
lea eax, [esp + 0xc7c]
push edi
push eax
call fcn.004035d8
add esp, 0x18
push 5
pop edi
lea eax, [esp + 0xc6c]
push eax
push esi
call fcn.0040a525
sub edi, 1
jne 0x40a3ef
push str.:done_r_n
push esi
call fcn.0040a525
cmp byte [0x435398], 0
mov edi, 0x400
jne 0x40a448
lea eax, [esp + 0x246c]
push eax
push eax
push str.if_exist___s____s___warning_r_n
lea eax, [esp + 0xc78]
push edi
push eax
call fcn.004035d8
add esp, 0x14
lea eax, [esp + 0xc6c]
push eax
push esi
call fcn.0040a525
lea eax, [esp + 0x546c]
push eax
push str.del___s__r_n
lea eax, [esp + 0xc74]
push edi
push eax
call fcn.004035d8
add esp, 0x10
lea eax, [esp + 0xc6c]
push eax
push esi
call fcn.0040a525
push esi
call fcn.00410538
pop ecx
xor eax, eax
mov word [esp + 0x7c6c], ax
lea eax, [esp + 0x7c6c]
push ebp
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [esp + 0x546c]
push eax
lea eax, [esp + 0x7c70]
push eax
push str._s__c___s_
lea eax, [esp + 0x6478]
push edi
push eax
call fcn.004035d8
push 0x44
pop esi
push esi
lea eax, [esp + 0x30]
push ebx
push eax
call fcn.0040bb90
add esp, 0x20
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x44], 1
mov word [esp + 0x48], ax
push 0x421604
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
lea eax, [esp + 0x648c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
pop edi
pop esi
mov ecx, dword [esp + 0x8c64]
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a986
add esp, 0x8c60
ret