Function at 0x4046d0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x504396
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x330
push ebx
push esi
push edi
xor edi, edi
push 0x76
lea eax, [esp + 0x56]
push edi
push eax
mov word [esp + 0x5c], di
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x14]
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::constructor_void_]
lea ecx, [esp + 0x18]
mov dword [esp + 0x344], edi
call fcn.00404c00
push 0x206
lea ecx, [esp + 0x136]
push edi
mov byte [esp + 0x34c], 1
push ecx
mov word [esp + 0x13c], di
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0xc8]
call fcn.00402ae0
mov esi, dword [ebp + 8]
lea ebx, [esi + 0x34]
mov ecx, ebx
mov byte [esp + 0x344], 2
call fcn.00406620
push 1
push edi
push str.commonres:SKinMgrSkins4.5__dTopicMaps__d.gft
lea edx, [esp + 0x5c]
call fcn.00407af0
add esp, 0xc
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], edi
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t__]
cmp dword [esi + 0x10], edi
mov esi, dword [reloc.Common.dll___4CTXStringW__QAEAAV0_PB_W_Z]
je 0x4047f2
push edi
push str.SkinMiniPortal_Skin
lea eax, [esp + 0x1c]
push str._s__d
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::Format_wchar_t_const__]
add esp, 0x10
lea ecx, [esp + 0x14]
call dword [sym.imp.Common.dll_public:_wchar_t____thiscall_CTXStringW::GetBSTR_void_const]
push eax
call fcn.00408c00
add esp, 4
push eax
lea ecx, [esp + 0x2c]
call esi
push edi
push str.platformres:SkinMgrSkinMiniPortalShadingUnit_d.png
lea edx, [esp + 0x58]
call fcn.00407af0
add esp, 8
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x34]
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t__]
lea edx, [esp + 0x18]
push edx
mov ecx, ebx
call fcn.00405bd0
mov ebx, 1
push ebx
push 0x1a
lea eax, [esp + 0x138]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x526f48
lea ecx, [esp + 0x134]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x130]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404ae3
push ecx
mov eax, esp
lea ecx, [esp + 0x134]
mov dword [eax], ecx
lea ecx, [esp + 0xcc]
mov dword [esp + 0x14], esp
call fcn.004efc50
movzx eax, al
cmp eax, edi
je 0x404ae3
push ecx
mov eax, esp
lea ecx, [esp + 0xcc]
mov dword [esp + 0x14], esp
mov dword [eax], str.skin
call fcn.004ebd30
movzx eax, al
cmp eax, edi
je 0x404ae3
lea ecx, [esp + 0xc8]
call fcn.004eb230
lea edx, [esp + 0x130]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov edi, dword [sym.imp.Common.dll_public:_wchar_t_const____thiscall_CTXStringW::GetString_void_const]
lea esp, [esp]
push ecx
mov eax, esp
lea ecx, [esp + 0xcc]
mov dword [esp + 0x14], esp
mov dword [eax], str.theme
call fcn.004ebd30
test al, al
je 0x404acd
push ecx
mov eax, esp
mov dword [eax], str.InfoType
lea eax, [esp + 0x38]
mov dword [esp + 0x14], esp
push eax
lea ecx, [esp + 0xd0]
call fcn.00402ab0
cmp dword [eax + 0x18], 8
jb 0x4048fa
mov eax, dword [eax + 4]
jmp 0x4048fd
add eax, 4
push eax
call dword [sym.imp.MSVCR80.dll__wtoi]
add esp, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push ecx
mov eax, esp
lea ecx, [esp + 0x38]
mov dword [esp + 0x14], esp
push ecx
lea ecx, [esp + 0xd0]
mov dword [eax], str.SkinInfo
call fcn.00402ab0
mov byte [esp + 0x344], 3
cmp dword [eax + 0x18], 8
jb 0x404946
mov eax, dword [eax + 4]
jmp 0x404949
add eax, 4
push eax
lea ecx, [esp + 0x20]
call esi
lea ecx, [esp + 0x34]
mov byte [esp + 0x344], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push ecx
mov eax, esp
lea edx, [esp + 0x38]
mov dword [esp + 0x14], esp
push edx
lea ecx, [esp + 0xd0]
mov dword [eax], str.SkinName
call fcn.00402ab0
mov byte [esp + 0x344], 4
cmp dword [eax + 0x18], 8
jb 0x404993
mov eax, dword [eax + 4]
jmp 0x404996
add eax, 4
push eax
lea ecx, [esp + 0x24]
call esi
lea ecx, [esp + 0x34]
mov byte [esp + 0x344], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push ecx
mov eax, esp
mov dword [eax], str.PreviewName
lea eax, [esp + 0x38]
mov dword [esp + 0x14], esp
push eax
lea ecx, [esp + 0xd0]
call fcn.00402ab0
mov byte [esp + 0x344], 5
cmp dword [eax + 0x18], 8
jb 0x4049e0
mov eax, dword [eax + 4]
jmp 0x4049e3
add eax, 4
push eax
lea ecx, [esp + 0x28]
call esi
lea ecx, [esp + 0x34]
mov byte [esp + 0x344], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x18], 1
jne 0x404a11
push str.customize
push 0x3a
lea ecx, [esp + 0x58]
push ecx
jmp 0x404a1d
push str.recommend
push 0x3a
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
add esp, 0xc
lea ecx, [esp + 0x20]
call edi
push eax
lea ecx, [esp + 0x20]
call edi
push eax
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x13c]
push ecx
push 0x52698c
lea edx, [esp + 0x40]
push str._s_s_s_s_s
push edx
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::Format_wchar_t_const__]
add esp, 0x1c
lea ecx, [esp + 0x2c]
call edi
push eax
call dword [sym.imp.Common.dll_int___cdecl_FS::IsFileExist_wchar_t_const__]
add esp, 4
test eax, eax
je 0x4048b0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
je 0x404ab8
push 0x527038
lea ecx, [esp + 0x2c]
call esi
lea ecx, [esp + 0x24]
call edi
push eax
lea ecx, [esp + 0x20]
call edi
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x13c]
push edx
push 0x52698c
lea eax, [esp + 0x44]
push str._s_s_s_s_s
push eax
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::Format_wchar_t_const__]
add esp, 0x1c
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x34
call fcn.00405bd0
jmp 0x4048b0
lea ecx, [esp + 0x1c]
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::Empty_void_]
lea ecx, [esp + 0xc8]
call fcn.004eb250
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x44]
cmp eax, 8
jae 0x404ba4
mov edi, 8
sub edi, eax
lea esp, [esp]
push 1
push ebx
push str.commonres:SKinMgrSkins4.5__dTopicMaps__d.png
lea edx, [esp + 0x5c]
call fcn.00407af0
add esp, 0xc
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], 0
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t__]
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x10], 0
je 0x404b88
push ebx
push str.SkinMiniPortal_Skin
lea edx, [esp + 0x1c]
push str._s__d
push edx
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::Format_wchar_t_const__]
add esp, 0x10
lea ecx, [esp + 0x14]
call dword [sym.imp.Common.dll_public:_wchar_t____thiscall_CTXStringW::GetBSTR_void_const]
push eax
call fcn.00408c00
add esp, 4
push eax
lea ecx, [esp + 0x2c]
call esi
push ebx
push str.platformres:SkinMgrSkinMiniPortalShadingUnit_d.png
lea edx, [esp + 0x58]
call fcn.00407af0
add esp, 8
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x34]
call dword [sym.imp.Common.dll_public:_class_CTXStringW____thiscall_CTXStringW::operator_wchar_t__]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x34
call fcn.00405bd0
add ebx, 1
sub edi, 1
jne 0x404b00
lea ecx, [esp + 0xc8]
mov byte [esp + 0x344], 1
call fcn.004edb80
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 0
call fcn.00404c70
lea ecx, [esp + 0x14]
mov dword [esp + 0x344], 0xffffffff
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::destructor_void_]
mov ecx, dword [esp + 0x33c]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4