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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x452724]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
call fcn.0041354e
xor ebx, ebx
cmp byte [ebp + 0xc], bl
pop ecx
mov edi, 0x104
jne 0x412c66
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x412c66
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x412c03
call dword [0x452508]
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 0x412c03
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x412c03
cmp word [eax], bx
je 0x412c03
push edi
call fcn.00416ef3
mov dword [esi], eax
mov eax, dword [ebp - 0x18]
cmp eax, ebx
pop ecx
mov dword [ebp - 0x20], eax
je 0x412bb4
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x412bb8
xor eax, eax
jmp 0x412bd3
add eax, eax
mov dword [ebp - 0x1c], eax
call fcn.00418520
mov eax, esp
push dword [ebp - 0x28]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push eax
call fcn.0040e8cc
push eax
push str._s_ntr_
push edi
push dword [esi]
call fcn.00417f74
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 0x412c03
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [esi], ebx
jne 0x412c5d
push str.SHGetFolderPathA
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [ebp - 0x20], eax
je 0x412c5d
push edi
call fcn.00416ef3
pop ecx
push eax
push ebx
push ebx
push 0x1a
push ebx
mov dword [esi], eax
call dword [ebp - 0x20]
test eax, eax
jne 0x412c5d
mov eax, dword [esi]
cmp eax, ebx
je 0x412c5d
push edi
push str._ntr_
push eax
call fcn.00418f20
add esp, 0xc
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [ebp + 0x10], bl
je 0x412c5d
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 0x412ca1
push edi
call fcn.00416ef3
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.00418f20
add esp, 0xc
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp byte [ebp + 0x10], bl
je 0x412ca1
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.00414b1e
leave
ret