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

Disassembly:
mov eax, 0x4004
call fcn.0040bdd0
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.00408bb0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x407768
push str.LOADER:_failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.00401ff0
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba93
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.00414959
add esp, 4
test esi, esi
jne 0x4077af
push str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.00401ff0
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba93
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00408a60
add esp, 4
test eax, eax
lea eax, [esp + 8]
je 0x407873
push eax
push str.LOADER:_expanded_runtime_tmpdir_is_a_drive_root:__ls_n
call fcn.00401e90
add esp, 8
cmp word [esp + 0xc], 0x5c
je 0x407813
lea eax, [esp + 8]
push eax
push str.LOADER:_appending_backslash_to_the_given_drive_root__ls_n
call fcn.00401e90
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 0x407800
mov eax, dword [0x42c7cc]
mov dword [edi], eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jg 0x40784f
push eax
lea eax, [esp + 0xc]
push eax
push 0x42c7d0
call fcn.00401ff0
add esp, 0xc
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba93
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00416e83
add esp, 4
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba93
add esp, 0x4004
ret
push 0x1000
push eax
push 0
call fcn.00417314
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4078af
push str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00401ff0
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba93
add esp, 0x4004
ret
push esi
push str.LOADER:_absolute_runtime_tmpdir_is__ls_n
call fcn.00401e90
push 0x5c
push esi
call fcn.0040d1b7
mov edi, eax
add esp, 0x10
test edi, edi
je 0x407928
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.00401d50
lea eax, [esp + 0x201c]
push eax
push str.LOADER:_creating_runtime_tmpdir_path_component:__ls_n
call fcn.00401e90
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.0040d1b7
mov edi, eax
add esp, 8
test edi, edi
jne 0x4078d0
push esi
push str.LOADER:_creating_runtime_tmpdir_path:__ls_n
call fcn.00401e90
add esp, 8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x407989
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407989
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.004022f0
push esi
call fcn.00414959
add esp, 0x14
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040ba93
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4008]
mov eax, esi
pop esi
pop edi
xor ecx, esp
call fcn.0040ba93
add esp, 0x4004
ret