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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48b9f2
mov eax, dword fs:[0]
push eax
sub esp, 0x284
mov eax, dword [0x536324]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00465f50
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 1
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.xiaoyu
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40e673
push eax
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x40e673
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
mov dword [ebp - 4], eax
mov ecx, ebx
lea eax, [ebp - 0x260]
push eax
call fcn.0040e340
push eax
lea eax, [ebp - 0x248]
mov byte [ebp - 4], 1
push eax
call fcn.0040b5b0
add esp, 8
mov eax, dword [ebp - 0x24c]
mov byte [ebp - 4], 3
cmp eax, 0x10
jb 0x40e6d7
inc eax
lea ecx, [ebp - 0x260]
push eax
push dword [ebp - 0x260]
call fcn.00405190
cmp dword [ebp - 0x238], 0
mov dword [ebp - 0x24c], 0xf
mov dword [ebp - 0x250], 0
mov byte [ebp - 0x260], 0
je 0x40e7e2
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x290]
push str.xiaoyuSetup_
push eax
call fcn.0040d5b0
push 0x48ee48
push eax
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 4
push eax
call fcn.00408a90
add esp, 0x18
mov esi, eax
lea eax, [ebp - 0x230]
cmp eax, esi
je 0x40e783
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x40e75a
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.004054b0
xor eax, eax
mov dword [ebp - 0x21c], 7
push esi
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
call fcn.00408af0
mov eax, dword [ebp - 0x264]
cmp eax, 8
jb 0x40e7a1
inc eax
lea ecx, [ebp - 0x278]
push eax
push dword [ebp - 0x278]
call fcn.004054b0
xor eax, eax
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x268], 0
mov byte [ebp - 4], 3
cmp eax, 8
jb 0x40e7f4
inc eax
lea ecx, [ebp - 0x290]
push eax
push dword [ebp - 0x290]
call fcn.004054b0
jmp 0x40e7f4
push 0x10
push str.xiaoyuUpdate.exe
lea ecx, [ebp - 0x230]
call fcn.004064e0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp word [ebp - 0x218], 0
jne 0x40e824
xor ecx, ecx
jmp 0x40e83f
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e830
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebx + 4]
call fcn.004064e0
mov eax, dword [ebp - 0x234]
cmp eax, 8
jb 0x40e86d
inc eax
lea ecx, [ebp - 0x248]
push eax
push dword [ebp - 0x248]
call fcn.004054b0
xor eax, eax
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x238], 0
cmp eax, 8
jb 0x40e8a8
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.004054b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00462ba5
mov esp, ebp
pop ebp
ret