Function at 0x40c970
Capabilities:
Create shortcut via ishelllink
Get common file path
Get program files directory
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x4dce8e
mov eax, dword fs:[0]
push eax
sub esp, 0x660
mov eax, dword [0x515854]
xor eax, esp
mov dword [esp + 0x65c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x515854]
xor eax, esp
push eax
lea eax, [esp + 0x674]
mov dword fs:[0], eax
xor ebp, ebp
mov dword [esp + 0x67c], 2
push ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x14]
push eax
push 0x4e68cc
push 1
push ebp
push 0x4e68dc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40cc7b
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x4e690c
push eax
mov eax, dword [ecx]
call eax
cmp eax, ebp
jl 0x40cc7b
push 0x206
lea ecx, [esp + 0x5e]
push ebp
push ecx
mov word [esp + 0x64], bp
call fcn.004b9920
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
add esp, 0xc
push ebp
push 0x26
lea edx, [esp + 0x60]
push edx
push ebp
call ebx
test eax, eax
je 0x40cc7b
lea edi, [esp + 0x58]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40ca40
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x58]
mov ecx, 0x10
mov esi, 0x4ed150
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x50]
call eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x24]
push str._HOMEDRIVE__HOMEPATH_
push eax
call edx
mov ecx, dword [esp + 0x6a4]
mov edi, 8
cmp dword [esp + 0x6b8], edi
jae 0x40ca96
lea ecx, [esp + 0x6a4]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x2c]
call eax
cmp eax, ebp
jge 0x40cadb
push eax
lea esi, [esp + 0x24]
call fcn.0042f745
add esp, 4
cmp dword [eax + 0x18], edi
jb 0x40cabe
mov eax, dword [eax + 4]
jmp 0x40cac1
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esp + 0x38], edi
jb 0x40cadb
mov ecx, dword [esp + 0x24]
push ecx
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x6d0], ebp
je 0x40cb09
cmp dword [esp + 0x6d4], edi
mov ecx, dword [esp + 0x6c0]
jae 0x40cafb
lea ecx, [esp + 0x6c0]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ebp
push ecx
push eax
mov eax, dword [edx + 0x44]
jmp 0x40cb19
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push ebp
lea edx, [esp + 0x5c]
push edx
push eax
mov eax, dword [ecx + 0x44]
call eax
push 0x206
lea ecx, [esp + 0x46e]
push ebp
push ecx
mov word [esp + 0x474], bp
call fcn.004b9920
push 0x206
lea edx, [esp + 0x272]
push ebp
push edx
mov word [esp + 0x278], bp
call fcn.004b9920
add esp, 0x18
push 1
push 0x10
lea eax, [esp + 0x470]
push eax
push ebp
call ebx
test eax, eax
je 0x40cc80
cmp dword [esp + 0x69c], edi
mov eax, dword [esp + 0x688]
jae 0x40cb82
lea eax, [esp + 0x688]
push eax
lea ecx, [esp + 0x46c]
push ecx
lea edx, [esp + 0x268]
push str._s_s.lnk
push edx
call fcn.004b7b68
mov ebx, 7
lea eax, [esp + 0x270]
add esp, 0x10
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40cbc0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x264]
push eax
lea esi, [esp + 0x28]
call fcn.00407ef0
mov ecx, esi
push ecx
lea eax, [esp + 0x40]
mov byte [esp + 0x680], 3
call fcn.00442c5a
add esp, 4
mov byte [esp + 0x67c], 5
cmp dword [esp + 0x38], edi
jb 0x40cc13
mov edx, dword [esp + 0x24]
push edx
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x54], edi
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
jae 0x40cc2e
lea ecx, [esp + 0x40]
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
push 1
push ecx
push eax
mov eax, dword [edx + 0x18]
call eax
cmp eax, ebp
mov byte [esp + 0x67c], 2
jge 0x40cc5e
cmp dword [esp + 0x54], edi
jb 0x40cc85
mov ecx, dword [esp + 0x40]
push ecx
call fcn.004b6eae
add esp, 4
jmp 0x40cc85
cmp dword [esp + 0x54], edi
mov dword [esp + 0x1c], 1
jb 0x40cc85
mov edx, dword [esp + 0x40]
push edx
call fcn.004b6eae
add esp, 4
jmp 0x40cc85
mov edi, 8
mov ebx, 7
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x40cc95
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x40cca5
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x69c], edi
jb 0x40ccbe
mov eax, dword [esp + 0x688]
push eax
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x6b8], edi
mov dword [esp + 0x69c], ebx
mov dword [esp + 0x698], ebp
mov word [esp + 0x688], bp
jb 0x40cced
mov ecx, dword [esp + 0x6a4]
push ecx
call fcn.004b6eae
add esp, 4
cmp dword [esp + 0x6d4], edi
mov dword [esp + 0x6b8], ebx
mov dword [esp + 0x6b4], ebp
mov word [esp + 0x6a4], bp
jb 0x40cd1c
mov edx, dword [esp + 0x6c0]
push edx
call fcn.004b6eae
add esp, 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x674]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x65c]
xor ecx, esp
call fcn.004b6e9f
add esp, 0x66c
ret