Function at 0x401590
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405b77
mov eax, dword fs:[0]
push eax
sub esp, 0x5ac
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x424], edx
mov dword [ebp - 0x440], ecx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x5a8], 0
movups xmm0, xmmword [str.compress.omni]
mov dword [ebp - 0x5a4], eax
mov eax, dword [0x406368]
push 0x1ec
mov dword [ebp - 0x200], eax
lea eax, [ebp - 0x1fc]
movups xmmword [ebp - 0x218], xmm0
push 0
movq xmm0, qword [0x406360]
push eax
movq qword [ebp - 0x208], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x104
ja 0x4019a9
test eax, eax
je 0x4019a9
push 0xb0
lea eax, [ebp - 0x4f0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x4f0], 0x4063c0
lea ecx, [ebp - 0x488]
mov dword [ebp - 0x4e0], 0x406408
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
push 0
lea eax, [ebp - 0x4d8]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x4f0]
mov dword [ebp - 0x5a8], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t____]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x4f0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x4f0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4f4], eax
lea ecx, [ebp - 0x4d8]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
mov dword [ebp - method.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x4a0], 0
mov dword [ebp - 0x49c], 0
lea edx, [ebp - 0x420]
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x4e0]
call fcn.00404050
lea edx, [ebp - 0x218]
mov ecx, eax
call fcn.00404050
mov byte [ebp - 4], 3
xor eax, eax
mov edx, dword [ebp - 0x49c]
xorps xmm0, xmm0
movups xmmword [ebp - 0x43c], xmm0
mov word [ebp - 0x43c], ax
mov eax, edx
and al, 0x22
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x428], 7
mov dword [ebp - 0x5a8], 5
movq qword [ebp - 0x5b8], xmm0
cmp al, 2
je 0x40178a
mov eax, dword [ebp - 0x4b8]
mov ecx, dword [eax]
test ecx, ecx
je 0x40178a
mov eax, dword [ebp - 0x4c8]
cmp ecx, dword [ebp - 0x4a0]
cmovb ecx, dword [ebp - 0x4a0]
mov edx, dword [eax]
jmp 0x4017ae
test dl, 4
jne 0x4017fd
mov eax, dword [ebp - 0x4bc]
mov ecx, dword [eax]
test ecx, ecx
je 0x4017fd
mov eax, dword [ebp - 0x4cc]
mov edx, dword [eax]
mov eax, dword [ebp - 0x4ac]
mov eax, dword [eax]
lea ecx, [ecx + eax*2]
sub ecx, edx
mov eax, edx
sar ecx, 1
test eax, eax
je 0x4017fd
cmp ecx, 7
ja 0x4017e3
lea esi, [ecx + ecx]
mov dword [ebp - 0x42c], ecx
push esi
push edx
lea eax, [ebp - 0x43c]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x43c], ax
jmp 0x4017fd
push edx
mov byte [ebp - 0x5ac], 0
push dword [ebp - 0x5ac]
push ecx
lea ecx, [ebp - 0x43c]
call fcn.00404530
push 0xb0
lea eax, [ebp - 0x5a0]
mov dword [ebp - 4], 4
push 0
push eax
call sub.VCRUNTIME140.dll_memset
cmp dword [ebp - 0x428], 7
lea eax, [ebp - 0x43c]
lea ecx, [ebp - 0x5a0]
cmova eax, dword [ebp - 0x43c]
push eax
call fcn.00403e30
mov eax, dword [ebp - 0x5a0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x5a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x5a4], eax
push 0
push 4
lea eax, [ebp - 0x440]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x5a0]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
push 0
push 4
lea eax, [ebp - 0x5a4]
push eax
lea ecx, [ebp - 0x5a0]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
push 0
push 4
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x5a0]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
xor esi, esi
cmp dword [ebp - 0x424], esi
jbe 0x4018ce
push 0
push 4
push edi
lea ecx, [ebp - 0x5a0]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
inc esi
add edi, 4
cmp esi, dword [ebp - 0x424]
jb 0x4018b1
lea ecx, [ebp - 0x59c]
call fcn.00403da0
test eax, eax
jne 0x4018f5
push eax
mov eax, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x5a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0x5a0]
call fcn.00401a10
mov ecx, dword [ebp - 0x428]
cmp ecx, 7
jbe 0x401942
mov edx, dword [ebp - 0x43c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401938
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401938
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404d18
add esp, 8
xor eax, eax
mov dword [ebp - 0x42c], 0
mov word [ebp - 0x43c], ax
mov eax, dword [ebp - 0x4f0]
mov dword [ebp - 0x428], 7
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x4f0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x4f4], eax
lea ecx, [ebp - 0x4d8]
call fcn.00403070
lea ecx, [ebp - 0x4d0]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x488]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404cda
mov esp, ebp
pop ebp
ret