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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffff004
push eax
add esp, 0xffffffec
mov ebx, edx
mov esi, eax
lea edi, [esp + 0x414]
mov ebp, str..rar
push 0x400
lea eax, [esp + 0x18]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
lea edx, [ebp + 0x13b]
push edx
lea eax, [esp + 0x18]
call fcn.0040a924
push eax
call fcn.00482a00
add esp, 8
lea edx, [esp + 4]
push edx
call sub.SHELL32.DLL_SHGetMalloc
mov eax, edi
call fcn.00462634
mov eax, edi
call fcn.0040adfc
lea edx, [ebp + 0x527]
push edx
push edi
call fcn.00482924
add esp, 8
cmp byte [esi + 0x14], 0
je 0x461a2f
push 0
push 0
mov eax, 0x537
call fcn.00410804
mov ecx, eax
mov edx, edi
lea eax, [esp + 0x1c]
call fcn.0046255c
jmp 0x461a35
push edi
call sub.KERNEL32.DLL_DeleteFileA
push esp
push 0xb
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
push edi
push dword [esp + 4]
call sub.SHELL32.DLL_SHGetPathFromIDListA
push dword [esp]
mov edx, dword [esp + 8]
push edx
mov ecx, dword [edx]
call dword [ecx + 0x14]
mov eax, edi
call fcn.0040adfc
lea edx, [ebp + 0x527]
push edx
push edi
call fcn.00482924
add esp, 8
cmp byte [esi + 0x15], 0
je 0x461a90
push 0
push 0
mov eax, 0x537
call fcn.00410804
mov ecx, eax
mov edx, edi
lea eax, [esp + 0x1c]
call fcn.0046255c
jmp 0x461a96
push edi
call sub.KERNEL32.DLL_DeleteFileA
mov edx, dword [0x498598]
mov eax, 0x38e
mov dword [esp + 8], edx
mov edx, dword [0x49859c]
mov dword [esp + 0xc], edx
mov edx, dword [0x4985a0]
mov dword [esp + 0x10], edx
call fcn.00410804
mov dword [esp + 0xc], eax
mov eax, 0x38f
call fcn.00410804
mov dword [esp + 0x10], eax
push esp
push 2
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
push edi
push dword [esp + 4]
call sub.SHELL32.DLL_SHGetPathFromIDListA
push dword [esp]
mov edx, dword [esp + 8]
push edx
mov ecx, dword [edx]
call dword [ecx + 0x14]
mov eax, edi
call fcn.0040adfc
lea edx, [ebp + 0x1c2]
push edx
push edi
call fcn.00482924
add esp, 8
cmp byte [esi + 0x16], 0
je 0x461bdd
test ebx, ebx
je 0x461b20
push edi
push ebx
call fcn.00482a00
add esp, 8
push 0
push edi
call sub.KERNEL32.DLL_CreateDirectoryA
xor ebx, ebx
mov eax, dword [ebx*4 + 0x49858c]
cmp byte [eax], 0
je 0x461bd1
push edi
lea edx, [esp + 0x818]
push edx
call fcn.00482a00
add esp, 8
lea eax, [esp + 0x814]
call fcn.0040adfc
push dword [esp + ebx*4 + 8]
lea edx, [esp + 0x818]
push edx
call fcn.00482924
add esp, 8
lea ecx, [ebp + 0x52d]
push ecx
lea eax, [esp + 0x818]
push eax
call fcn.00482924
add esp, 8
test ebx, ebx
jne 0x461b98
lea edx, [esp + 0x814]
push edx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x461be4
push dword [ebx*4 + 0x49858c]
lea eax, [esp + 0x18]
call fcn.0040a924
push eax
call fcn.00482a00
add esp, 8
push 0
push 0
mov eax, 0x537
call fcn.00410804
mov ecx, eax
lea edx, [esp + 0x81c]
lea eax, [esp + 0x1c]
call fcn.0046255c
inc ebx
cmp ebx, 3
jl 0x461b2a
jmp 0x461be4
mov eax, edi
call fcn.0046266c
call fcn.0040e9e0
test eax, eax
je 0x461cff
push esp
push 0x17
push 0
call sub.SHELL32.DLL_SHGetSpecialFolderLocation
test eax, eax
jne 0x461cff
push edi
push dword [esp + 4]
call sub.SHELL32.DLL_SHGetPathFromIDListA
push dword [esp]
mov edx, dword [esp + 8]
push edx
mov ecx, dword [edx]
call dword [ecx + 0x14]
mov eax, edi
call fcn.0040adfc
lea edx, [ebp + 0x1c2]
push edx
push edi
call fcn.00482924
add esp, 8
cmp byte [esi + 0x16], 0
je 0x461cf8
push 0
push edi
call sub.KERNEL32.DLL_CreateDirectoryA
xor ebx, ebx
mov eax, dword [ebx*4 + 0x49858c]
cmp byte [eax], 0
je 0x461cec
push edi
lea edx, [esp + 0xc18]
push edx
call fcn.00482a00
add esp, 8
lea eax, [esp + 0xc14]
call fcn.0040adfc
push dword [esp + ebx*4 + 8]
lea edx, [esp + 0xc18]
push edx
call fcn.00482924
add esp, 8
lea ecx, [ebp + 0x52d]
push ecx
lea eax, [esp + 0xc18]
push eax
call fcn.00482924
add esp, 8
test ebx, ebx
jne 0x461cb3
lea edx, [esp + 0xc14]
push edx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x461cff
push dword [ebx*4 + 0x49858c]
lea eax, [esp + 0x18]
call fcn.0040a924
push eax
call fcn.00482a00
add esp, 8
push 0
push 0
mov eax, 0x537
call fcn.00410804
mov ecx, eax
lea edx, [esp + 0xc1c]
lea eax, [esp + 0x1c]
call fcn.0046255c
inc ebx
cmp ebx, 3
jl 0x461c45
jmp 0x461cff
mov eax, edi
call fcn.0046266c
mov edx, dword [esp + 4]
push edx
mov ecx, dword [edx]
call dword [ecx + 8]
add esp, 0x1014
pop ebp
pop edi
pop esi
pop ebx
ret