Function at 0x4054b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5031d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x29c
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x9c]
call fcn.00402ae0
xor eax, eax
mov dword [ebp - 4], eax
push 0x206
push eax
mov word [ebp - 0x2a4], ax
lea eax, [ebp - 0x2a2]
push eax
call sub.MSVCR80.dll_memset
mov edi, dword [ebp + 8]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
test ebx, ebx
je 0x4056f9
push ecx
mov eax, esp
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x14], esp
mov dword [eax], edi
call fcn.004efc50
movzx ebx, al
test ebx, ebx
je 0x4056f9
push ecx
mov eax, esp
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x14], esp
mov dword [eax], str.theme_config
call fcn.004ebd30
push ecx
mov eax, esp
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x14], esp
push ecx
mov dword [esi], 2
lea ecx, [ebp - 0x9c]
mov dword [eax], str.PackID
call fcn.00402ab0
mov edi, 8
mov byte [ebp - 4], 1
cmp dword [eax + 0x18], edi
jb 0x40557c
mov eax, dword [eax + 4]
jmp 0x40557f
add eax, 4
mov ebx, dword [reloc.Common.dll___4CTXStringW__QAEAAV0_PB_W_Z]
push eax
lea ecx, [esi + 4]
call ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
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, [ebp - 0x30]
mov dword [ebp - 0x14], esp
push edx
lea ecx, [ebp - 0x9c]
mov dword [eax], str.PackPreview
call fcn.00402ab0
mov byte [ebp - 4], 2
cmp dword [eax + 0x18], edi
jb 0x4055c1
mov eax, dword [eax + 4]
jmp 0x4055c4
add eax, 4
lea ecx, [esi + 0xc]
push eax
call ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
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_]
lea ecx, [ebp - 0x9c]
call fcn.004eb230
push ecx
mov eax, esp
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x14], esp
mov dword [eax], str.backgroundlist
call fcn.004ebd30
lea ecx, [ebp - 0x9c]
call fcn.004eb230
push ecx
mov eax, esp
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x14], esp
mov dword [eax], str.background
call fcn.004ebd30
movzx ebx, al
test ebx, ebx
je 0x4056f9
push ecx
mov eax, esp
mov dword [eax], str.mainfile
lea eax, [ebp - 0x30]
mov dword [ebp - 0x14], esp
push eax
lea ecx, [ebp - 0x9c]
call fcn.00402ab0
mov byte [ebp - 4], 3
cmp dword [eax + 0x18], edi
jb 0x40564f
mov eax, dword [eax + 4]
jmp 0x405652
add eax, 4
lea edi, [esi + 8]
push eax
mov ecx, edi
call dword [0x509114]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
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_]
lea ecx, [ebp - 0x9c]
call fcn.004eb250
lea ecx, [ebp - 0x9c]
call fcn.004eb250
mov ecx, dword [ebp + 8]
push 0x103
push ecx
lea edx, [ebp - 0x2a4]
push 0x104
push edx
call dword [sym.imp.MSVCR80.dll_wcsncpy_s]
add esp, 0x10
lea eax, [ebp - 0x2a4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, edi
mov edi, dword [sym.imp.Common.dll_public:_wchar_t_const____thiscall_CTXStringW::GetString_void_const]
call edi
push eax
lea ecx, [ebp - 0x2a4]
push ecx
push 0x52698c
lea edx, [esi + 0x14]
push 0x527224
push edx
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::Format_wchar_t_const__]
add esp, 0x14
lea ecx, [esi + 0xc]
call edi
push eax
lea eax, [ebp - 0x2a4]
push eax
push 0x52698c
push 0x527224
add esi, 0x18
push esi
call dword [sym.imp.Common.dll_public:_void___cdecl_CTXStringW::Format_wchar_t_const__]
add esp, 0x14
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0xffffffff
call fcn.004edb80
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, ebx
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4