Function at 0x1054f03
Capabilities:
Create directory
Get common file path
Query environment variable

Disassembly:
mov eax, 0x10bf8dd
call fcn.0106f6c0
sub esp, 0xa60
push ebx
push ebp
push esi
push edi
call fcn.01025504
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, 0x104
jne 0x1054f38
call fcn.0102550f
test eax, eax
je 0x1055382
mov ebx, dword [sym.imp.msvcrt.dll_wcscpy]
lea eax, [esp + 0x34]
push 0x1005e34
xor ebp, ebp
push eax
mov word [esp + 0x3c], bp
call ebx
pop ecx
pop ecx
lea eax, [esp + 0x864]
push eax
push ebp
push ebp
push 0x23
push ebp
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x1054f8f
lea eax, [esp + 0x864]
push 0x100c708
push eax
call ebx
pop ecx
pop ecx
push esi
lea eax, [esp + 0x868]
push eax
push 0x100c6e8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [esp + 0x34]
push eax
call ebx
mov ebp, dword [sym.imp.msvcrt.dll_wcsncat]
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x86c]
push eax
lea eax, [esp + 0x40]
push eax
call ebp
add esp, 0x10
lea eax, [esp + 0x44c]
push eax
xor eax, eax
push eax
push eax
push 0x1c
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x1054ffb
lea eax, [esp + 0x44c]
push 0x10053e0
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
lea eax, [esp + 0x450]
push eax
push 0x100c6e8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.0108d5b3
call fcn.0108d5be
and dword [esp + 0x1c], 0
lea eax, [esp + 0x20]
mov dword [esp + 0x18], eax
push 0
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0xc
call fcn.01054588
test eax, eax
jl 0x1055382
lea eax, [esp + 0x34]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x3c]
push 0x100c6d0
push eax
call ebp
add esp, 0x10
push 0
lea eax, [esp + 0x38]
push eax
call edi
test eax, eax
jne 0x1055067
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x34]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x3c]
push 0x100c6b8
push eax
call ebp
add esp, 0x10
push 0
lea eax, [esp + 0x38]
push eax
call edi
test eax, eax
jne 0x10550a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x34]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x3c]
push 0x100c6a4
push eax
call ebp
add esp, 0x10
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x38]
push eax
call edi
test eax, eax
jne 0x10550f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x20]
push eax
push 4
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x10552ed
lea eax, [esp + 0x34]
push eax
push 0x100c688
lea eax, [esp + 0x248]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x244]
push eax
call edi
test eax, eax
jne 0x1055153
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x20]
push eax
push 4
lea eax, [esp + 0x248]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x10552ed
lea eax, [esp + 0x240]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x248]
push 0x1004284
push eax
call ebp
add esp, 0x10
lea eax, [esp + 0x248]
push eax
call fcn.010207f0
lea eax, [esp + 0x44c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x454]
push 0x100c6d0
push eax
call ebp
add esp, 0x10
push 0
lea eax, [esp + 0x450]
push eax
call edi
test eax, eax
jne 0x10551c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x44c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x454]
push 0x100c6b8
push eax
call ebp
add esp, 0x10
push 0
lea eax, [esp + 0x450]
push eax
call edi
test eax, eax
jne 0x1055205
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x44c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x454]
push 0x100c6a4
push eax
call ebp
add esp, 0x10
push 0
lea eax, [esp + 0x450]
push eax
call edi
test eax, eax
jne 0x1055247
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x44c]
push eax
push 0x100c678
lea eax, [esp + 0x660]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
push 0
lea eax, [esp + 0x65c]
push eax
call edi
test eax, eax
jne 0x1055283
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10552ed
lea eax, [esp + 0x658]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [esp + 0x660]
push 0x1004284
push eax
call ebp
add esp, 0x10
lea eax, [esp + 0x658]
push eax
call fcn.010207b6
lea eax, [esp + 0x44c]
push eax
push 0x100c668
lea eax, [esp + 0x660]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
push 0
lea eax, [esp + 0x65c]
push eax
call edi
test eax, eax
jne 0x1055347
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1055347
lea eax, [esp + 0x14]
push eax
call fcn.010546f9
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_3
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x14]
push 0x80f6
xor ebx, ebx
push eax
mov dword [esp + 0xa84], ebx
call sub.MFC42u.DLL_CString::Format_1
add esp, 0xc
push 1
push ebx
push 0x30
push ebx
push dword [esp + 0x20]
push 0xfa6
call fcn.0104f8aa
or dword [esp + 0xa78], 0xffffffff
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString
jmp 0x1055384
lea eax, [esp + 0x658]
push eax
call ebx
sub esi, eax
push esi
lea eax, [esp + 0x660]
push 0x1004284
push eax
call ebp
add esp, 0x10
lea eax, [esp + 0x658]
push eax
call fcn.010207d0
lea eax, [esp + 0x14]
push eax
call fcn.010546f9
jmp 0x1055536
xor ebx, ebx
lea eax, [esp + 0x34]
push eax
push ebx
push ebx
push 0x1c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x10553bb
lea eax, [esp + 0x34]
push 0x10053e0
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
lea eax, [esp + 0x38]
push eax
push 0x100c6e8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, dword [sym.imp.msvcrt.dll_wcscat]
lea eax, [esp + 0x34]
push 0x100c6d0
push eax
call esi
pop ecx
pop ecx
push ebx
lea eax, [esp + 0x38]
push eax
call edi
test eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x10553f2
call ebp
mov ebx, 0xb7
cmp eax, ebx
jne 0x1055536
jmp 0x10553f7
mov ebx, 0xb7
lea eax, [esp + 0x34]
push 0x100c6b8
push eax
call esi
pop ecx
pop ecx
push 0
lea eax, [esp + 0x38]
push eax
call edi
test eax, eax
jne 0x105541c
call ebp
cmp eax, ebx
jne 0x1055536
lea eax, [esp + 0x34]
push 0x100c6a4
push eax
call esi
pop ecx
pop ecx
push 0
lea eax, [esp + 0x38]
push eax
call edi
test eax, eax
jne 0x1055441
call ebp
cmp eax, ebx
jne 0x1055536
mov ebx, dword [sym.imp.msvcrt.dll_swprintf]
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x244]
push 0x100c688
push eax
call ebx
add esp, 0xc
push 0
lea eax, [esp + 0x244]
push eax
call edi
test eax, eax
jne 0x105547b
call ebp
cmp eax, 0xb7
jne 0x1055536
mov ebp, 0x1004284
lea eax, [esp + 0x240]
push ebp
push eax
call esi
pop ecx
pop ecx
lea eax, [esp + 0x240]
push eax
call fcn.010207f0
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x244]
push 0x100c678
push eax
call ebx
add esp, 0xc
push 0
lea eax, [esp + 0x244]
push eax
call edi
test eax, eax
jne 0x10554ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1055536
lea eax, [esp + 0x240]
push ebp
push eax
call esi
pop ecx
pop ecx
lea eax, [esp + 0x240]
push eax
call fcn.010207b6
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x244]
push 0x100c668
push eax
call ebx
add esp, 0xc
push 0
lea eax, [esp + 0x244]
push eax
call edi
test eax, eax
jne 0x105551c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1055536
lea eax, [esp + 0x240]
push ebp
push eax
call esi
pop ecx
pop ecx
lea eax, [esp + 0x240]
push eax
call fcn.010207d0
mov ecx, dword [esp + 0xa70]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
leave
ret