Function at 0x40984d
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, 0x8df0
call fcn.0040a2d0
mov eax, dword [0x42a664]
xor eax, esp
mov dword [esp + 0x8dec], eax
push ebx
push ebp
mov ebp, 0x800
lea eax, [esp + 0x25f4]
push ebp
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebp
lea eax, [esp + 0x25f8]
push eax
lea eax, [esp + 0x35fc]
push eax
call fcn.00407081
lea eax, [esp + 0x35f4]
push 0x5c
push eax
call fcn.0040c4ab
pop ecx
pop ecx
test eax, eax
je 0x409e3a
lea ecx, [esp + 0x35f4]
cmp eax, ecx
jbe 0x4098c7
cmp word [eax - 2], 0x3a
jne 0x4098c7
xor ecx, ecx
mov word [eax + 2], cx
jmp 0x4098cc
xor ecx, ecx
mov word [eax], cx
push esi
lea eax, [esp + 0x35f8]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebp
lea eax, [esp + 0x35fc]
push eax
call fcn.00404fcc
mov esi, 0x13f2
cmp byte [0x434260], bl
jne 0x40991c
push 0x10024
push esi
call fcn.00406b68
push eax
push 0x13f5
call fcn.00406b68
push eax
push ebx
call fcn.00408cb4
cmp eax, 6
jne 0x409e39
push edi
push 0x4226cc
push str.Uninstall.lst
call fcn.004045d4
mov edi, eax
test edi, edi
jne 0x409970
push str.Uninstall.lst
push 0x13f6
call fcn.00406b68
push eax
lea eax, [esp + 0x74]
push 0xc8
push eax
call fcn.0040346f
add esp, 0x10
push 0x10010
push esi
call fcn.00406b68
push eax
lea eax, [esp + 0x74]
push eax
push ebx
call fcn.00408cb4
jmp 0x409e38
mov esi, 0x100
push esi
push 0x13fc
call fcn.00406b68
push eax
lea eax, [esp + 0x404]
push eax
call fcn.00407081
push esi
push 0x13f2
call fcn.00406b68
push eax
lea eax, [esp + 0x204]
push eax
call fcn.00407081
call fcn.00408eb6
mov ecx, 0x42d000
call fcn.00406bea
cmp byte [0x434261], bl
jne 0x409e38
mov esi, ebx
push ebx
push dword [esi + 0x42a654]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esi + 0x42a654]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esi, 4
cmp esi, 8
jb 0x4099c4
mov byte [esp + 0x13], bl
push edi
lea eax, [esp + 0xe00]
push ebp
push eax
call fcn.004112dc
add esp, 0xc
test eax, eax
je 0x409bf0
lea eax, [esp + 0xdfc]
push eax
call fcn.00410400
pop ecx
jmp 0x409a36
mov cl, byte [esp + eax + 0xdfc]
cmp cl, 0xd
je 0x409a2e
cmp cl, 0xa
je 0x409a2e
cmp cl, 0x20
je 0x409a2e
cmp cl, 9
jne 0x409a3b
mov byte [esp + eax + 0xdfc], 0
sub eax, 1
jns 0x409a13
cmp byte [esp + 0xdfc], 0
je 0x409bc0
push ebp
lea eax, [esp + 0x3600]
push eax
lea eax, [esp + 0x1604]
push eax
call fcn.00407081
lea eax, [esp + 0x15fc]
push eax
call fcn.0040dd48
pop ecx
mov ecx, ebp
sub ecx, eax
push ecx
lea ecx, [esp + 0x1600]
lea eax, [ecx + eax*2]
push eax
lea eax, [esp + 0xe04]
push eax
call fcn.00407321
lea eax, [esp + 0x15fc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x15fc]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x409ad4
test al, 0x10
je 0x409ad4
lea eax, [esp + 0x15fc]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
neg eax
sbb eax, eax
neg eax
add ebx, eax
jmp 0x409bc0
lea eax, [esp + 0x15fc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ecx, ecx
test eax, eax
setne cl
add ebx, ecx
test eax, eax
jne 0x409bc0
cmp dword [esp + 0x14], 0xffffffff
je 0x409bc0
lea eax, [esp + 0x15fc]
push eax
call fcn.0040550d
mov esi, eax
lea eax, [esp + 0x25fc]
push eax
call fcn.0040550d
push eax
push esi
call fcn.00407632
test eax, eax
je 0x409bc0
push str.Uninstall.lst
push esi
call fcn.00407632
test eax, eax
je 0x409bc0
mov byte [esp + 0x13], 1
xor esi, esi
push esi
lea eax, [esp + 0x1600]
push eax
push str._s._u.tmp
lea eax, [esp + 0x4608]
push ebp
push eax
call fcn.0040346f
add esp, 0x14
lea eax, [esp + 0x45fc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409b7e
inc esi
cmp esi, 0x3e8
jb 0x409b43
lea eax, [esp + 0x45fc]
push eax
lea eax, [esp + 0x1600]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x409bae
push ebp
lea eax, [esp + 0x1600]
push eax
lea eax, [esp + 0x4604]
push eax
call fcn.00407081
push 4
push 0
lea eax, [esp + 0x4604]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push edi
lea eax, [esp + 0xe00]
push ebp
push eax
call fcn.004112dc
add esp, 0xc
test eax, eax
jne 0x409a03
test ebx, ebx
je 0x409bf0
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004115a1
add esp, 0xc
jmp 0x4099e9
push edi
call fcn.0040ff38
mov dword [esp], str.Uninstall.lst
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x6dfc]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov al, byte [esp + 0x13]
xor ebx, ebx
test al, al
je 0x409c6c
cmp byte [0x434260], bl
jne 0x409c6c
push 0x10040
lea eax, [esp + 0x200]
push eax
lea eax, [esp + 0x404]
push eax
push ebx
call fcn.00408cb4
push 0x4208e4
lea eax, [esp + 0x6e00]
push eax
call fcn.0040550d
push eax
call fcn.00407632
test eax, eax
jne 0x409c6c
push 4
push ebx
lea eax, [esp + 0x6e04]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [esp + 0x55fc]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebp
push str.Uninstall_Rar.Bat
lea eax, [esp + 0x5604]
push eax
call fcn.00407059
push 0x421188
lea eax, [esp + 0x5600]
push eax
call fcn.004045d4
mov esi, eax
test esi, esi
je 0x409e38
lea eax, [esp + 0x25fc]
mov edi, 0x400
push eax
push str.__s___wait_r_n
lea eax, [esp + 0x604]
push edi
push eax
call fcn.0040346f
add esp, 0x10
lea eax, [esp + 0x5fc]
push eax
push esi
call fcn.00409e51
lea eax, [esp + 0x25fc]
push eax
lea eax, [esp + 0x6e00]
push eax
lea eax, [esp + 0x2604]
push eax
push str.del___s__r_nrd___s__r_nif_not_exist___s__goto_done_r_n
lea eax, [esp + 0x60c]
push edi
push eax
call fcn.0040346f
add esp, 0x18
push 5
pop edi
lea eax, [esp + 0x5fc]
push eax
push esi
call fcn.00409e51
sub edi, 1
jne 0x409d0c
push str.:done_r_n
push esi
call fcn.00409e51
cmp byte [0x434260], 0
mov edi, 0x400
jne 0x409d65
lea eax, [esp + 0x25fc]
push eax
push eax
push str.if_exist___s____s___warning_r_n
lea eax, [esp + 0x608]
push edi
push eax
call fcn.0040346f
add esp, 0x14
lea eax, [esp + 0x5fc]
push eax
push esi
call fcn.00409e51
lea eax, [esp + 0x55fc]
push eax
push str.del___s__r_n
lea eax, [esp + 0x604]
push edi
push eax
call fcn.0040346f
add esp, 0x10
lea eax, [esp + 0x5fc]
push eax
push esi
call fcn.00409e51
push esi
call fcn.0040ff38
pop ecx
xor eax, eax
mov word [esp + 0x7dfc], ax
lea eax, [esp + 0x7dfc]
push ebp
push eax
push str.COMSPEC
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [esp + 0x55fc]
push eax
lea eax, [esp + 0x7e00]
push eax
push str._s__c___s_
lea eax, [esp + 0x6608]
push edi
push eax
call fcn.0040346f
push 0x44
pop esi
push esi
lea eax, [esp + 0x30]
push ebx
push eax
call fcn.0040b230
add esp, 0x20
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x44], 1
mov word [esp + 0x48], ax
push 0x4215bc
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
call fcn.00404f48
neg eax
sbb eax, eax
and eax, 0xfffffff8
add eax, 8
push eax
push 1
push ebx
push ebx
lea eax, [esp + 0x661c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
pop edi
pop esi
mov ecx, dword [esp + 0x8df4]
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a2bd
add esp, 0x8df0
ret