Function at 0x408060
Capabilities:
Create directory
Get disk information
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.0040c730
mov eax, dword [0x43a040]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push edi
push 0
push 0
push eax
call fcn.00409510
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4080b8
push str.LOADER:_failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.00402710
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret
push esi
push 0x1000
lea eax, [esp + 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov esi, eax
call fcn.00414200
add esp, 4
test esi, esi
jne 0x4080ff
push str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.00402710
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.004093c0
add esp, 4
test eax, eax
lea eax, [esp + 8]
je 0x4081c3
push eax
push str.LOADER:_expanded_runtime_tmpdir_is_a_drive_root:__ls_n
call fcn.004025b0
add esp, 8
cmp word [esp + 0xc], 0x5c
je 0x408163
lea eax, [esp + 8]
push eax
push str.LOADER:_appending_backslash_to_the_given_drive_root__ls_n
call fcn.004025b0
lea edi, [esp + 0x10]
add esp, 8
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x408150
mov eax, dword [0x42c8b4]
mov dword [edi], eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jg 0x40819f
push eax
lea eax, [esp + 0xc]
push eax
push 0x42c8b8
call fcn.00402710
add esp, 0xc
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00416794
add esp, 4
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret
push 0x1000
push eax
push 0
call fcn.00416c3c
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4081ff
push str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402710
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret
push esi
push str.LOADER:_absolute_runtime_tmpdir_is__ls_n
call fcn.004025b0
push 0x5c
push esi
call fcn.0040db37
mov edi, eax
add esp, 0x10
test edi, edi
je 0x408278
nop dword [eax + eax]
mov ecx, edi
lea eax, [esp + 0x2008]
push esi
sub ecx, esi
sar ecx, 1
push ecx
push str._.s
push 0x1000
push eax
call fcn.00402490
lea eax, [esp + 0x201c]
push eax
push str.LOADER:_creating_runtime_tmpdir_path_component:__ls_n
call fcn.004025b0
add esp, 0x1c
lea eax, [esp + 0x2008]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [edi + 2]
push 0x5c
push eax
call fcn.0040db37
mov edi, eax
add esp, 8
test edi, edi
jne 0x408220
push esi
push str.LOADER:_creating_runtime_tmpdir_path:__ls_n
call fcn.004025b0
add esp, 8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4082d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4082d9
push esi
push str.LOADER:_failed_to_create_runtime_tmpdir_path__ls__n
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateDirectory
call fcn.00402a40
push esi
call fcn.00414200
add esp, 0x14
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4008]
mov eax, esi
pop esi
pop edi
xor ecx, esp
call fcn.0040c3f3
add esp, 0x4004
ret