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

Disassembly:
mov eax, 0x4004
call fcn.0040bd80
mov eax, dword [0x438040]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push edi
push 0
push 0
push eax
call fcn.00408b50
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x407be8
push str.LOADER:_failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.00402700
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba43
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.0041340e
add esp, 4
test esi, esi
jne 0x407c2f
push str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.00402700
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba43
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00408a00
add esp, 4
test eax, eax
lea eax, [esp + 8]
je 0x407cf3
push eax
push str.LOADER:_expanded_runtime_tmpdir_is_a_drive_root:__ls_n
call fcn.004025a0
add esp, 8
cmp word [esp + 0xc], 0x5c
je 0x407c93
lea eax, [esp + 8]
push eax
push str.LOADER:_appending_backslash_to_the_given_drive_root__ls_n
call fcn.004025a0
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 0x407c80
mov eax, dword [0x42b674]
mov dword [edi], eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jg 0x407ccf
push eax
lea eax, [esp + 0xc]
push eax
push 0x42b678
call fcn.00402700
add esp, 0xc
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba43
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00415933
add esp, 4
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba43
add esp, 0x4004
ret
push 0x1000
push eax
push 0
call fcn.00415dc4
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x407d2f
push str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402700
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba43
add esp, 0x4004
ret
push esi
push str.LOADER:_absolute_runtime_tmpdir_is__ls_n
call fcn.004025a0
push 0x5c
push esi
call fcn.0040d097
mov edi, eax
add esp, 0x10
test edi, edi
je 0x407da8
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.00402480
lea eax, [esp + 0x201c]
push eax
push str.LOADER:_creating_runtime_tmpdir_path_component:__ls_n
call fcn.004025a0
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.0040d097
mov edi, eax
add esp, 8
test edi, edi
jne 0x407d50
push esi
push str.LOADER:_creating_runtime_tmpdir_path:__ls_n
call fcn.004025a0
add esp, 8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x407e09
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407e09
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.00402a30
push esi
call fcn.0041340e
add esp, 0x14
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba43
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4008]
mov eax, esi
pop esi
pop edi
xor ecx, esp
call fcn.0040ba43
add esp, 0x4004
ret