Function at 0x100051f0
Capabilities:
Create directory
Get common file path

Disassembly:
sub esp, 0xa18
mov eax, dword [0x1003230c]
xor eax, esp
mov dword [esp + 0xa14], eax
mov eax, dword [esp + 0xa1c]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], eax
xor esi, esi
call fcn.10006a70
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
test eax, eax
je 0x100052b0
push 0x1002bd24
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
test ebp, ebp
je 0x100052b0
push str.IEGetWriteableFolderPath
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100052a1
lea ecx, [esp + 0x10]
push ecx
push 0x1002bae0
call eax
test eax, eax
jl 0x100052a1
mov edx, dword [esp + 0x10]
push edx
call edi
push 0x1002bd0c
mov esi, eax
call edi
xor ecx, ecx
lea eax, [esi + eax + 9]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10010aec
mov esi, eax
mov eax, dword [esp + 0x14]
add esp, 4
push eax
push esi
call ebx
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
jne 0x1000539e
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
test ebp, ebp
je 0x10005335
push str.SHGetKnownFolderPath
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000532a
lea edx, [esp + 0x14]
push edx
push 0
push 0x8000
push 0x1002bae0
call eax
test eax, eax
jl 0x1000532a
mov eax, dword [esp + 0x14]
push eax
call edi
push 0x1002bd0c
mov esi, eax
call edi
xor ecx, ecx
lea eax, [esi + eax + 9]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10010aec
mov esi, eax
mov eax, dword [esp + 0x18]
add esp, 4
push eax
push esi
call ebx
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
jne 0x1000539e
lea edx, [esp + 0x1c]
push edx
push 0
push 0
push 0x801c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x1000538a
push 0x1002bd0c
call edi
mov esi, eax
lea eax, [esp + 0x1c]
push eax
call edi
xor ecx, ecx
lea eax, [esi + eax + 9]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10010aec
mov esi, eax
add esp, 4
lea eax, [esp + 0x1c]
push eax
push esi
call ebx
test esi, esi
jne 0x1000539e
push str.TBERR:_Cant_get_a_folder__n
call fcn.10001180
add esp, 4
xor eax, eax
jmp 0x10005441
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x1002be74
push esi
call edi
push 0x1002bd0c
push esi
call edi
push 0x1002be74
push esi
call edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10005422
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0xb7
je 0x10005422
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [esp + 0x22e]
push edx
mov word [esp + 0x230], cx
call fcn.10017160
push edi
push str.TBERR:_Cant_create_a_folder__d_n
lea eax, [esp + 0x238]
push 0x400
push eax
call fcn.10011853
lea ecx, [esp + 0x240]
push ecx
call fcn.10001180
add esp, 0x20
xor eax, eax
jmp 0x10005441
mov edx, dword [esp + 0x18]
push 0x800
push esi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
call fcn.10011d08
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0xa24]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1001172b
add esp, 0xa18
ret