Function at 0x406b4c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
lea eax, [ebp - 0xc]
xor ebx, ebx
push eax
push SysReAllocString
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
or edi, 0xffffffff
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call fcn.004031cb
mov esi, eax
test esi, esi
jns 0x406b9b
push str.Failed_to_get_length_of_path_to_prefix.
push esi
push 0x20
push 5
push 0x2d5
push str.d:_awixwix_srclibsdutilwixtoolset.dutilpathutil.cpp
call fcn.004012a1
add esp, 0x18
jmp 0x406d75
cmp dword [ebp - 0xc], 0xf6
ja 0x406c23
mov edi, dword [ebp + 0x14]
push 0x104
push edi
call fcn.00403471
mov esi, eax
test esi, esi
jns 0x406bc9
push str.Failed_to_allocate_buffer_for_GetTempFileNameW.
push esi
push 0x20
push 5
push 0x2da
jmp 0x406b89
push dword [edi]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x406d75
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x406bf9
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x406c00
mov esi, 0x80004005
push esi
mov ebx, 0x2de
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutilpathutil.cpp
push ebx
push edi
call fcn.0040129e
push str.Failed_to_create_new_temp_file_name.
push esi
push 0x20
push 5
push ebx
push edi
jmp 0x406b8e
cmp edi, 0xffffffff
jne 0x406d3a
movzx eax, bx
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 8]
push str._ls_x.TMP
push eax
call fcn.00403578
mov esi, eax
add esp, 0x10
test esi, esi
js 0x406d26
lea eax, [ebp - 4]
xor edi, edi
push eax
push edi
push dword [ebp - 8]
push edi
push dword [ebp + 8]
call fcn.00405d90
mov esi, eax
test esi, esi
js 0x406d12
push edi
push edi
push 1
push edi
push 5
push 0x40000000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406ca7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x406c99
movzx eax, ax
or eax, 0x80070000
lea esi, [eax + 0x7ff8ffb0]
neg esi
sbb esi, esi
and esi, eax
jl 0x406cf1
inc ebx
mov eax, 0xffff
cmp bx, ax
jb 0x406c23
cmp edi, 0xffffffff
jne 0x406d3a
push 0x80070050
mov esi, 0x2ff
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutilpathutil.cpp
push esi
push edi
call fcn.0040129e
push str.Failed_to_create_temp_file.
mov ebx, 0x80070050
push ebx
push 0x20
push 5
push esi
push edi
call fcn.004012a1
add esp, 0x18
mov esi, ebx
jmp 0x406d75
push dword [ebp - 4]
push str.Failed_to_create_file:__ls
push esi
push 0x20
push 5
push 0x2f7
push str.d:_awixwix_srclibsdutilwixtoolset.dutilpathutil.cpp
call fcn.004012a1
add esp, 0x1c
jmp 0x406d75
push str.Failed_to_allocate_temp_file_name.
push esi
push 0x20
push 5
push 0x2ec
jmp 0x406b89
push str.Failed_to_allocate_memory_for_file_template.
push esi
push 0x20
push 5
push 0x2e9
jmp 0x406b89
push 0
push dword [ebp - 4]
push dword [ebp + 0x14]
call fcn.00403958
mov esi, eax
test esi, esi
jns 0x406d69
push str.Failed_to_copy_temp_file_string.
push esi
push 0x20
push 5
push 0x303
push str.d:_awixwix_srclibsdutilwixtoolset.dutilpathutil.cpp
call fcn.004012a1
add esp, 0x18
cmp edi, 0xffffffff
je 0x406d75
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0
je 0x406d83
push dword [ebp - 8]
call fcn.00404128
cmp dword [ebp - 4], 0
je 0x406d91
push dword [ebp - 4]
call fcn.00404128
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10