Function at 0x4595f0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4b31f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc50
push ebx
push ebp
push esi
mov dword [esp + 0x20], ecx
push edi
xor ebx, ebx
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x4a]
mov word [esp + 0x48], bx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x48]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebp, dword [sym.imp.MSVCRT.dll_wcslen]
lea ecx, [esp + 0x48]
push ecx
call ebp
add esp, 4
lea edx, [esp + 0x48]
mov ecx, 0x4d92b0
push eax
push edx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov ecx, dword [0x4dada4]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x48]
push 0x104
push eax
push ecx
mov word [esp + 0x54], bx
call esi
lea edx, [esp + 0x48]
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
cmp eax, ebx
je 0x4596a6
mov word [eax], bx
cmp word [esp + 0x48], bx
jne 0x4596ad
push 0x4c901c
call ebp
add esp, 4
push eax
push 0x4c901c
jmp 0x4596bd
mov word [esp + 0x48], bx
jmp 0x459694
lea eax, [esp + 0x48]
push eax
call ebp
add esp, 4
lea ecx, [esp + 0x48]
push eax
push ecx
mov ecx, 0x4d8ff8
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x256]
mov word [esp + 0x254], bx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x254]
push 0x104
push eax
push ebx
mov dword [esp + 0xc74], ebx
call esi
lea ecx, [esp + 0x254]
xor edi, edi
push ecx
call ebp
add esp, 4
test eax, eax
jbe 0x45974c
mov ebx, dword [sym.imp.MSVCRT.dll_tolower]
lea esi, [esp + 0x254]
xor edx, edx
mov dx, word [esi]
push edx
call ebx
mov word [esi], ax
lea eax, [esp + 0x258]
push eax
inc edi
add esi, 2
call ebp
add esp, 8
cmp edi, eax
jb 0x45972a
xor ebx, ebx
lea ecx, [esp + 0x254]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
cmp eax, ebx
je 0x459896
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x18]
lea edi, [eax + 2]
mov byte [esp + 0x18], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push edi
call ebp
add esp, 4
mov esi, eax
lea ecx, [esp + 0x14]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x4597b0
mov eax, dword [esp + 0x18]
push esi
push edi
push eax
call fcn.00412590
add esp, 0xc
lea ecx, [esp + 0x14]
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
push 0x4c901c
mov byte [esp + 0xc6c], 1
call ebp
add esp, 4
lea ecx, [esp + 0x14]
push eax
push ebx
push 0x4c901c
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::find_unsigned_short_int_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
cmp eax, dword [ecx]
je 0x459882
push eax
lea edx, [esp + 0x3c]
push ebx
push edx
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::substr_unsigned_int__unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [esp + 0xc68], 2
mov edx, dword [ecx]
lea ecx, [esp + 0x14]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0xc6c], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [esp + 0x14]
push 0x4cd670
push eax
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator__class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__]
add esp, 8
test al, al
je 0x459882
lea ecx, [esp + 0x14]
lea edx, [esp + 0x38]
push ecx
push 0x4cd66c
push edx
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_unsigned_short_int_const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0xc
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [esp + 0xc68], 3
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0xc6c], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0xc6c], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [esp + 0x2c]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
cmp ecx, ebx
jne 0x4598a6
mov ecx, edx
mov eax, dword [0x4d8ffc]
cmp eax, ebx
jne 0x4598b1
mov eax, edx
push ecx
push eax
lea eax, [esp + 0x50]
push str._sLiveUpdateLogP2SP_s.log
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ecx, [esp + 0x48]
push ecx
mov ecx, 0x4d8db8
call fcn.0045c560
call fcn.00462540
cmp eax, 4
jae 0x4598e4
mov dword [0x4d8dbc], eax
lea edx, [esp + 0x460]
push 0x800
push edx
push str.360P2SP.dll
mov dword [0x4d8db8], 1
call fcn.00462b30
lea eax, [esp + 0x46c]
push eax
call ebp
add esp, 0x10
mov ecx, 0x4d8f90
mov esi, eax
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::max_size_void_const]
cmp eax, esi
jae 0x459929
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [0x4d8f94]
cmp eax, ebx
je 0x459955
mov cl, byte [eax - 1]
test cl, cl
je 0x459955
cmp cl, 0xff
je 0x459955
cmp esi, ebx
jne 0x459984
dec cl
push ebx
mov byte [eax - 1], cl
mov ecx, 0x4d8f90
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x4599b7
cmp esi, ebx
jne 0x459968
push 1
mov ecx, 0x4d8f90
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
jmp 0x4599b7
mov ecx, dword [0x4d8f9c]
cmp ecx, 0x1f
ja 0x459977
cmp ecx, esi
jae 0x459995
push 1
mov ecx, 0x4d8f90
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push esi
mov ecx, 0x4d8f90
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Copy_unsigned_int_]
mov eax, dword [0x4d8f94]
lea ecx, [esp + 0x460]
push esi
push ecx
push eax
call fcn.00412590
mov edx, dword [0x4d8f94]
mov dword [0x4d8f98], esi
add esp, 0xc
mov word [edx + esi*2], bx
mov ecx, dword [esp + 0x24]
call fcn.00459a20
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
cmp ecx, ebx
pop ebx
je 0x4599fd
mov al, byte [ecx - 1]
test al, al
je 0x4599f1
cmp al, 0xff
je 0x4599f1
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0xc50]
mov dword fs:[0], ecx
add esp, 0xc5c
ret
add ecx, 0xfffffffe
push ecx
call fcn.0043b3d0
add esp, 4
mov ecx, dword [esp + 0xc50]
mov dword fs:[0], ecx
add esp, 0xc5c
ret