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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dd72e
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x65eb68]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x248], ebx
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x240], 0
call fcn.004d37d0
mov ecx, eax
call fcn.004d32a0
test al, al
jne 0x4a96d8
call fcn.0056500f
mov ecx, eax
test ecx, ecx
je 0x4a9a54
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
push 0x5ecc50
mov ecx, ebx
mov dword [ebp - 4], 0
call fcn.00404e34
test al, al
jne 0x4a96b8
push 0
push 0x5ecc50
mov ecx, ebx
call fcn.00405684
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00599f9c
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x224], 0
call fcn.0056500f
mov ecx, eax
test ecx, ecx
je 0x4a9a54
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x21c], esi
lea eax, [ebp - 0x224]
mov dword [ebp - 4], 1
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x4a979b
lea eax, [ebp - 0x220]
push eax
push 0x1a
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
test eax, eax
jne 0x4a977d
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x220]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x4a977d
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a9755
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.00405684
mov esi, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x224]
push dword [ebp - 0x220]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x224]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [esi - 0xc], 0
jne 0x4a97c7
push 0x5ecc50
mov ecx, ebx
call fcn.00404b48
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jmp 0x4a9a37
push 0x5f10fc
lea ecx, [ebp - 0x22c]
call fcn.00404b48
mov edi, eax
mov byte [ebp - 4], 2
call fcn.005710c5
mov eax, dword [eax + 4]
push dword [eax + 0x50]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00405d5b
add esp, 0xc
mov eax, dword [eax]
mov ecx, eax
mov edi, dword [esi - 0xc]
sub ecx, esi
sar ecx, 1
mov byte [ebp - 4], 3
mov edx, dword [eax - 0xc]
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x234], edi
test edx, edx
js 0x4a9a4a
test eax, eax
jne 0x4a9832
xor edx, edx
mov dword [ebp - 0x230], edx
jmp 0x4a9844
push edx
push eax
call fcn.005a1e8e
add esp, 8
mov dword [ebp - 0x230], eax
mov edx, eax
mov eax, SysReAllocString
sub eax, edx
cmp eax, edi
jl 0x4a9a4a
add edi, edx
js 0x4a9a4a
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4a9884
push edi
lea ecx, [ebp - 0x21c]
call fcn.00405578
mov esi, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x230]
mov eax, dword [ebp - 0x238]
mov ecx, dword [ebp - 0x234]
cmp eax, ecx
lea eax, [esi + eax*2]
jbe 0x4a989d
mov eax, dword [ebp - 0x23c]
lea ecx, [esi + ecx*2]
add edx, edx
je 0x4a98d4
test ecx, ecx
je 0x4a98c4
push edx
test eax, eax
je 0x4a98b9
push eax
push ecx
call fcn.0059d630
add esp, 0xc
jmp 0x4a98d4
push 0
push ecx
call fcn.0059dbb0
add esp, 0xc
call fcn.005a1c31
mov dword [eax], 0x16
call fcn.005a1920
cmp edi, dword [esi - 8]
jg 0x4a9a4a
mov dword [esi - 0xc], edi
xor eax, eax
mov word [esi + edi*2], ax
or edi, 0xffffffff
mov edx, dword [ebp - 0x228]
mov eax, edi
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4a990a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x22c]
mov eax, edi
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4a992b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4a9a19
test al, 0x10
je 0x4a9a19
push 0x5f10fc
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.00405d5b
add esp, 0xc
mov dword [ebp - 0x22c], eax
mov eax, dword [eax]
mov byte [ebp - 4], 5
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x4a9985
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x4a999b
call fcn.0056500f
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x4a9a5e
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x22c]
add eax, 0x10
mov dword [ebx], eax
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x240], 2
mov ecx, dword [ecx]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
push dword [ecx - 0xc]
push ecx
push ebx
call fcn.00405f18
mov edx, dword [ebp - 0x228]
add esp, 0x14
mov dword [ebp - 4], 1
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4a99f4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x4a96b8
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4a96b8
push 0x5ecc50
mov ecx, ebx
call fcn.00404b48
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x4a96b8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4a96b8
push 0x80070057
call fcn.00404e0e
push 0x80004005
call fcn.00404e0e
push 0x80004005
call fcn.00404e0e
int3