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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x566410
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x5bf500]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x5bf500]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov esi, edx
push esi
xor edi, edi
push edi
push edi
push 0x1c
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
test eax, eax
js 0x4cabe0
lea ecx, [esp + 0x1c]
call fcn.00403ff0
mov dword [esp + 0x70], edi
lea ecx, [esp + 0x18]
push 6
push edi
push str.Local
call fcn.004049b0
mov edx, dword [esp + 0x28]
mov ecx, eax
lea eax, [edx - 6]
cmp ecx, eax
jne 0x4cab16
lea eax, [edx - 5]
push eax
push edi
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x24]
call fcn.004042c0
mov byte [esp + 0x70], 1
mov edx, eax
push str.LocalLow
lea ecx, [esp + 0x4c]
call fcn.00419d80
add esp, 4
mov dword [esp + 0x14], eax
mov byte [esp + 0x70], 2
lea ecx, [esp + 0x18]
cmp ecx, eax
je 0x4caa09
cmp dword [esp + 0x2c], 8
jb 0x4ca9e8
push dword [esp + 0x18]
call fcn.00443e80
mov eax, dword [esp + 0x18]
add esp, 4
xor ecx, ecx
mov dword [esp + 0x2c], 7
mov word [esp + 0x18], cx
lea ecx, [esp + 0x18]
push eax
mov dword [esp + 0x2c], 0
call fcn.00404450
mov byte [esp + 0x70], 1
cmp dword [esp + 0x5c], 8
jb 0x4caa21
push dword [esp + 0x48]
call fcn.00443e80
add esp, 4
xor eax, eax
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], 0
mov word [esp + 0x48], ax
mov byte [esp + 0x70], al
cmp dword [esp + 0x44], 8
jb 0x4caa4f
push dword [esp + 0x30]
call fcn.00443e80
add esp, 4
xor eax, eax
mov dword [esp + 0x44], 7
cmp dword [esp + 0x2c], 8
mov word [esp + 0x30], ax
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
push eax
mov dword [esp + 0x44], 0
call ebx
cmp eax, 0xffffffff
je 0x4caa85
and eax, 0x10
jne 0x4cab16
push esi
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp byte [ebp + 0xc], 0
je 0x4caadf
push esi
lea ecx, [esp + 0x34]
call fcn.00403ff0
mov byte [esp + 0x70], 3
lea ecx, [esp + 0x30]
push str.tmp_
call fcn.004040f0
cmp dword [esp + 0x44], 8
lea eax, [esp + 0x30]
cmovae eax, dword [esp + 0x30]
push eax
push 0x400
push esi
call fcn.00523667
add esp, 0xc
mov byte [esp + 0x70], 0
lea ecx, [esp + 0x30]
call fcn.004040c0
mov dword [esp + 0x70], 0xffffffff
cmp dword [esp + 0x2c], 8
jb 0x4caafa
push dword [esp + 0x18]
call fcn.00443e80
add esp, 4
xor eax, eax
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
mov word [esp + 0x18], ax
jmp 0x4cac1c
push 9
push 0x59a274
lea ecx, [esp + 0x20]
call fcn.00404c80
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
push eax
call ebx
cmp eax, 0xffffffff
je 0x4cab53
and eax, 0x10
je 0x4cab53
push 1
push 0x58d734
lea ecx, [esp + 0x20]
call fcn.00404c80
jmp 0x4cab8a
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
push 0
cmovae eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4cab7c
push esi
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x4cabac
push 0x58d734
lea ecx, [esp + 0x1c]
call fcn.004040f0
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
push eax
push 0x400
push esi
call fcn.00523667
mov edi, 1
add esp, 0xc
mov dword [esp + 0x70], 0xffffffff
cmp dword [esp + 0x2c], 8
jb 0x4cabc7
push dword [esp + 0x18]
call fcn.00443e80
add esp, 4
xor eax, eax
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
mov word [esp + 0x18], ax
jmp 0x4cabeb
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp byte [ebp + 0xc], 0
je 0x4cac1a
push str.tmp_
push 0x400
push esi
call fcn.005234b3
add esp, 0xc
push esi
call ebx
cmp eax, 0xffffffff
je 0x4cac11
and eax, 0x10
jne 0x4cac1a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, edi
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0051ece9
mov esp, ebp
pop ebp
ret