Function at 0x40c9d0
Capabilities:
Check if file exists
Create shortcut via ishelllink
Get common file path
Get file attributes
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5520a0
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x5a0800]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x64
call fcn.0040e170
push 4
mov ecx, esi
call fcn.00409ee0
lea eax, [esi + 0x4f0]
push eax
lea ecx, [ebp - 0x230]
call fcn.00408620
mov ecx, dword [ebp - 0x220]
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 4], 0
cmp ecx, edx
jae 0x40ca5a
lea eax, [ecx + 1]
cmp edx, 7
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x230]
cmova eax, dword [ebp - 0x230]
mov dword [eax + ecx*2], 0x5c
jmp 0x40ca76
push 0x5c
mov byte [ebp - 0x238], 0
lea ecx, [ebp - 0x230]
push dword [ebp - 0x238]
push 1
call fcn.00407ee0
push 0x10
push 0x55cf08
lea ecx, [ebp - 0x230]
call fcn.0040f080
cmp dword [ebp - 0x21c], 7
lea eax, [ebp - 0x230]
cmova eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40cc9f
test al, 0x10
jne 0x40cc9f
cmp dword [ebp - 0x21c], 7
lea esi, [ebp - 0x230]
push 0
cmova esi, dword [ebp - 0x230]
call dword [sym.imp.ole32.dll_CoInitialize]
mov edi, dword [sym.imp.ole32.dll_CoUninitialize]
test eax, eax
js 0x40cbad
lea eax, [ebp - 0x234]
push eax
push 0x56a8fc
push 1
push 0
push 0x56e25c
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40cbab
mov eax, dword [ebp - 0x234]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov eax, dword [ebp - 0x234]
lea edx, [ebp - 0x238]
push edx
push 0x56b4cc
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x40cb9f
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ea040
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x10
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40cb60
mov eax, dword [ebp - 0x238]
lea edx, [ebp - 0x218]
mov ecx, 9
mov esi, str.___.lnk
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push 0
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x238]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edi, dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x234]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call edi
cmp dword [ebp - 0x21c], 7
lea esi, [ebp - 0x230]
push 0
cmova esi, dword [ebp - 0x230]
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x40ccaa
lea eax, [ebp - 0x234]
push eax
push 0x56a8fc
push 1
push 0
push 0x56e25c
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40cc9b
mov eax, dword [ebp - 0x234]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov eax, dword [ebp - 0x234]
lea edx, [ebp - 0x238]
push edx
push 0x56b4cc
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x40cc8f
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ea040
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 2
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40cc50
mov eax, dword [ebp - 0x238]
lea edx, [ebp - 0x218]
mov ecx, 9
mov esi, str.___.lnk
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push 0
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x238]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edi, dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x234]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call edi
jmp 0x40ccaa
push str._XIMAO_OnDecompressDone_ExistFile_fail_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x21c]
cmp ecx, 7
jbe 0x40cce6
mov edx, dword [ebp - 0x230]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40ccdc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cd05
push ecx
push edx
call fcn.004e6cae
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
call fcn.004f7238
int3