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

Disassembly:
mov eax, 0x4004
call fcn.0040c5f0
mov eax, dword [0x439040]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push edi
push 0
push 0
push eax
call fcn.004093c0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x408068
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.0040c2b3
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.00413d6e
add esp, 4
test esi, esi
jne 0x4080af
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.0040c2b3
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00409270
add esp, 4
test eax, eax
lea eax, [esp + 8]
je 0x408173
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 0x408113
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 0x408100
mov eax, dword [0x42b854]
mov dword [edi], eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jg 0x40814f
push eax
lea eax, [esp + 0xc]
push eax
push 0x42b858
call fcn.00402710
add esp, 0xc
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c2b3
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.00416293
add esp, 4
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c2b3
add esp, 0x4004
ret
push 0x1000
push eax
push 0
call fcn.00416724
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4081af
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.0040c2b3
add esp, 0x4004
ret
push esi
push str.LOADER:_absolute_runtime_tmpdir_is__ls_n
call fcn.004025b0
push 0x5c
push esi
call fcn.0040d9f7
mov edi, eax
add esp, 0x10
test edi, edi
je 0x408228
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.0040d9f7
mov edi, eax
add esp, 8
test edi, edi
jne 0x4081d0
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 0x408289
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x408289
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.00413d6e
add esp, 0x14
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040c2b3
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4008]
mov eax, esi
pop esi
pop edi
xor ecx, esp
call fcn.0040c2b3
add esp, 0x4004
ret