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

Disassembly:
mov eax, 0x10d5d6b
call fcn.0107a498
sub esp, 0xa64
mov eax, dword [0x10e607c]
push ebx
mov dword [ebp - 0x10], eax
xor eax, eax
push esi
push edi
mov word [ebp - 0x14], ax
mov word [ebp - 0x42c], ax
mov word [ebp - 0x220], ax
mov word [ebp - 0x638], ax
mov word [ebp - 0x844], ax
call fcn.01028248
test eax, eax
mov edi, dword [sym.imp.msvcrt.dll_wcsncat]
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
mov esi, 0x104
jne 0x105d045
call fcn.01028258
test eax, eax
je 0x105d490
and word [ebp - 0x21c], 0
push esi
lea eax, [ebp - 0x21c]
push 0x1005efc
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0xa4c]
push eax
xor eax, eax
push eax
push eax
push 0x23
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jge 0x105d0a4
push esi
lea eax, [ebp - 0xa4c]
push 0x100cc88
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
push esi
lea eax, [ebp - 0xa4c]
push eax
push 0x100cc68
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0x21c]
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x634]
push eax
xor eax, eax
push eax
push eax
push 0x1c
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jge 0x105d106
push esi
lea eax, [ebp - 0x634]
push 0x1005420
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
push esi
lea eax, [ebp - 0x634]
push eax
push 0x100cc68
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
call fcn.0109e024
call fcn.0109e034
and dword [ebp - 0xa54], 0
lea eax, [ebp - 0xa70]
mov dword [ebp - 0xa58], eax
push 0
lea eax, [ebp - 0xa5c]
push eax
mov dword [ebp - 0xa5c], 0xc
call fcn.0105c581
test eax, eax
jl 0x105d490
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x21c]
push 0x100cc50
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d186
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x21c]
push 0x100cc38
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d1c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x21c]
push 0x100cc24
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0xa5c]
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d22f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0xa70]
push eax
push 4
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x105d434
lea eax, [ebp - 0x21c]
push eax
push 0x100cc08
lea eax, [ebp - 0x428]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
lea eax, [ebp - 0xa5c]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d293
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0xa70]
push eax
push 4
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x105d434
lea eax, [ebp - 0x428]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x428]
push 0x1003824
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
call fcn.01022de2
lea eax, [ebp - 0x634]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x634]
push 0x100cc50
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x634]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d301
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0x634]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x634]
push 0x100cc38
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x634]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d344
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0x634]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x634]
push 0x100cc24
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x634]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d387
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0x634]
push eax
push 0x100cbf8
lea eax, [ebp - 0x840]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
push 0
lea eax, [ebp - 0x840]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d3c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d434
lea eax, [ebp - 0x840]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x840]
push 0x1003824
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x840]
push eax
call fcn.01022d8f
lea eax, [ebp - 0x634]
push eax
push 0x100cbe8
lea eax, [ebp - 0x840]
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x10
push 0
lea eax, [ebp - 0x840]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d734
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x105d734
lea eax, [ebp - 0xa5c]
push eax
call fcn.0105c70c
lea ecx, [ebp - 0xa50]
call sub.MFC42u.dll_CString::CString_2
and dword [ebp - 4], 0
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0xa50]
push 0x80f6
push eax
call sub.MFC42u.dll_CString::Format_1
add esp, 0xc
xor eax, eax
push eax
push eax
push 0x30
push eax
push dword [ebp - 0xa50]
push 0xfa6
call fcn.01056de7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa50]
call sub.MFC42u.dll_CString::CString
lea eax, [ebp - 0x21c]
push eax
xor eax, eax
push eax
push eax
push 0x1c
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jge 0x105d4d1
push esi
lea eax, [ebp - 0x21c]
push 0x1005420
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
push esi
lea eax, [ebp - 0x21c]
push eax
push 0x100cc68
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x21c]
push 0x100cc50
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d514
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d71d
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x21c]
push 0x100cc38
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d557
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d71d
lea eax, [ebp - 0x21c]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x21c]
push 0x100cc24
push eax
call edi
add esp, 0x10
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d59a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d71d
push esi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
lea eax, [ebp - 0x428]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x428]
push 0x100cbd0
push eax
call edi
add esp, 0x1c
push 0
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d5f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d71d
lea eax, [ebp - 0x428]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x428]
push 0x1003824
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x428]
push eax
call fcn.01022de2
push esi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
lea eax, [ebp - 0x428]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x428]
push 0x100cbc4
push eax
call edi
add esp, 0x1c
push 0
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d675
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d71d
lea eax, [ebp - 0x428]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x428]
push 0x1003824
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x428]
push eax
call fcn.01022d8f
push esi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
lea eax, [ebp - 0x428]
push eax
call ebx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x428]
push 0x100cbb8
push eax
call edi
add esp, 0x1c
push 0
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x105d6f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x105d71d
lea eax, [ebp - 0x428]
push eax
call ebx
sub esi, eax
push esi
lea eax, [ebp - 0x428]
push 0x1003824
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x428]
push eax
call fcn.01022db3
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.01078836
leave
ret
lea eax, [ebp - 0x840]
push eax
call ebx
sub esi, eax
push esi
lea eax, [ebp - 0x840]
push 0x1003824
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x840]
push eax
call fcn.01022db3
lea eax, [ebp - 0xa5c]
push eax
call fcn.0105c70c
jmp 0x105d71d