Function at 0x46da10
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffec
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
mov esi, eax
push 0x400
lea eax, [ebp - 0x414]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push str.WinRAR.exe
lea eax, [ebp - 0x414]
call fcn.0040ba60
push eax
call fcn.00494f58
add esp, 8
lea edx, [ebp - 8]
push edx
call sub.SHELL32.DLL_SHGetMalloc
lea eax, [ebp - 0x814]
call fcn.0046e204
lea eax, [ebp - 0x814]
call fcn.0040bf64
push str.WinRAR.lnk
lea edx, [ebp - 0x814]
push edx
call fcn.00494e7c
add esp, 8
cmp byte [esi + 0x14], 0
je 0x46dac4
lea eax, [ebp - 0x814]
xor edx, edx
call fcn.0040a504
test al, al
je 0x46daa2
cmp byte [ebp + 8], 0
je 0x46dad0
push edi
push 0
mov eax, 0x537
call fcn.0041202c
mov ecx, eax
lea edx, [ebp - 0x814]
lea eax, [ebp - 0x414]
call fcn.0046e12c
jmp 0x46dad0
lea edx, [ebp - 0x814]
push edx
call sub.KERNEL32.DLL_DeleteFileA
lea ecx, [ebp - 4]
push ecx
push 0xb
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
lea eax, [ebp - 0x814]
push eax
push dword [ebp - 4]
call sub.SHELL32.DLL_SHGetPathFromIDListA
push dword [ebp - 4]
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [edx]
call dword [ecx + 0x14]
lea eax, [ebp - 0x814]
call fcn.0040bf64
push str.WinRAR.lnk
lea edx, [ebp - 0x814]
push edx
call fcn.00494e7c
add esp, 8
cmp byte [esi + 0x15], 0
je 0x46db3f
push edi
push 0
mov eax, 0x537
call fcn.0041202c
mov ecx, eax
lea edx, [ebp - 0x814]
lea eax, [ebp - 0x414]
call fcn.0046e12c
jmp 0x46db4b
lea edx, [ebp - 0x814]
push edx
call sub.KERNEL32.DLL_DeleteFileA
mov ecx, dword [str.WinRAR]
mov eax, 0x38e
mov dword [ebp - 0x14], ecx
mov ecx, dword [0x4a8564]
mov dword [ebp - 0x10], ecx
mov ecx, dword [0x4a8568]
mov dword [ebp - 0xc], ecx
call fcn.0041202c
mov dword [ebp - 0x10], eax
mov eax, 0x38f
call fcn.0041202c
mov dword [ebp - 0xc], eax
lea edx, [ebp - 4]
push edx
push 2
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
lea ecx, [ebp - 0x814]
push ecx
push dword [ebp - 4]
call sub.SHELL32.DLL_SHGetPathFromIDListA
push dword [ebp - 4]
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
lea eax, [ebp - 0x814]
call fcn.0040bf64
push str.WinRAR
lea edx, [ebp - 0x814]
push edx
call fcn.00494e7c
add esp, 8
cmp byte [esi + 0x16], 0
je 0x46dcb9
test ebx, ebx
je 0x46dbe5
lea ecx, [ebp - 0x814]
push ecx
push ebx
call fcn.00494f58
add esp, 8
push 0
lea eax, [ebp - 0x814]
push eax
call sub.KERNEL32.DLL_CreateDirectoryA
xor ebx, ebx
mov eax, dword [ebx*4 + 0x4a8554]
cmp byte [eax], 0
je 0x46dcad
lea edx, [ebp - 0x814]
push edx
lea ecx, [ebp - 0xc14]
push ecx
call fcn.00494f58
add esp, 8
lea eax, [ebp - 0xc14]
call fcn.0040bf64
push dword [ebp + ebx*4 - 0x14]
lea edx, [ebp - 0xc14]
push edx
call fcn.00494e7c
add esp, 8
push 0x4a8ab1
lea ecx, [ebp - 0xc14]
push ecx
call fcn.00494e7c
add esp, 8
test ebx, ebx
jne 0x46dc68
lea eax, [ebp - 0xc14]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x46dc68
cmp byte [ebp + 8], 0
je 0x46dcc4
push dword [ebx*4 + 0x4a8554]
lea eax, [ebp - 0x414]
call fcn.0040ba60
push eax
call fcn.00494f58
add esp, 8
test ebx, ebx
jne 0x46dc8b
mov edx, edi
jmp 0x46dc8d
xor edx, edx
push edx
push 0
mov eax, 0x537
call fcn.0041202c
mov ecx, eax
lea edx, [ebp - 0xc14]
lea eax, [ebp - 0x414]
call fcn.0046e12c
inc ebx
cmp ebx, 3
jl 0x46dbf5
jmp 0x46dcc4
lea eax, [ebp - 0x814]
call fcn.0046e23c
call fcn.0040ffc8
test eax, eax
je 0x46de09
lea edx, [ebp - 4]
push edx
push 0x17
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
test eax, eax
jne 0x46de09
lea ecx, [ebp - 0x814]
push ecx
push dword [ebp - 4]
call sub.SHELL32.DLL_SHGetPathFromIDListA
push dword [ebp - 4]
mov eax, dword [ebp - 8]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
lea eax, [ebp - 0x814]
call fcn.0040bf64
push str.WinRAR
lea edx, [ebp - 0x814]
push edx
call fcn.00494e7c
add esp, 8
cmp byte [esi + 0x16], 0
je 0x46ddfe
push 0
lea ecx, [ebp - 0x814]
push ecx
call sub.KERNEL32.DLL_CreateDirectoryA
xor ebx, ebx
mov eax, dword [ebx*4 + 0x4a8554]
cmp byte [eax], 0
je 0x46ddf2
lea edx, [ebp - 0x814]
push edx
lea ecx, [ebp - 0x1014]
push ecx
call fcn.00494f58
add esp, 8
lea eax, [ebp - 0x1014]
call fcn.0040bf64
push dword [ebp + ebx*4 - 0x14]
lea edx, [ebp - 0x1014]
push edx
call fcn.00494e7c
add esp, 8
push 0x4a8ab1
lea ecx, [ebp - 0x1014]
push ecx
call fcn.00494e7c
add esp, 8
test ebx, ebx
jne 0x46ddad
lea eax, [ebp - 0x1014]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x46ddad
cmp byte [ebp + 8], 0
je 0x46de09
push dword [ebx*4 + 0x4a8554]
lea eax, [ebp - 0x414]
call fcn.0040ba60
push eax
call fcn.00494f58
add esp, 8
test ebx, ebx
jne 0x46ddd0
mov edx, edi
jmp 0x46ddd2
xor edx, edx
push edx
push 0
mov eax, 0x537
call fcn.0041202c
mov ecx, eax
lea edx, [ebp - 0x1014]
lea eax, [ebp - 0x414]
call fcn.0046e12c
inc ebx
cmp ebx, 3
jl 0x46dd3a
jmp 0x46de09
lea eax, [ebp - 0x814]
call fcn.0046e23c
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [edx]
call dword [ecx + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4