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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x66ff80]
xor ecx, ecx
cmp eax, 2
je 0x4177f8
mov edx, 0x66ff80
cmp eax, dword [ebp + 8]
jne 0x4177ec
mov eax, dword [ebp + 0xc]
cmp dword [edx + 4], eax
je 0x4177f8
mov eax, dword [edx + 0x20]
add edx, 0x20
inc ecx
cmp eax, 2
jne 0x4177df
shl ecx, 5
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x66ff80], 2
mov dword [ebp - 8], ebx
jne 0x417813
push 1
jmp 0x4179e4
mov edi, dword [ebx + 0x66ff8c]
cmp edi, 0xfffe
jne 0x417835
mov esi, dword [ebp + 0x14]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp 0x4178c6
cmp edi, 0xffff
jne 0x417869
call fcn.00603e5e
mov esi, dword [ebp + 0x14]
mov eax, dword [eax + 8]
push 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push esi
call fcn.00593228
pop ecx
test eax, eax
pop ecx
je 0x4178c6
and byte [eax + 1], 0
jmp 0x4178c6
cmp dword [0x6ae134], 0
mov esi, dword [ebp + 0x14]
jne 0x4178ac
mov eax, dword [0x6ae138]
test eax, eax
jne 0x417892
push str.shfolder.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x6ae138], eax
je 0x4178a3
push str.SHGetFolderPathA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x6ae134], eax
cmp dword [0x6ae134], 0
je 0x4178bb
xor eax, eax
push esi
push eax
push eax
push edi
push eax
call dword [0x6ae134]
jmp 0x4178be
push 1
pop eax
test eax, eax
jne 0x4179e2
cmp dword [ebp + 8], 1
jne 0x41790a
cmp dword [ebp + 0xc], 0xd
je 0x4178de
cmp dword [ebp + 0xc], 0xa
je 0x4178de
cmp dword [ebp + 0xc], 0xf
jne 0x41790a
push esi
call fcn.00593008
cmp byte [eax + esi - 1], 0x5c
pop ecx
jne 0x4178f8
push esi
call fcn.00593008
and byte [eax + esi - 1], 0
pop ecx
push 0x5c
push esi
call fcn.00593228
pop ecx
test eax, eax
pop ecx
je 0x41790a
and byte [eax + 1], 0
lea edi, [ebx + 0x66ff90]
test edi, edi
je 0x41796a
mov ebx, edi
cmp dword [ebx], 0
je 0x417967
push esi
call fcn.00593008
cmp byte [eax + esi - 1], 0x5c
pop ecx
je 0x417936
push 0x66d34c
push esi
call fcn.00593265
pop ecx
pop ecx
push dword [ebx]
push esi
call fcn.00593265
cmp word [ebp + 0x10], 0
pop ecx
pop ecx
je 0x417960
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x417960
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4179c5
add ebx, 4
test edi, edi
jne 0x417916
mov ebx, dword [ebp - 8]
cmp word [ebx + 0x66ff88], 0
je 0x4179c9
lea eax, [ebp - 8]
push eax
call fcn.004694c8
push esi
call fcn.00593008
cmp byte [eax + esi - 1], 0x5c
pop ecx
pop ecx
je 0x417999
push 0x66d34c
push esi
call fcn.00593265
pop ecx
pop ecx
lea eax, [ebp - 8]
push eax
push esi
call fcn.00593265
cmp word [ebp + 0x10], 0
pop ecx
pop ecx
je 0x4179c9
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4179c9
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4179c9
push 3
jmp 0x4179e4
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push esi
call edi
cmp eax, 0xffffffff
je 0x4179e2
push esi
call edi
test al, 0x10
je 0x4179e2
xor eax, eax
jmp 0x4179e5
push 4
pop eax
pop edi
pop esi
pop ebx
leave
ret