Function at 0x1005e866
Capabilities:
Create directory
Get common file path
Print debug messages

Disassembly:
sub esp, 0x414
mov eax, dword [0x1012c510]
xor eax, esp
mov dword [esp + 0x410], eax
mov eax, dword [esp + 0x418]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebp
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x1c], eax
mov ebp, 0x101062e0
cmp dword [esp + 0x430], esi
je 0x1005e92e
call fcn.1005e711
test eax, eax
je 0x1005e92e
push 0x101062f8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x1005e92e
push str.IEGetWriteableFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1005e91c
lea ecx, [esp + 0x14]
push ecx
push 0x1010f40c
call eax
test eax, eax
jl 0x1005e91c
push dword [esp + 0x14]
call edi
push ebp
mov esi, eax
call edi
xor ecx, ecx
push 2
lea eax, [esi + eax + 9]
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100a20ff
pop ecx
push dword [esp + 0x14]
mov esi, eax
push esi
call ebx
push dword [esp + 0x14]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
jne 0x1005ea18
push 0x10106310
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x1005e9bd
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1005e9af
cmp dword [esp + 0x430], 0
mov ecx, 0x1010f40c
jne 0x1005e965
mov ecx, 0x1010f3fc
lea edx, [esp + 0x10]
push edx
push 0
push 0x8000
push ecx
call eax
test eax, eax
jl 0x1005e9af
push dword [esp + 0x10]
call edi
push ebp
mov esi, eax
call edi
xor ecx, ecx
push 2
lea eax, [esi + eax + 9]
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100a20ff
pop ecx
push dword [esp + 0x10]
mov esi, eax
push esi
call ebx
push dword [esp + 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
jne 0x1005ea18
lea eax, [esp + 0x20]
push eax
xor eax, eax
push eax
push eax
push 0x801c
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x1005ea09
push ebp
call edi
mov esi, eax
lea eax, [esp + 0x20]
push eax
call edi
xor ecx, ecx
push 2
lea eax, [esi + eax + 9]
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100a20ff
mov esi, eax
pop ecx
lea eax, [esp + 0x20]
push eax
push esi
call ebx
test esi, esi
jne 0x1005ea18
push str.TBERR:_Cant_get_a_folder__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x1005ea80
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ebx, 0x10107ca8
push ebx
push esi
call edi
push ebp
push esi
call edi
push ebx
push esi
call edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1005ea64
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1005ea64
push eax
lea eax, [esp + 0x24]
push str.TBERR:_Cant_create_a_folder__d_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x20]
push eax
jmp 0x1005ea0e
push dword [esp + 0x42c]
push esi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
call fcn.100a212e
xor eax, eax
pop ecx
inc eax
mov ecx, dword [esp + 0x420]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100bfae1
add esp, 0x414
ret