Function at 0x402842
Capabilities:
Create directory
Delete file
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x17b0]
mov eax, 0x182c
call fcn.00406900
mov eax, dword [0x4161a0]
xor eax, ebp
mov dword [ebp + 0x17ac], eax
mov eax, dword [ebp + 0x17bc]
push ebx
push esi
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x17c0]
push edi
mov dword [ebp - 0x64], eax
push 0x400
lea eax, [ebp - 0x54]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str.WinRAR.exe
lea eax, [ebp - 0x54]
push eax
call fcn.0040390f
push eax
call fcn.00406562
mov edi, dword [sym.imp.SHELL32.dll_SHGetMalloc]
pop ecx
pop ecx
lea eax, [ebp - 0x6c]
push eax
call edi
call fcn.004037cc
cmp eax, 0x600
sbb al, al
inc al
mov byte [ebp - 0x56], al
lea eax, [ebp + 0xfac]
mov byte [ebp - 0x55], bl
mov esi, str.WinRAR.lnk
push eax
je 0x402932
call fcn.00401f72
lea eax, [ebp + 0xfac]
push eax
call fcn.00403866
lea eax, [ebp + 0xfac]
push esi
push eax
call fcn.00406538
pop ecx
pop ecx
lea eax, [ebp + 0xfac]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
lea eax, [ebp - 0x70]
push eax
setne byte [ebp - 0x55]
call edi
lea eax, [ebp - 0x5c]
push eax
push 0x19
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edi, dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea eax, [ebp + 0xfac]
push eax
push dword [ebp - 0x5c]
call edi
mov eax, dword [ebp - 0x70]
push dword [ebp - 0x5c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
jmp 0x40293d
call fcn.00401f72
mov edi, dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea eax, [ebp + 0xfac]
push eax
call fcn.00403866
lea eax, [ebp + 0xfac]
push esi
push eax
call fcn.00406538
mov eax, dword [ebp + 0x17b8]
pop ecx
pop ecx
cmp byte [eax + 0x14], bl
je 0x402a26
cmp byte [ebp + 0x17c4], bl
je 0x402989
lea eax, [ebp + 0xfac]
push eax
push ebx
call fcn.00401846
test al, al
jne 0x402989
cmp byte [ebp - 0x55], bl
je 0x402a32
push ebx
push dword [ebp - 0x64]
push 0x13f9
call fcn.00404b94
push eax
lea eax, [ebp + 0xfac]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00406303
test al, al
jne 0x402a32
cmp byte [ebp - 0x56], bl
je 0x402a32
cmp byte [ebp + 0x17c4], bl
je 0x402a32
lea eax, [ebp + 0xfac]
push eax
call fcn.00401890
test al, al
je 0x4029de
lea eax, [ebp + 0xfac]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x402a32
lea eax, [ebp + 0xfac]
push eax
call fcn.00401f72
lea eax, [ebp + 0xfac]
push eax
call fcn.00403866
lea eax, [ebp + 0xfac]
push esi
push eax
call fcn.00406538
pop ecx
pop ecx
push ebx
push dword [ebp - 0x64]
push 0x13f9
call fcn.00404b94
push eax
lea eax, [ebp + 0xfac]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00406303
jmp 0x402a32
lea eax, [ebp + 0xfac]
push eax
call fcn.004018e2
lea eax, [ebp - 0x60]
push eax
xor eax, eax
cmp byte [ebp - 0x56], bl
sete al
dec eax
and eax, 0xb
add eax, 0xb
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea eax, [ebp + 0xfac]
push eax
push dword [ebp - 0x60]
call edi
mov eax, dword [ebp - 0x6c]
push dword [ebp - 0x60]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
lea eax, [ebp + 0xfac]
push eax
call fcn.00403866
lea eax, [ebp + 0xfac]
push esi
push eax
call fcn.00406538
mov eax, dword [ebp + 0x17b8]
pop ecx
pop ecx
cmp byte [eax + 0x15], bl
je 0x402ac4
cmp byte [ebp + 0x17c4], bl
je 0x402aa3
lea eax, [ebp + 0xfac]
push eax
call fcn.00401890
test al, al
je 0x402ad0
push ebx
push dword [ebp - 0x64]
push 0x13f9
call fcn.00404b94
push eax
lea eax, [ebp + 0xfac]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00406303
jmp 0x402ad0
lea eax, [ebp + 0xfac]
push eax
call fcn.004018e2
mov esi, 0x411600
push 0x13ee
mov dword [ebp - 0x7c], esi
call fcn.00404b94
push 0x13ef
mov dword [ebp - 0x78], eax
call fcn.00404b94
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x60]
push eax
push 2
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea eax, [ebp + 0xfac]
push eax
push dword [ebp - 0x60]
call edi
mov eax, dword [ebp - 0x6c]
push dword [ebp - 0x60]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
lea eax, [ebp + 0xfac]
push eax
call fcn.00403866
lea eax, [ebp + 0xfac]
push esi
push eax
call fcn.00406538
pop ecx
pop ecx
cmp byte [ebp + 0x17c4], bl
je 0x402b4e
lea eax, [ebp + 0xfac]
push eax
call fcn.00401890
test al, al
je 0x402c4c
mov eax, dword [ebp + 0x17b8]
cmp byte [eax + 0x16], bl
je 0x402c3f
cmp dword [ebp - 0x68], ebx
je 0x402b73
lea eax, [ebp + 0xfac]
push eax
push dword [ebp - 0x68]
call fcn.00406562
pop ecx
pop ecx
lea eax, [ebp + 0xfac]
push eax
push ebx
call fcn.00401fab
push ebx
lea eax, [ebp + 0xfac]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x5c], ebx
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax*4 + 0x41613c]
cmp word [eax], bx
je 0x402c30
lea eax, [ebp + 0xfac]
push eax
lea eax, [ebp + 0x7ac]
push eax
call fcn.00406562
pop ecx
pop ecx
lea eax, [ebp + 0x7ac]
push eax
call fcn.00403866
mov eax, dword [ebp - 0x5c]
push dword [ebp + eax*4 - 0x7c]
lea eax, [ebp + 0x7ac]
push eax
call fcn.00406538
lea eax, [ebp + 0x7ac]
push str..lnk
push eax
call fcn.00406538
mov eax, dword [ebp - 0x5c]
add esp, 0x10
push dword [eax*4 + 0x41613c]
lea eax, [ebp - 0x54]
push eax
call fcn.0040390f
push eax
call fcn.00406562
mov eax, dword [ebp - 0x5c]
neg eax
pop ecx
sbb eax, eax
pop ecx
not eax
and eax, dword [ebp - 0x64]
push ebx
push eax
push 0x13f9
call fcn.00404b94
push eax
lea eax, [ebp + 0x7ac]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00406303
inc dword [ebp - 0x5c]
cmp dword [ebp - 0x5c], 3
jb 0x402b91
jmp 0x402c4c
lea eax, [ebp + 0xfac]
push eax
push ebx
call fcn.00401fab
lea eax, [ebp - 0x60]
push eax
push 0x17
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x402da8
lea eax, [ebp + 0xfac]
push eax
push dword [ebp - 0x60]
call edi
mov eax, dword [ebp - 0x6c]
push dword [ebp - 0x60]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
lea eax, [ebp + 0xfac]
push eax
call fcn.00403866
lea eax, [ebp + 0xfac]
push esi
push eax
call fcn.00406538
pop ecx
pop ecx
cmp byte [ebp + 0x17c4], bl
je 0x402cb0
lea eax, [ebp + 0xfac]
push eax
call fcn.00401890
test al, al
je 0x402da8
mov eax, dword [ebp + 0x17b8]
cmp byte [eax + 0x16], bl
lea eax, [ebp + 0xfac]
push eax
push ebx
je 0x402da3
call fcn.00401fab
push ebx
lea eax, [ebp + 0xfac]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [ebp - 0x68], ebx
je 0x402d00
lea eax, [ebp + 0xfac]
push eax
call fcn.00401890
test al, al
je 0x402d00
lea eax, [ebp + 0xfac]
push eax
push dword [ebp - 0x68]
call fcn.00406562
pop ecx
pop ecx
xor esi, esi
mov eax, dword [esi*4 + 0x41613c]
cmp word [eax], bx
je 0x402d97
lea eax, [ebp + 0xfac]
push eax
lea eax, [ebp + 0x7ac]
push eax
call fcn.00406562
pop ecx
pop ecx
lea eax, [ebp + 0x7ac]
push eax
call fcn.00403866
push dword [ebp + esi*4 - 0x7c]
lea eax, [ebp + 0x7ac]
push eax
call fcn.00406538
lea eax, [ebp + 0x7ac]
push str..lnk
push eax
call fcn.00406538
add esp, 0x10
push dword [esi*4 + 0x41613c]
lea eax, [ebp - 0x54]
push eax
call fcn.0040390f
push eax
call fcn.00406562
mov eax, esi
neg eax
pop ecx
sbb eax, eax
pop ecx
not eax
and eax, dword [ebp - 0x64]
push ebx
push eax
push 0x13f9
call fcn.00404b94
push eax
lea eax, [ebp + 0x7ac]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00406303
inc esi
cmp esi, 3
jb 0x402d02
jmp 0x402da8
call fcn.00401fab
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp + 0x17ac]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004068ab
add ebp, 0x17b0
leave
ret 0x10