Function at 0x4051b0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5074a7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x468
push ebx
push esi
push edi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x26e]
push ebx
push eax
mov dword [esp + 0x20], ecx
xor edi, edi
mov word [esp + 0x274], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x1c]
call fcn.00404c00
push 1
push 0x1a
lea ecx, [esp + 0x270]
push ecx
push ebx
mov dword [esp + 0x48c], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.TencentQQPCMgrSkins_recommend_
lea edx, [esp + 0x26c]
push edx
call esi
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esp + 0x26c]
push ecx
call esi
lea edx, [esp + 0x268]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405298
lea eax, [esp + 0x268]
push eax
lea ecx, [esp + 0x14]
push 0x52698c
push ecx
call dword [sym.imp.Common.dll_class_CTXStringW___cdecl_FS::CombineQNC_wchar_t_const___wchar_t_const__]
add esp, 0xc
mov ecx, eax
mov byte [esp + 0x47c], 1
call dword [sym.imp.Common.dll_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const]
push eax
call dword [sym.imp.Common.dll_int___cdecl_FS::DeleteDirectory_wchar_t_const__]
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x47c], bl
call dword [sym.imp.Common.dll_public:_void___thiscall_CTXStringW::destructor_void_]
push ebx
lea edx, [esp + 0x26c]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov eax, dword [ebp + 8]
push eax
call fcn.0040cf10
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40546f
xor eax, eax
mov dword [esp + 0x38], eax
mov word [esp + 0x3c], bx
mov dword [esp + 0x264], ebx
cmp dword [esi], 1
je 0x4052dc
mov ecx, 0x80000
jmp 0x405353
mov edi, dword [esi + 4]
mov ecx, dword [edi]
or edx, 0xffffffff
cmp dword [ecx + 4], edx
jg 0x4052f0
mov ecx, 0x10000
jmp 0x405353
cmp dword [edi + 4], edx
je 0x405301
mov ebx, ecx
call fcn.0040c380
xor ebx, ebx
or edx, 0xffffffff
mov ecx, dword [edi]
mov dword [edi + 4], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x38], eax
mov word [esp + 0x3c], bx
mov dword [esp + 0x244], ebx
mov dword [esp + 0x248], ebx
mov dword [esp + 0x24c], ebx
mov dword [esp + 0x250], ebx
mov dword [esp + 0x254], ebx
mov dword [esp + 0x258], ebx
mov dword [esp + 0x25c], ebx
mov dword [esp + 0x260], ebx
mov dword [esp + 0x264], ebx
xor ecx, ecx
cmp ecx, ebx
mov dword [0x572d38], ecx
mov dword [esp + 0x10], ecx
jne 0x4054a6
cmp dword [esi], 1
je 0x405376
mov dword [0x572d38], 0x80000
jmp 0x40538e
mov edi, dword [esi + 4]
lea eax, [esp + 0x268]
call fcn.0040c4b0
mov dword [0x572d38], eax
mov eax, dword [esp + 0x38]
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x18], eax
jle 0x405409
jmp 0x4053a0
mov dword [esp + 0x38], ebx
mov word [esp + 0x3c], bx
mov dword [esp + 0x264], ebx
cmp dword [esi], 1
jne 0x40549c
mov eax, dword [esi + 4]
lea edx, [esp + 0x38]
push edx
push edi
push eax
call fcn.0040c510
cmp eax, ebx
mov dword [0x572d38], eax
jne 0x4054a6
cmp dword [esi], 1
je 0x4053e1
mov eax, 0x80000
jmp 0x4053ef
mov eax, dword [esi + 4]
lea ecx, [esp + 0x3c]
push ecx
push edi
call fcn.0040cc00
cmp eax, ebx
mov dword [0x572d38], eax
mov dword [esp + 0x10], eax
jne 0x4054a6
add edi, 1
cmp edi, dword [esp + 0x18]
jl 0x4053a0
push str.themeconfig.xml
lea edx, [esp + 0x26c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x268]
push eax
lea ecx, [esp + 0x20]
call fcn.004054b0
test eax, eax
je 0x405464
mov ecx, dword [ebp + 0xc]
mov edi, dword [reloc.Common.dll___4CTXStringW__QAEAAV0_PB_W_Z]
push ecx
lea ecx, [esp + 0x24]
call edi
push 0x527038
lea ecx, [esp + 0x30]
call edi
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov edx, dword [edx + 0x1c]
lea eax, [esp + 0x1c]
push eax
call edx
mov dword [esp + 0x10], 1
mov edi, esi
call fcn.0040d010
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x47c], 0xffffffff
call fcn.00404c70
mov ecx, dword [esp + 0x474]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [0x572d38], 0x80000
mov dword [esp + 0x10], ebx
jmp 0x405464