Function at 0x40f5b0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a5fa
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x487580]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
test esi, esi
je 0x40f9d0
cmp word [esi], 0
je 0x40f9d0
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f9d0
lea ebx, [edi + 0xc]
push 0x104
lea eax, [ebp - 0x218]
mov dword [ebp - 0x21c], ebx
push ebx
push eax
call fcn.00452ccc
push 0x104
push esi
push ebx
call fcn.00452ccc
push 0x5c
push ebx
call fcn.00452d0c
xor ecx, ecx
add esp, 0x20
mov word [eax + 2], cx
mov eax, dword [edi]
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x228], ecx
lea ecx, [ebp - 0x228]
push ecx
lea ecx, [ebp - 0x224]
push ecx
push 0x46d270
push edi
call dword [eax + 0x40]
mov dword [ebp - 0x234], eax
test eax, eax
je 0x40f9bb
cmp dword [ebp - 0x224], 0
je 0x40f9bb
cmp dword [ebp - 0x228], 0
je 0x40f9bb
push 0x24
call fcn.00450b1d
add esp, 4
mov dword [ebp - 0x22c], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x40f6b6
mov ecx, eax
call fcn.0043f7a0
mov ebx, eax
mov dword [ebp - 0x22c], eax
jmp 0x40f6be
xor ebx, ebx
mov dword [ebp - 0x22c], ebx
push 0x70
mov dword [ebp - 4], 0xffffffff
mov dword [ebx + 0x20], edi
call fcn.00450b1d
add esp, 4
mov dword [ebp - 0x220], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x40f6f2
mov ecx, eax
call fcn.0043bfe0
mov dword [ebp - 0x230], eax
jmp 0x40f6fa
xor ecx, ecx
mov dword [ebp - 0x230], ecx
push dword [ebp - 0x224]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov esi, eax
lea ecx, [esi + 2]
push ecx
call fcn.00451023
push esi
push dword [ebp - 0x234]
mov dword [ebp - 0x220], eax
push eax
call fcn.004524c0
mov eax, dword [ebp - 0x220]
add esp, 0x10
mov word [eax + esi], 0
lea ecx, [eax + 2]
mov esi, dword [ebp - 0x230]
push 0
push ecx
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0xc]
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x40f760
push eax
call fcn.0045102c
add esp, 4
push dword [ebp - 0x228]
mov eax, dword [edi]
push dword [ebp - 0x224]
push edi
call dword [eax + 0x44]
push str.directui
mov ecx, esi
call fcn.0043d420
mov dword [ebp - 0x238], eax
lea ecx, [ebp - 0x238]
push str.theme
lea eax, [ebp - 0x234]
push eax
call fcn.0043d3d0
mov ecx, eax
call fcn.0040fa20
push eax
mov ecx, ebx
call fcn.004404d0
test eax, eax
jne 0x40f7de
mov ecx, ebx
call fcn.0043f830
push ebx
call fcn.00450ad0
mov eax, dword [esi]
add esp, 4
mov ecx, esi
push 1
call dword [eax]
push 0x104
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebp - 0x21c]
push eax
jmp 0x40f9c8
push 0x28
call fcn.00450b1d
add esp, 4
mov dword [ebp - 0x21c], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x40f804
mov ecx, eax
call fcn.00440bc0
mov ebx, eax
jmp 0x40f806
xor ebx, ebx
mov eax, dword [edi]
lea ecx, [ebp - 0x228]
push ecx
lea ecx, [ebp - 0x224]
mov dword [ebp - 4], 0xffffffff
push ecx
push str.DirectUI.js
push edi
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x228], 0
call dword [eax + 0x40]
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x40f973
cmp dword [ebp - 0x228], 0
je 0x40f973
mov ecx, dword [ebp - 0x224]
test ecx, ecx
je 0x40f973
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov esi, eax
lea ecx, [esi + 0x80]
push ecx
call fcn.00451023
push esi
push 0
push eax
mov dword [ebp - 0x220], eax
call fcn.004516c0
mov eax, dword [ebp - 0x220]
push esi
push dword [ebp - 0x21c]
push eax
call fcn.004524c0
mov eax, dword [ebp - 0x220]
add esp, 0x1c
mov word [eax + esi], 0
lea esi, [eax + 2]
push str._r_nCollectGarbage____r_n
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
mov ecx, ebx
call fcn.004412b0
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x40f8d3
push eax
call fcn.0045102c
add esp, 4
push edi
push str.winManager
mov ecx, ebx
call fcn.00440f30
mov esi, dword [ebp - 0x22c]
mov ecx, ebx
push esi
push str.resManager
call fcn.00440f30
mov ecx, dword [edi + 0x214]
test ecx, ecx
je 0x40f903
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [edi + 0x224]
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x40f928
mov ecx, eax
call fcn.00440d10
push dword [ebp - 0x21c]
call fcn.00450ad0
add esp, 4
mov eax, dword [edi + 0x218]
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x40f94d
mov ecx, eax
call fcn.0043f830
push dword [ebp - 0x21c]
call fcn.00450ad0
add esp, 4
mov ecx, dword [ebp - 0x230]
mov dword [edi + 0x214], ecx
mov ecx, edi
mov dword [edi + 0x218], esi
mov dword [edi + 0x224], ebx
call fcn.00410550
mov eax, 1
jmp 0x40f9d2
mov esi, dword [ebp - 0x22c]
mov ecx, esi
call fcn.0043f830
push esi
call fcn.00450ad0
mov ecx, dword [ebp - 0x230]
add esp, 4
mov eax, dword [ecx]
push 1
call dword [eax]
test ebx, ebx
je 0x40f9a9
mov ecx, ebx
call fcn.00440d10
push ebx
call fcn.00450ad0
add esp, 4
push 0x104
lea eax, [ebp - 0x218]
push eax
lea eax, [edi + 0xc]
push eax
jmp 0x40f9c8
push 0x104
lea eax, [ebp - 0x218]
push eax
push ebx
call fcn.00452ccc
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045167e
mov esp, ebp
pop ebp
ret 8