Function at 0x412ef5
Capabilities:
Create directory
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x46c054]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
call fcn.00413de9
xor ebx, ebx
cmp byte [ebp + 0xc], bl
pop ecx
mov edi, 0x104
jne 0x41307f
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x41307f
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x41301c
call dword [0x46b508]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0xa520a1a4
mov word [ebp - 0x10], 0x1780
mov word [ebp - 0xe], 0x4ff6
mov byte [ebp - 0xc], 0xbd
mov byte [ebp - 0xb], 0x18
mov byte [ebp - 0xa], 0x16
mov byte [ebp - 9], 0x73
mov byte [ebp - 8], 0x43
mov byte [ebp - 7], 0xc5
mov byte [ebp - 6], 0xaf
mov byte [ebp - 5], 0x16
call dword [ebp - 0x1c]
test eax, eax
jne 0x41301c
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x41301c
cmp word [eax], bx
je 0x41301c
push edi
call fcn.00428043
mov dword [esi], eax
mov eax, dword [ebp - 0x18]
cmp eax, ebx
pop ecx
mov dword [ebp - 0x20], eax
je 0x412fcd
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x412fd1
xor eax, eax
jmp 0x412fec
add eax, eax
mov dword [ebp - 0x1c], eax
call fcn.00429670
mov eax, esp
push dword [ebp - 0x28]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push eax
call fcn.0040e8a7
push eax
push str._s_ntr_
push edi
push dword [esi]
call fcn.004290c4
add esp, 0x10
push dword [ebp - 0x18]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [ebp + 0x10], bl
je 0x41301c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [esi], ebx
jne 0x413076
push str.SHGetFolderPathA
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x413076
push edi
call fcn.00428043
pop ecx
push eax
push ebx
push ebx
push 0x1a
push ebx
mov dword [esi], eax
call dword [ebp - 0x20]
test eax, eax
jne 0x413076
mov eax, dword [esi]
cmp eax, ebx
je 0x413076
push edi
push str._ntr_
push eax
call fcn.0042a070
add esp, 0xc
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [ebp + 0x10], bl
je 0x413076
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esi], ebx
jne 0x4130ba
push edi
call fcn.00428043
pop ecx
push eax
push edi
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
push str.ntr_
push dword [esi]
call fcn.0042a070
add esp, 0xc
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [ebp + 0x10], bl
je 0x4130ba
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00425c6b
leave
ret